Gammu internals
1.38.0
|
Data Structures | |
struct | GSM_FileSystemStatus |
struct | GSM_File |
Files handling.
enum GSM_FileType |
File type identifier.
Definition at line 41 of file gammu-file.h.
GSM_Error GSM_AddFilePart | ( | GSM_StateMachine * | s, |
GSM_File * | File, | ||
size_t * | Pos, | ||
int * | Handle | ||
) |
Adds file to filesystem. Call repeatedly until function returns ERR_EMPTY.
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. |
Adds file part to filesystem.
Definition at line 1765 of file api.c.
References GSM_Phone_Functions::AddFilePart, CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.
GSM_Error GSM_AddFolder | ( | GSM_StateMachine * | s, |
GSM_File * | File | ||
) |
Adds folder to filesystem.
s | State machine pointer. |
File | Structure containing information about new folder (Name and FullName). |
Adds folder to filesystem.
Definition at line 1817 of file api.c.
References GSM_Phone_Functions::AddFolder, CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.
GSM_Error GSM_DeleteFile | ( | GSM_StateMachine * | s, |
unsigned char * | ID | ||
) |
Deletes file from filesystem.
s | State machine pointer. |
ID | ID of folder. |
Deletes file from filessytem.
Definition at line 1804 of file api.c.
References CHECK_PHONE_CONNECTION, GSM_Phone_Functions::DeleteFile, GSM_Phone::Functions, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.
GSM_Error GSM_DeleteFolder | ( | GSM_StateMachine * | s, |
unsigned char * | ID | ||
) |
Deletes folder from filesystem.
s | State machine pointer. |
ID | ID of folder. |
Deletes folder from filesystem.
Definition at line 1830 of file api.c.
References CHECK_PHONE_CONNECTION, GSM_Phone_Functions::DeleteFolder, GSM_Phone::Functions, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.
GSM_Error GSM_GetFilePart | ( | GSM_StateMachine * | s, |
GSM_File * | File, | ||
int * | Handle, | ||
size_t * | Size | ||
) |
Retrieves file part.
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. |
Retrieves file part.
Definition at line 1752 of file api.c.
References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, GSM_Phone_Functions::GetFilePart, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.
GSM_Error GSM_GetFileSystemStatus | ( | GSM_StateMachine * | s, |
GSM_FileSystemStatus * | Status | ||
) |
Acquires filesystem status.
s | State machine pointer. |
Status | Storage for status information. |
Acquires filesystem status.
Definition at line 1791 of file api.c.
References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, GSM_Phone_Functions::GetFileSystemStatus, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.
GSM_Error GSM_GetFolderListing | ( | GSM_StateMachine * | s, |
GSM_File * | File, | ||
gboolean | start | ||
) |
Gets listing of folder.
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. |
Gets file part from filesystem.
Definition at line 1712 of file api.c.
References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, GSM_Phone_Functions::GetFolderListing, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and PRINT_START.
GSM_Error GSM_GetNextFileFolder | ( | GSM_StateMachine * | s, |
GSM_File * | File, | ||
gboolean | start | ||
) |
Gets next filename from filesystem.
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. |
Gets next filename from filesystem.
Definition at line 1698 of file api.c.
References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, GSM_Phone_Functions::GetNextFileFolder, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and PRINT_START.
GSM_Error GSM_GetNextRootFolder | ( | GSM_StateMachine * | s, |
GSM_File * | File | ||
) |
Gets next root folder.
s | State machine pointer. |
File | File structure where path will be stored. |
Gets next root folder.
Definition at line 1726 of file api.c.
References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, GSM_Phone_Functions::GetNextRootFolder, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.
void GSM_IdentifyFileFormat | ( | GSM_File * | File | ) |
Identifies file format by checking it's content.
File | File data, Type member will be filled in. |
Definition at line 164 of file gsmmisc.c.
References GSM_File::Buffer, GSM_File_Image_BMP, GSM_File_Image_GIF, GSM_File_Image_JPG, GSM_File_Image_PNG, GSM_File_Image_WBMP, GSM_File_Other, GSM_File_Sound_MIDI, GSM_File_Sound_NRT, PRINTF_STYLE, GSM_File::Type, and GSM_File::Used.
Referenced by GSM_ReadFile().
GSM_Error GSM_JADFindData | ( | GSM_File * | File, |
char * | Vendor, | ||
char * | Name, | ||
char * | JAR, | ||
char * | Version, | ||
int * | Size | ||
) |
Parses JAD file.
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. |
Definition at line 136 of file gsmmisc.c.
References dbgprintf, ERR_FILENOTSUPPORTED, ERR_NONE, and GSM_JADFindLine().
Reads file from filesystem to GSM_File structure.
FileName | File to read. |
File | Storage for data. |
Definition at line 74 of file gsmmisc.c.
References GSM_File::Buffer, dbgprintf, ERR_CANTOPENFILE, ERR_NONE, ERR_UNKNOWN, FALSE, Fill_GSM_DateTime(), GSM_File::Folder, GSM_IdentifyFileFormat(), GSM_File::Hidden, GSM_File::Level, GSM_File::Modified, GSM_File::ModifiedEmpty, OSDate(), GSM_File::Protected, GSM_File::ReadOnly, GSM_File::System, TRUE, and GSM_File::Used.
Referenced by DUMMY_GetFilePart(), and PHONE_FindDataFile().
GSM_Error GSM_SendFilePart | ( | GSM_StateMachine * | s, |
GSM_File * | File, | ||
size_t * | 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.
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. |
Sends file to phone, it's up to phone to decide what to do with it.
Definition at line 1778 of file api.c.
References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and GSM_Phone_Functions::SendFilePart.
Referenced by PHONE_UploadFile().
GSM_Error GSM_SetFileAttributes | ( | GSM_StateMachine * | s, |
GSM_File * | File | ||
) |
Sets file system attributes.
s | State machine pointer. |
File | File structure with path and attributes. |
Sets file system attributes.
Definition at line 1739 of file api.c.
References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and GSM_Phone_Functions::SetFileAttributes.