File


Data Structures

struct  GSM_FileSystemStatus
struct  GSM_File

Enumerations

enum  GSM_FileType {
  GSM_File_Other = 1, GSM_File_Java_JAR, GSM_File_Image_JPG, GSM_File_Image_BMP,
  GSM_File_Image_GIF, GSM_File_Image_PNG, GSM_File_Image_WBMP, GSM_File_Video_3GP,
  GSM_File_Sound_AMR, GSM_File_Sound_NRT, GSM_File_Sound_MIDI, GSM_File_MMS
}

Functions

GSM_Error GSM_JADFindData (GSM_File File, char *Vendor, char *Name, char *JAR, char *Version, int *Size)
GSM_Error GSM_ReadFile (const char *FileName, GSM_File *File)
void GSM_IdentifyFileFormat (GSM_File *File)
GSM_Error GSM_GetNextFileFolder (GSM_StateMachine *s, GSM_File *File, bool start)
GSM_Error GSM_GetFolderListing (GSM_StateMachine *s, GSM_File *File, bool start)
GSM_Error GSM_GetNextRootFolder (GSM_StateMachine *s, GSM_File *File)
GSM_Error GSM_SetFileAttributes (GSM_StateMachine *s, GSM_File *File)
GSM_Error GSM_GetFilePart (GSM_StateMachine *s, GSM_File *File, int *Handle, int *Size)
GSM_Error GSM_AddFilePart (GSM_StateMachine *s, GSM_File *File, int *Pos, int *Handle)
GSM_Error GSM_SendFilePart (GSM_StateMachine *s, GSM_File *File, int *Pos, int *Handle)
GSM_Error GSM_GetFileSystemStatus (GSM_StateMachine *s, GSM_FileSystemStatus *Status)
GSM_Error GSM_DeleteFile (GSM_StateMachine *s, unsigned char *ID)
GSM_Error GSM_AddFolder (GSM_StateMachine *s, GSM_File *File)
GSM_Error GSM_DeleteFolder (GSM_StateMachine *s, unsigned char *ID)

Detailed Description

Files handling.

Enumeration Type Documentation

File type identifier.

Enumerator:
GSM_File_Other 
GSM_File_Java_JAR 
GSM_File_Image_JPG 
GSM_File_Image_BMP 
GSM_File_Image_GIF 
GSM_File_Image_PNG 
GSM_File_Image_WBMP 
GSM_File_Video_3GP 
GSM_File_Sound_AMR 
GSM_File_Sound_NRT  DCT4 binary format
GSM_File_Sound_MIDI 
GSM_File_MMS 

Definition at line 37 of file gammu-file.h.


Function Documentation

GSM_Error GSM_AddFilePart ( GSM_StateMachine s,
GSM_File File,
int *  Pos,
int *  Handle 
)

Adds file to filesystem. Call repeatedly until function returns ERR_EMPTY.

Parameters:
s State machine pointer.
File File structure and data.
Pos Position of transmitted data. Should be 0 on start.
Handle Handle for saving file, some drivers need this information to be kept between function calls.
Returns:
Error code, ERR_EMPTY after transfer end.

GSM_Error GSM_AddFolder ( GSM_StateMachine s,
GSM_File File 
)

Adds folder to filesystem.

Parameters:
s State machine pointer.
File Structure containing information about new folder (Name and FullName).
Returns:
Error code.

GSM_Error GSM_DeleteFile ( GSM_StateMachine s,
unsigned char *  ID 
)

Deletes file from filesystem.

Parameters:
s State machine pointer.
ID ID of folder.
Returns:
Error code.

GSM_Error GSM_DeleteFolder ( GSM_StateMachine s,
unsigned char *  ID 
)

Deletes folder from filesystem.

Parameters:
s State machine pointer.
ID ID of folder.
Returns:
Error code.

GSM_Error GSM_GetFilePart ( GSM_StateMachine s,
GSM_File File,
int *  Handle,
int *  Size 
)

Retrieves file part.

Parameters:
s State machine pointer.
File File structure with path, data will be stored here.
Size Size of transmitted data.
Handle Handle for saving file, some drivers need this information to be kept between function calls.
Returns:
Error code, ERR_EMPTY after transfer end.

GSM_Error GSM_GetFileSystemStatus ( GSM_StateMachine s,
GSM_FileSystemStatus Status 
)

Acquires filesystem status.

Parameters:
s State machine pointer.
Status Storage for status information.
Returns:
Error code.

GSM_Error GSM_GetFolderListing ( GSM_StateMachine s,
GSM_File File,
bool  start 
)

Gets listing of folder.

Parameters:
s State machine pointer.
File File structure where path will be stored, if start is false, it should contain data from previous reading (at least ID). On start it should contain path to directory.
start Whether we're starting transfer.
Returns:
Error code.

GSM_Error GSM_GetNextFileFolder ( GSM_StateMachine s,
GSM_File File,
bool  start 
)

Gets next filename from filesystem.

Parameters:
s State machine pointer.
File File structure where path will be stored, if start is false, it should contain data from previous reading (at least ID).
start Whether we're starting transfer.
Returns:
Error code.

GSM_Error GSM_GetNextRootFolder ( GSM_StateMachine s,
GSM_File File 
)

Gets next root folder.

Parameters:
s State machine pointer.
File File structure where path will be stored.
Returns:
Error code.

void GSM_IdentifyFileFormat ( GSM_File File  ) 

Identifies file format by checking it's content.

Parameters:
File File data, Type member will be filled in.

GSM_Error GSM_JADFindData ( GSM_File  File,
char *  Vendor,
char *  Name,
char *  JAR,
char *  Version,
int *  Size 
)

Parses JAD file.

Parameters:
File JAD file data.
Vendor Buffer for vendor name.
Name Buffer for application name.
JAR Buffer for JAR URL.
Version Buffer for version of application.
Size Pointer to integer to store size.
Returns:
Error code.

GSM_Error GSM_ReadFile ( const char *  FileName,
GSM_File File 
)

Reads file from filesystem to GSM_File structure.

Parameters:
FileName File to read.
File Storage for data.
Returns:
Error code.

GSM_Error GSM_SendFilePart ( GSM_StateMachine s,
GSM_File File,
int *  Pos,
int *  Handle 
)

Sends file to phone, it's up to phone to decide what to do with it. It is usually same as when you receive file over Bluetooth from other phone. Use in same way as GSM_AddFilePart.

Parameters:
s State machine pointer.
File File structure and data.
Pos Position of transmitted data. Should be 0 on start.
Handle Handle for saving file, some drivers need this information to be kept between function calls.
Returns:
Error code, ERR_EMPTY after transfer end.

GSM_Error GSM_SetFileAttributes ( GSM_StateMachine s,
GSM_File File 
)

Sets file system attributes.

Parameters:
s State machine pointer.
File File structure with path and attributes.
Returns:
Error code.


Generated on Tue Jan 6 15:44:15 2009 for Gammu API by  doxygen 1.5.6