Gammu internals
1.38.0
|
Data Structures | |
struct | GSM_MemoryStatus |
struct | GSM_SubMemoryEntry |
struct | GSM_MemoryEntry |
struct | GSM_SpeedDial |
Macros | |
#define | GSM_MemoryTypeToString(x) |
Memory entries manipulations.
#define GSM_MemoryTypeToString | ( | x | ) |
Returns string representation of a memory type.
x | Memory type to convert |
Definition at line 95 of file gammu-memory.h.
Referenced by DUMMY_AddMemory(), DUMMY_DeleteAllMemory(), DUMMY_GetMemoryStatus(), DUMMY_GetNextMemory(), DUMMY_MemoryPath(), and GSM_EncodeVCARD().
enum GSM_EntryLocation |
Location of memory contact.
Enumerator | |
---|---|
PBK_Location_Unknown | No/Unknown location. |
PBK_Location_Home | Home |
PBK_Location_Work | Work |
Definition at line 348 of file gammu-memory.h.
enum GSM_EntryType |
Type of specific phonebook entry. In parenthesis is specified in which member of GSM_SubMemoryEntry value is stored.
Definition at line 144 of file gammu-memory.h.
enum GSM_MemoryType |
Enum defines ID for various phone and SIM memories. Phone modules can translate them to values specific for concrete models. Two letter codes (excluding VM and SL) are from GSM 07.07.
Definition at line 31 of file gammu-memory.h.
enum GSM_VCardVersion |
Types of vCard.
Definition at line 602 of file gammu-memory.h.
GSM_Error GSM_AddMemory | ( | GSM_StateMachine * | s, |
GSM_MemoryEntry * | entry | ||
) |
Adds memory (phonebooks or calls) entry.
s | State machine pointer. |
entry | Entry to add, Location is ignored, MemoryType has to be set. |
Deletes memory (phonebooks or calls) entry.
Definition at line 561 of file api.c.
References GSM_Phone_Functions::AddMemory, CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and PRINT_MEMORY_INFO.
GSM_Error GSM_DecodeVCARD | ( | GSM_Debug_Info * | di, |
char * | Buffer, | ||
size_t * | Pos, | ||
GSM_MemoryEntry * | Pbk, | ||
GSM_VCardVersion | Version | ||
) |
Decodes memory entry from vCard.
di | Pointer to debugging description. | |
[in] | Buffer | Buffer to readCard text. |
[in,out] | Pos | Position in output buffer. |
[out] | Pbk | Phonebook data read from vCard. |
[in] | Version | What vCard version to parse. |
Definition at line 677 of file gsmpbk.c.
References GSM_BinaryPicture::Buffer, CHECK_NUM_ENTRIES, CopyUnicodeString(), GSM_SubMemoryEntry::Date, dbgprintf, DecodeBASE64(), DecodeUnicodeString(), GSM_MemoryEntry::Entries, GSM_MemoryEntry::EntriesNum, GSM_SubMemoryEntry::EntryType, ERR_EMPTY, ERR_MOREMEMORY, ERR_NONE, GSM_GetVCSLine(), GSM_StringToMemoryType(), GSM_TweakInternationalNumber(), GSM_BinaryPicture::Length, GSM_SubMemoryEntry::Location, GSM_MemoryEntry::Location, MEM_MT, GSM_MemoryEntry::MemoryType, GSM_SubMemoryEntry::Number, NUMBER_INTERNATIONAL_NUMBERING_PLAN_ISDN, PBK_Caller_Group, PBK_Category, PBK_Date, PBK_LastModified, PBK_Location_Unknown, PBK_Number_Fax, PBK_Number_General, PBK_Number_Mobile, PBK_Number_Other, PBK_Number_Video, PBK_Photo, PBK_Private, PBK_PushToTalkID, PBK_Text_City, PBK_Text_Company, PBK_Text_Country, PBK_Text_DTMF, PBK_Text_Email, PBK_Text_FirstName, PBK_Text_FormalName, PBK_Text_JobTitle, PBK_Text_LastName, PBK_Text_LUID, PBK_Text_Name, PBK_Text_NamePrefix, PBK_Text_NameSuffix, PBK_Text_NickName, PBK_Text_Note, PBK_Text_Postal, PBK_Text_SIP, PBK_Text_State, PBK_Text_StreetAddress, PBK_Text_SWIS, PBK_Text_URL, PBK_Text_VOIP, PBK_Text_WVID, PBK_Text_Zip, GSM_SubMemoryEntry::Picture, PICTURE_JPG, ReadVCALDateTime(), ReadVCALText(), GSM_SubMemoryEntry::SMSList, SonyEricsson_VCard21_Phone, GSM_SubMemoryEntry::Text, TRUE, GSM_BinaryPicture::Type, UnicodeLength(), VCALGetTextPart(), and GSM_SubMemoryEntry::VoiceTag.
GSM_Error GSM_DeleteAllMemory | ( | GSM_StateMachine * | s, |
GSM_MemoryType | MemoryType | ||
) |
Deletes all memory (phonebooks or calls) entries of specified type.
s | State machine pointer. |
MemoryType | Where to delete all entries. |
Deletes all memory (phonebooks or calls) entries of specified type.
Definition at line 589 of file api.c.
References CHECK_PHONE_CONNECTION, GSM_Phone_Functions::DeleteAllMemory, GSM_Phone::Functions, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.
GSM_Error GSM_DeleteMemory | ( | GSM_StateMachine * | s, |
GSM_MemoryEntry * | entry | ||
) |
Deletes memory (phonebooks or calls) entry.
s | State machine pointer. |
entry | Entry to delete, Location and MemoryType has to be set. |
Deletes memory (phonebooks or calls) entry.
Definition at line 575 of file api.c.
References CHECK_PHONE_CONNECTION, GSM_Phone_Functions::DeleteMemory, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, PRINT_MEMORY_INFO, and RUN_RESTARTABLE.
GSM_Error GSM_EncodeVCARD | ( | GSM_Debug_Info * | di, |
char * | Buffer, | ||
const size_t | buff_len, | ||
size_t * | Pos, | ||
GSM_MemoryEntry * | pbk, | ||
const gboolean | header, | ||
const GSM_VCardVersion | Version | ||
) |
Encodes memory entry to vCard.
di | Pointer to debugging description. | |
[out] | Buffer | Buffer to store vCard text. |
[in] | buff_len | Size of output buffer. |
[in,out] | Pos | Position in output buffer. |
[in,out] | pbk | Phonebook data, AddError will be set on non converted entries. |
[in] | header | Whether to include vCard header in output. |
[in] | Version | What vCard version to create. |
Definition at line 126 of file gsmpbk.c.
References GSM_SubMemoryEntry::AddError, GSM_BinaryPicture::Buffer, CopyUnicodeString(), GSM_SubMemoryEntry::Date, DecodeUnicodeString(), GSM_MemoryEntry::Entries, GSM_MemoryEntry::EntriesNum, GSM_SubMemoryEntry::EntryType, ERR_NONE, ERR_NOTSUPPORTED, FALSE, GSM_MemoryTypeToString, GSM_PhonebookFindDefaultNameNumberGroup(), GSM_BinaryPicture::Length, GSM_SubMemoryEntry::Location, GSM_MemoryEntry::Location, GSM_MemoryEntry::MemoryType, Nokia_VCard10, Nokia_VCard21, GSM_SubMemoryEntry::Number, PBK_Caller_Group, PBK_CallLength, PBK_Category, PBK_Date, PBK_LastModified, PBK_Location_Home, PBK_Location_Unknown, PBK_Location_Work, PBK_Number_Fax, PBK_Number_General, PBK_Number_Messaging, PBK_Number_Mobile, PBK_Number_Other, PBK_Number_Pager, PBK_Number_Video, PBK_Photo, PBK_PictureID, PBK_Private, PBK_PushToTalkID, PBK_RingtoneID, PBK_Text_City, PBK_Text_Company, PBK_Text_Country, PBK_Text_Custom1, PBK_Text_Custom2, PBK_Text_Custom3, PBK_Text_Custom4, PBK_Text_DTMF, PBK_Text_Email, PBK_Text_Email2, PBK_Text_FirstName, PBK_Text_FormalName, PBK_Text_JobTitle, PBK_Text_LastName, PBK_Text_LUID, PBK_Text_Name, PBK_Text_NamePrefix, PBK_Text_NameSuffix, PBK_Text_NickName, PBK_Text_Note, PBK_Text_PictureName, PBK_Text_Postal, PBK_Text_SecondName, PBK_Text_SIP, PBK_Text_State, PBK_Text_StreetAddress, PBK_Text_SWIS, PBK_Text_URL, PBK_Text_UserID, PBK_Text_VOIP, PBK_Text_WVID, PBK_Text_Zip, GSM_SubMemoryEntry::Picture, PICTURE_BMP, PICTURE_GIF, PICTURE_ICN, PICTURE_JPG, PICTURE_PNG, smfprintf(), SonyEricsson_VCard10, SonyEricsson_VCard21, SonyEricsson_VCard21_Phone, GSM_SubMemoryEntry::Text, TRUE, GSM_BinaryPicture::Type, UnicodeLength(), VC_Store(), VC_StoreBase64(), VC_StoreDate(), VC_StoreDateTime(), VC_StoreLine(), and VC_StoreText().
Referenced by GSM_EncodeMultiPartSMS().
GSM_Error GSM_GetMemory | ( | GSM_StateMachine * | s, |
GSM_MemoryEntry * | entry | ||
) |
Reads entry from memory (phonebooks or calls). Which entry should be read is defined in entry.
s | State machine pointer. |
entry | Storage for retrieved entry, MemoryType and Location has to be set. |
Reads entry from memory (phonebooks or calls). Which entry should be read is defined in entry.
Definition at line 517 of file api.c.
References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, GSM_Phone_Functions::GetMemory, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and PRINT_MEMORY_INFO.
GSM_Error GSM_GetMemoryStatus | ( | GSM_StateMachine * | s, |
GSM_MemoryStatus * | status | ||
) |
Gets memory (phonebooks or calls) status (eg. number of used and free entries).
s | State machine pointer. |
status | Storage for status information, MemoryType has to be set. |
Gets memory (phonebooks or calls) status (eg. number of used and free entries).
Definition at line 503 of file api.c.
References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, GSM_Phone_Functions::GetMemoryStatus, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.
GSM_Error GSM_GetNextMemory | ( | GSM_StateMachine * | s, |
GSM_MemoryEntry * | entry, | ||
gboolean | start | ||
) |
Reads entry from memory (phonebooks or calls). Which entry should be read is defined in entry. This can be easily used for reading all entries.
s | State machine pointer. |
entry | Storage for retrieved entry. MemoryType has to be set for first call (with start set to TRUE), for subsequent calls Location has to stay intact from previous reading. |
start | Whether we should start from beginning. |
Reads entry from memory (phonebooks or calls). Which entry should be read is defined in entry. This can be easily used for reading all entries.
Definition at line 532 of file api.c.
References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, GSM_Phone_Functions::GetNextMemory, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, PRINT_MEMORY_INFO, and PRINT_START.
GSM_Error GSM_GetSpeedDial | ( | GSM_StateMachine * | s, |
GSM_SpeedDial * | Speed | ||
) |
Gets speed dial.
s | State machine pointer. |
Speed | Storage for speed dial, Location has to be set. |
Gets speed dial.
Definition at line 602 of file api.c.
References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, GSM_Phone_Functions::GetSpeedDial, _GSM_StateMachine::Phone, and PRINT_LOG_ERROR.
void GSM_PhonebookFindDefaultNameNumberGroup | ( | const GSM_MemoryEntry * | entry, |
int * | Name, | ||
int * | Number, | ||
int * | Group | ||
) |
Finds default name, number and group for entry.
entry | Entry to process. |
Name | Output index of name. |
Number | Output index of number. |
Group | Output index of group. |
Definition at line 78 of file gsmpbk.c.
References GSM_MemoryEntry::Entries, GSM_MemoryEntry::EntriesNum, GSM_SubMemoryEntry::EntryType, PBK_Caller_Group, PBK_Number_Fax, PBK_Number_General, PBK_Number_Mobile, PBK_Number_Other, PBK_Number_Pager, PBK_Text_FirstName, PBK_Text_LastName, and PBK_Text_Name.
Referenced by GSM_EncodeVCARD().
unsigned char* GSM_PhonebookGetEntryName | ( | const GSM_MemoryEntry * | entry | ) |
Returns name of entry. It might be possibly concatenated from first and last names.
entry | Entry to process. |
Definition at line 33 of file gsmpbk.c.
References CopyUnicodeString(), GSM_MemoryEntry::Entries, GSM_MemoryEntry::EntriesNum, GSM_SubMemoryEntry::EntryType, GSM_PHONEBOOK_TEXT_LENGTH, PBK_Text_FirstName, PBK_Text_LastName, PBK_Text_Name, GSM_SubMemoryEntry::Text, and UnicodeLength().
GSM_Error GSM_SetMemory | ( | GSM_StateMachine * | s, |
GSM_MemoryEntry * | entry | ||
) |
Sets memory (phonebooks or calls) entry.
s | State machine pointer. |
entry | Entry to set, Location and MemoryType has to be set. |
Sets memory (phonebooks or calls) entry.
Definition at line 547 of file api.c.
References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, PRINT_MEMORY_INFO, RUN_RESTARTABLE, and GSM_Phone_Functions::SetMemory.
GSM_Error GSM_SetSpeedDial | ( | GSM_StateMachine * | s, |
GSM_SpeedDial * | Speed | ||
) |
Sets speed dial.
s | State machine pointer. |
Speed | Sspeed dial to set. |
Sets speed dial.
Definition at line 615 of file api.c.
References CHECK_PHONE_CONNECTION, GSM_Phone::Functions, _GSM_StateMachine::Phone, PRINT_LOG_ERROR, and GSM_Phone_Functions::SetSpeedDial.