Gammu internals
1.38.0
|
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include <time.h>
#include <gammu-nokia.h>
#include "../../gsmstate.h"
#include "../../gsmphones.h"
#include "../../misc/coding/coding.h"
#include "../../misc/locales.h"
#include "../../service/gsmnet.h"
#include "../../service/gsmlogo.h"
#include "../../service/gsmcal.h"
#include "../pfunc.h"
#include "nfunc.h"
Go to the source code of this file.
Functions | |
size_t | N71_65_PackPBKBlock (GSM_StateMachine *s, int id, size_t size, int no, unsigned char *buf, unsigned char *block) |
size_t | N71_65_EncodePhonebookFrame (GSM_StateMachine *s, unsigned char *req, GSM_MemoryEntry *entry, size_t *block2, gboolean DCT4, gboolean VoiceTag) |
static gboolean | N71_65_PB_CopyString (GSM_StateMachine *s, GSM_MemoryEntry *entry, const unsigned char *src, unsigned char length) |
GSM_Error | N71_65_DecodePhonebook (GSM_StateMachine *s, GSM_MemoryEntry *entry, GSM_Bitmap *bitmap, GSM_SpeedDial *speed, unsigned char *MessageBuffer, int MessageLength, gboolean DayMonthReverse) |
void | NOKIA_GetDefaultCallerGroupName (GSM_Bitmap *Bitmap) |
void | NOKIA_DecodeDateTime (GSM_StateMachine *s, unsigned char *buffer, GSM_DateTime *datetime, gboolean seconds, gboolean DayMonthReverse) |
void | NOKIA_EncodeDateTime (GSM_StateMachine *s UNUSED, unsigned char *buffer, GSM_DateTime *datetime) |
Variables | |
unsigned char | N71_65_MEMORY_TYPES [] |
GSM_Error N71_65_DecodePhonebook | ( | GSM_StateMachine * | s, |
GSM_MemoryEntry * | entry, | ||
GSM_Bitmap * | bitmap, | ||
GSM_SpeedDial * | speed, | ||
unsigned char * | MessageBuffer, | ||
int | MessageLength, | ||
gboolean | DayMonthReverse | ||
) |
Decodes nokia phonebook.
Definition at line 364 of file nfunc.c.
References GSM_SubMemoryEntry::AddError, GSM_Bitmap::BitmapEnabled, GSM_SubMemoryEntry::CallLength, CheckDate(), CopyUnicodeString(), GSM_Phone::Data, GSM_SubMemoryEntry::Date, DecodeUnicodeString(), GSM_Bitmap::DefaultBitmap, GSM_Bitmap::DefaultName, GSM_Bitmap::DefaultRingtone, _GSM_StateMachine::di, _GSM_Debug_Info::dl, DL_TEXTALL, DL_TEXTALLDATE, DumpMessage(), EncodeUnicode(), GSM_MemoryEntry::Entries, GSM_MemoryEntry::EntriesNum, GSM_SubMemoryEntry::EntryType, ERR_EMPTY, ERR_MOREMEMORY, ERR_NONE, ERR_UNKNOWNRESPONSE, F_6230iCALLER, FALSE, GSM_Bitmap::FileSystemPicture, GSM_Bitmap::FileSystemRingtone, GSM_GetDI(), GSM_IsPhoneFeatureAvailable(), GSM_NokiaCallerLogo, GSM_PHONEBOOK_ENTRIES, GSM_PHONEBOOK_TEXT_LENGTH, GSM_SubMemoryEntry::Location, MEM6510_CG2, MEM7110_CG, MEM7110_SP, MEM_ME, MEM_SM, GSM_SpeedDial::MemoryLocation, GSM_SpeedDial::MemoryNumberID, GSM_MemoryEntry::MemoryType, GSM_SpeedDial::MemoryType, GSM_Phone_Data::ModelInfo, N2630_PBK_FAVMESSAGING, N3600_PBK_UNKNOWN1, N6303_PBK_UNKNOWN1, N6303_PBK_UNKNOWN2, N6510_PBK_GROUP2_ID, N6510_PBK_PICTURE_ID, N6510_PBK_PUSHTOTALK_ID, N6510_PBK_RINGTONEFILE_ID, N6510_PBK_SMSLIST_ID, N6510_PBK_UNKNOWN2, N6510_PBK_UNKNOWN3, N6510_PBK_UNKNOWN4, N6510_PBK_UNKNOWN5, N6510_PBK_URL, N6510_PBK_USER_ID, N6510_PBK_VOICETAG_ID, N7110_PBK_DATETIME, N7110_PBK_EMAIL, N7110_PBK_GROUP, N7110_PBK_GROUPLOGO, N7110_PBK_LOGOON, N7110_PBK_MISSED, N7110_PBK_NAME, N7110_PBK_NOTE, N7110_PBK_NUMBER, N7110_PBK_NUMBER_FAX, N7110_PBK_NUMBER_GENERAL, N7110_PBK_NUMBER_HOME, N7110_PBK_NUMBER_MOBILE, N7110_PBK_NUMBER_WORK, N7110_PBK_POSTAL, N7110_PBK_RINGTONE_ID, N7110_PBK_SIM_SPEEDDIAL, N7110_PBK_SPEEDDIAL, N7110_PBK_UNKNOWN2, N7110_PBK_UNKNOWN3, N71_65_PB_CopyString(), NOKIA_DecodeDateTime(), GSM_SubMemoryEntry::Number, PBK_Caller_Group, PBK_CallLength, PBK_Date, PBK_Location_Home, PBK_Location_Unknown, PBK_Location_Work, PBK_Number_Fax, PBK_Number_General, PBK_Number_Messaging, PBK_Number_Mobile, PBK_PictureID, PBK_PushToTalkID, PBK_RingtoneID, PBK_Text_City, PBK_Text_Company, PBK_Text_Country, PBK_Text_Custom1, PBK_Text_Email, PBK_Text_FirstName, PBK_Text_FormalName, PBK_Text_JobTitle, PBK_Text_LastName, PBK_Text_Name, PBK_Text_NickName, PBK_Text_Note, PBK_Text_Postal, PBK_Text_State, PBK_Text_StreetAddress, PBK_Text_URL, PBK_Text_UserID, _GSM_StateMachine::Phone, PHONE_DecodeBitmap(), GSM_Bitmap::PictureID, GSM_Bitmap::RingtoneID, S4030_PBK_BIRTHDAY, S4030_PBK_CALLLENGTH, S4030_PBK_COMPANY, S4030_PBK_FIRSTNAME, S4030_PBK_FORMALNAME, S4030_PBK_JOBTITLE, S4030_PBK_LASTNAME, S4030_PBK_NICKNAME, S4030_PBK_POSTAL, S4030_PBK_POSTAL_CITY, S4030_PBK_POSTAL_COUNTRY, S4030_PBK_POSTAL_EXTADDRESS, S4030_PBK_POSTAL_POSTAL, S4030_PBK_POSTAL_STATE, S4030_PBK_POSTAL_STREET, smprintf(), GSM_SubMemoryEntry::SMSList, GSM_Bitmap::Text, GSM_SubMemoryEntry::Text, TRUE, and GSM_SubMemoryEntry::VoiceTag.
size_t N71_65_EncodePhonebookFrame | ( | GSM_StateMachine * | s, |
unsigned char * | req, | ||
GSM_MemoryEntry * | entry, | ||
size_t * | block2, | ||
gboolean | DCT4, | ||
gboolean | VoiceTag | ||
) |
Definition at line 54 of file nfunc.c.
References GSM_SubMemoryEntry::AddError, CopyUnicodeString(), GSM_Phone::Data, GSM_SubMemoryEntry::Date, GSM_MemoryEntry::Entries, GSM_MemoryEntry::EntriesNum, GSM_SubMemoryEntry::EntryType, ERR_DATACONVERTED, ERR_INVALIDDATA, ERR_NONE, ERR_NOTSUPPORTED, F_6230iCALLER, F_PBK35, F_PBKFAVORITEMESSAGE, F_PBKIMG, F_PBKNOPOSTAL, F_PBKUSER, F_SERIES40_30, FALSE, GSM_IsPhoneFeatureAvailable(), GSM_SubMemoryEntry::Location, MIN, GSM_Phone_Data::ModelInfo, mywstrncmp(), N2630_PBK_FAVMESSAGING, N6510_PBK_GROUP2_ID, N6510_PBK_PICTURE_ID, N6510_PBK_PUSHTOTALK_ID, N6510_PBK_SMSLIST_ID, N6510_PBK_URL, N6510_PBK_USER_ID, N6510_PBK_VOICETAG_ID, N7110_PBK_EMAIL, N7110_PBK_GROUP, N7110_PBK_NAME, N7110_PBK_NOTE, N7110_PBK_NUMBER, N7110_PBK_NUMBER_FAX, N7110_PBK_NUMBER_GENERAL, N7110_PBK_NUMBER_HOME, N7110_PBK_NUMBER_MOBILE, N7110_PBK_NUMBER_WORK, N7110_PBK_POSTAL, N7110_PBK_RINGTONE_ID, N71_65_PackPBKBlock(), NOKIA_EncodeDateTime(), GSM_SubMemoryEntry::Number, PBK_Caller_Group, PBK_Date, PBK_Location_Home, PBK_Location_Work, PBK_Number_Fax, PBK_Number_General, PBK_Number_Messaging, PBK_Number_Mobile, PBK_PictureID, PBK_PushToTalkID, PBK_RingtoneID, PBK_Text_Company, PBK_Text_Email, PBK_Text_Email2, PBK_Text_FirstName, PBK_Text_FormalName, PBK_Text_JobTitle, PBK_Text_LastName, PBK_Text_Name, PBK_Text_NickName, PBK_Text_Note, PBK_Text_Postal, PBK_Text_URL, PBK_Text_UserID, _GSM_StateMachine::Phone, S4030_PBK_BIRTHDAY, S4030_PBK_COMPANY, S4030_PBK_FIRSTNAME, S4030_PBK_FORMALNAME, S4030_PBK_JOBTITLE, S4030_PBK_LASTNAME, S4030_PBK_NICKNAME, smprintf(), GSM_SubMemoryEntry::SMSList, GSM_SubMemoryEntry::Text, TRUE, UnicodeLength(), and GSM_SubMemoryEntry::VoiceTag.
size_t N71_65_PackPBKBlock | ( | GSM_StateMachine * | s, |
int | id, | ||
size_t | size, | ||
int | no, | ||
unsigned char * | buf, | ||
unsigned char * | block | ||
) |
Definition at line 36 of file nfunc.c.
References smprintf().
Referenced by N71_65_EncodePhonebookFrame().
|
static |
Copy string to GSM_MemoryEntry
Return false on failure
Definition at line 336 of file nfunc.c.
References DecodeUnicodeString(), GSM_MemoryEntry::Entries, GSM_MemoryEntry::EntriesNum, FALSE, GSM_PHONEBOOK_TEXT_LENGTH, smprintf(), GSM_SubMemoryEntry::Text, and TRUE.
Referenced by N71_65_DecodePhonebook().
void NOKIA_DecodeDateTime | ( | GSM_StateMachine * | s, |
unsigned char * | buffer, | ||
GSM_DateTime * | datetime, | ||
gboolean | seconds, | ||
gboolean | DayMonthReverse | ||
) |
Definition at line 976 of file nfunc.c.
References GSM_DateTime::Day, GSM_DateTime::Hour, GSM_DateTime::Minute, GSM_DateTime::Month, GSM_DateTime::Second, smprintf(), GSM_DateTime::Timezone, and GSM_DateTime::Year.
Referenced by N71_65_DecodePhonebook().
void NOKIA_EncodeDateTime | ( | GSM_StateMachine *s | UNUSED, |
unsigned char * | buffer, | ||
GSM_DateTime * | datetime | ||
) |
Definition at line 1007 of file nfunc.c.
References _, GSM_MultiWAPSettings::Active, GSM_WAPBookmark::Address, GSM_Protocol_Message::Buffer, GSM_Phone_Data::Cal, CAL_PHONE, CAL_REPEAT_DAY, CAL_REPEAT_FREQUENCY, CAL_REPEAT_MONTH, CAL_SILENT_ALARM_DATETIME, CAL_START_DATETIME, CAL_TEXT, CAL_TONE_ALARM_DATETIME, GSM_Profile::CallerGroups, GSM_Call::CallID, GSM_Phone_Data::CallID, GSM_Call::CallIDAvailable, GSM_CallDivert::CallType, CopyUnicodeString(), D_TEXT, GSM_Phone::Data, GSM_SubCalendarEntry::Date, GSM_DateTime::Day, DCT3DCT4_AnswerCall(), DCT3DCT4_CancelAllDiverts(), DCT3DCT4_CancelCall(), DCT3DCT4_DeleteWAPBookmarkPart(), DCT3DCT4_DisableConnectionFunctions(), DCT3DCT4_EnableWAPFunctions(), DCT3DCT4_GetActiveConnectSet(), DCT3DCT4_GetCallDivert(), DCT3DCT4_GetFirmware(), DCT3DCT4_GetModel(), DCT3DCT4_GetWAPBookmarkPart(), DCT3DCT4_ReplyCallDivert(), DCT3DCT4_ReplyDelWAPBookmark(), DCT3DCT4_ReplyDisableConnectFunc(), DCT3DCT4_ReplyEnableConnectFunc(), DCT3DCT4_ReplyGetActiveConnectSet(), DCT3DCT4_ReplyGetModelFirmware(), DCT3DCT4_ReplyGetWAPBookmark(), DCT3DCT4_ReplySetActiveConnectSet(), DCT3DCT4_ReplySetWAPBookmark(), DCT3DCT4_SendDTMF(), DCT3DCT4_SetActiveConnectSet(), DCT3DCT4_SetCallDivert(), DecodeUnicodeString(), GSM_Profile::DefaultName, _GSM_StateMachine::di, GSM_Phone_Data::Divert, GSM_CallDivert::DivertType, GSM_Phone_Data::EnableIncomingCall, GSM_Phone_Data::EnableIncomingSMS, GSM_Phone_Data::EnableIncomingUSSD, EncodeUnicode(), GSM_MultiCallDivert::Entries, GSM_CalendarEntry::Entries, GSM_MultiCallDivert::EntriesNum, GSM_CalendarEntry::EntriesNum, GSM_MemoryEntry::EntriesNum, GSM_SubCalendarEntry::EntryType, ERR_BUG, ERR_BUSY, ERR_EMPTY, ERR_FULL, ERR_INSIDEPHONEMENU, ERR_INVALIDLOCATION, ERR_MEMORY, ERR_MOREMEMORY, ERR_NEEDANOTHERANSWER, ERR_NONE, ERR_NOTIMPLEMENTED, ERR_NOTSUPPORTED, ERR_PERMISSION, ERR_SECURITYERROR, ERR_UNKNOWN, ERR_UNKNOWNRESPONSE, ERR_WORKINPROGRESS, F_CAL35, F_CAL62, F_CAL65, F_NOCALLINFO, F_NODTMF, F_NOWAP, FALSE, GSM_Profile::FeatureID, GSM_Profile::FeaturesNumber, GSM_Profile::FeatureValue, Fill_Time_T(), FreeLines(), GSM_Protocol::Functions, GSM_Phone::Functions, GSM_Phone_Functions::GetDateTime, GetLineString(), GetModelData(), GetTimeDifference(), GSM_CAL_BIRTHDAY, GSM_CAL_CALL, GSM_CAL_MEETING, GSM_CAL_MEMO, GSM_CAL_REMINDER, GSM_CalendarFindDefaultTextTimeAlarmPhone(), GSM_CALL_CallEstablished, GSM_CALL_CallHeld, GSM_CALL_CallLocalEnd, GSM_CALL_CallRemoteEnd, GSM_CALL_CallResumed, GSM_CALL_CallStart, GSM_CALL_CallSwitched, GSM_CALL_IncomingCall, GSM_CALL_OutgoingCall, GSM_CreateFirmwareNumber(), GSM_DIVERT_AllCalls, GSM_DIVERT_AllTypes, GSM_DIVERT_Busy, GSM_DIVERT_DataCalls, GSM_DIVERT_FaxCalls, GSM_DIVERT_NoAnswer, GSM_DIVERT_OutOfReach, GSM_DIVERT_VoiceCalls, GSM_GetCalendarRecurranceRepeat(), GSM_GetCurrentDateTime(), GSM_IsPhoneFeatureAvailable(), GSM_MAXCALENDARTODONOTES, GSM_PackSemiOctetNumber(), GSM_SetCalendarRecurranceRepeat(), GSM_UnpackSemiOctetNumber(), GSM_WaitFor(), GSM_DateTime::Hour, GSM_Profile_PhoneTableValue::ID, ID_AnswerCall, ID_CancelCall, ID_DeleteCalendarNote, ID_DeleteWAPBookmark, ID_DialVoice, ID_DisableConnectFunc, ID_Divert, ID_EnableConnectFunc, ID_GetCalendarNote, ID_GetCalendarNotePos, ID_GetCalendarNotesInfo, ID_GetConnectSet, ID_GetFirmware, ID_GetModel, ID_GetWAPBookmark, ID_SendDTMF, ID_SetCalendarNote, ID_SetConnectSet, _GSM_User::IncomingCall, _GSM_User::IncomingCallUserData, _GSM_User::IncomingUSSD, _GSM_User::IncomingUSSDUserData, InitLines(), GSM_Protocol_Message::Length, GSM_WAPBookmark::Location, GSM_NOKIASMSFolder::Location, GSM_NOKIACalToDoLocations::Location, GSM_Profile::Location, GSM_MultiWAPSettings::Location, GSM_CalendarEntry::Location, GSM_Phone_Data::Manufacturer, MEM_ME, MEM_SM, GSM_Phone_Data::Memory, GSM_MemoryEntry::MemoryType, GSM_DateTime::Minute, GSM_Phone_Data::Model, GSM_Phone_Data::ModelInfo, GSM_DateTime::Month, N6110_FRAME_HEADER, N71_65_AddCalendar1(), N71_65_AddCalendar2(), N71_65_DelCalendar(), N71_65_EnableFunctions(), N71_65_FindCalendarType(), N71_65_GetCalendarInfo1(), N71_65_GetNextCalendar1(), N71_65_ReplyAddCalendar1(), N71_65_ReplyAddCalendar2(), N71_65_ReplyCallInfo(), N71_65_ReplyDelCalendar(), N71_65_ReplyGetCalendarInfo1(), N71_65_ReplyGetCalendarNotePos1(), N71_65_ReplyGetMemoryError(), N71_65_ReplyGetNextCalendar1(), N71_65_ReplySendDTMF(), N71_65_ReplyUSSDInfo(), N71_65_ReplyWritePhonebook(), GSM_Profile::Name, NOKIA_DecodeSMSState(), NOKIA_FindFeatureValue(), NOKIA_FindPhoneFeatureValue(), NOKIA_GetDefaultProfileName(), NOKIA_GetManufacturer(), NOKIA_GetMemoryType(), NOKIA_GetPhoneString(), NOKIA_GetUnicodeString(), NOKIA_ReplyGetPhoneString(), NOKIA_SetIncomingCall(), NOKIA_SetIncomingSMS(), NOKIA_SetIncomingUSSD(), NOKIA_SetUnicodeString(), NOKIA_SortSMSFolderStatus(), GSM_NOKIASMSFolder::Number, GSM_NOKIACalToDoLocations::Number, GSM_CallDivert::Number, GSM_SubCalendarEntry::Number, _GSM_StateMachine::Phone, GSM_Profile_PhoneTableValue::PhoneID, GSM_Call::PhoneNumber, GSM_Phone_Data::PhoneString, GSM_Profile_PhoneTableValue::PhoneValue, GSM_Phone_Data::Profile, Profile71_65, Profile_AutoAnswer, PROFILE_AUTOANSWER_OFF, PROFILE_AUTOANSWER_ON, Profile_CallAlert, PROFILE_CALLALERT_ASCENDING, PROFILE_CALLALERT_BEEPONCE, PROFILE_CALLALERT_OFF, PROFILE_CALLALERT_RINGING, PROFILE_CALLALERT_RINGONCE, Profile_CallerGroups, PROFILE_KEYPAD_LEVEL1, PROFILE_KEYPAD_LEVEL2, PROFILE_KEYPAD_LEVEL3, PROFILE_KEYPAD_OFF, Profile_KeypadTone, Profile_Lights, PROFILE_MESSAGE_ASCENDING, PROFILE_MESSAGE_BEEPONCE, PROFILE_MESSAGE_NOTONE, PROFILE_MESSAGE_SPECIAL, PROFILE_MESSAGE_STANDARD, Profile_MessageTone, Profile_RingtoneVolume, Profile_ScreenSaver, Profile_ScreenSaverTime, Profile_Vibration, PROFILE_VIBRATION_OFF, PROFILE_VIBRATION_ON, PROFILE_VOLUME_LEVEL1, PROFILE_VOLUME_LEVEL2, PROFILE_VOLUME_LEVEL3, PROFILE_VOLUME_LEVEL4, PROFILE_VOLUME_LEVEL5, PROFILE_WARNING_OFF, PROFILE_WARNING_ON, Profile_WarningTone, _GSM_StateMachine::Protocol, GSM_Phone_Data::RequestID, GSM_DateTime::Second, smprintf(), smprintf_level(), SMS_Read, SMS_Sent, SMS_UnRead, SMS_UnSent, SplitLines(), GSM_Phone_Data::StartPhoneString, GSM_SMSMessage::State, GSM_Call::Status, GSM_USSDMessage::Status, GSM_Call::StatusCode, GSM_USSDMessage::Text, GSM_SubCalendarEntry::Text, GSM_CallDivert::Timeout, GSM_WAPBookmark::Title, TRUE, GSM_CalendarEntry::Type, UnicodeLength(), UNUSED, _GSM_StateMachine::User, USSD_Unknown, GSM_Profile_PhoneTableValue::Value, GSM_Phone_Data::VerDate, GSM_Phone_Data::Version, GSM_Phone_Data::WAPBookmark, GSM_Phone_Data::WAPSettings, GSM_Protocol_Functions::WriteMessage, and GSM_DateTime::Year.
Referenced by N71_65_EncodePhonebookFrame().
unsigned char N71_65_MEMORY_TYPES[] |