-rw-r--r-- | gammu/emb/common/phone/alcatel/alcatel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gammu/emb/common/phone/alcatel/alcatel.c b/gammu/emb/common/phone/alcatel/alcatel.c index b75077f..718d91e 100644 --- a/gammu/emb/common/phone/alcatel/alcatel.c +++ b/gammu/emb/common/phone/alcatel/alcatel.c @@ -1,155 +1,155 @@ /* (c) 2002-2004 by Michal Cihar */ /* * High level functions for communication with Alcatel One Touch 501 and * compatible mobile phone. * * This code implements functions to communicate with Alcatel phones, * currently seem to work: * - BE5 series (501/701) * - BF5 series (715) * - BH4 series (535/735) * For some functions it uses normal AT mode (not implemented here, look at * ../at/atgen.[ch]) for others it switches into binary mode and initialises * underlaying protocol (see ../../protocol/alcatel/alcabus.[ch]) and * communicates over it. Don't ask me why Alcatel uses such silly thing... * * Notes for future features: * - max phone number length is 61 (BE5) * - max name length is 50 (BE5) */ #include "../../gsmstate.h" #ifdef GSM_ENABLE_ALCATEL #ifdef GSM_ENABLE_ATGEN #include <string.h> #include <time.h> #include "../../gsmcomon.h" #include "../../misc/coding/coding.h" #include "../../misc/misc.h" #include "../../service/sms/gsmsms.h" #include "../pfunc.h" #include "alcatel.h" /* Timeout for GSM_WaitFor calls. */ #define ALCATEL_TIMEOUT 64 /* Some magic numbers for protocol follow */ /* synchronisation types (for everything except begin transfer): */ #define ALCATEL_SYNC_TYPE_CALENDAR 0x64 #define ALCATEL_SYNC_TYPE_TODO 0x68 #define ALCATEL_SYNC_TYPE_CONTACTS 0x6C /* synchronisation types (for begin transfer): */ #define ALCATEL_BEGIN_SYNC_CALENDAR 0x00 #define ALCATEL_BEGIN_SYNC_TODO 0x02 #define ALCATEL_BEGIN_SYNC_CONTACTS 0x01 /* category types */ #define ALCATEL_LIST_TODO_CAT 0x9B #define ALCATEL_LIST_CONTACTS_CAT 0x96 /* We need lot of ATGEN functions, because Alcatel is an AT device. */ -extern GSM_Reply_Function ALCATELReplyFunctions[]; +static GSM_Reply_Function ALCATELReplyFunctions[]; extern GSM_Reply_Function ATGENReplyFunctions[]; extern GSM_Error ATGEN_Initialise (GSM_StateMachine *s); extern GSM_Error ATGEN_Terminate (GSM_StateMachine *s); extern GSM_Error ATGEN_GetIMEI (GSM_StateMachine *s); extern GSM_Error ATGEN_GetFirmware (GSM_StateMachine *s); extern GSM_Error ATGEN_GetModel (GSM_StateMachine *s); extern GSM_Error ATGEN_GetDateTime (GSM_StateMachine *s, GSM_DateTime *date_time); extern GSM_Error ATGEN_GetMemory (GSM_StateMachine *s, GSM_MemoryEntry *entry); extern GSM_Error ATGEN_GetNextMemory (GSM_StateMachine *s, GSM_MemoryEntry *entry, bool start); extern GSM_Error ATGEN_SetMemory (GSM_StateMachine *s, GSM_MemoryEntry *entry); extern GSM_Error ATGEN_AddMemory (GSM_StateMachine *s, GSM_MemoryEntry *entry); extern GSM_Error ATGEN_DeleteMemory (GSM_StateMachine *s, GSM_MemoryEntry *entry); extern GSM_Error ATGEN_GetMemoryStatus (GSM_StateMachine *s, GSM_MemoryStatus *Status); extern GSM_Error ATGEN_GetSMSC (GSM_StateMachine *s, GSM_SMSC *smsc); extern GSM_Error ATGEN_SetSMSC (GSM_StateMachine *s, GSM_SMSC *smsc); extern GSM_Error ATGEN_GetSMSFolders (GSM_StateMachine *s, GSM_SMSFolders *folders); extern GSM_Error ATGEN_GetSMSStatus (GSM_StateMachine *s, GSM_SMSMemoryStatus *status); extern GSM_Error ATGEN_GetSMS (GSM_StateMachine *s, GSM_MultiSMSMessage *sms); extern GSM_Error ATGEN_GetNextSMS (GSM_StateMachine *s, GSM_MultiSMSMessage *sms, bool start); extern GSM_Error ATGEN_SendSavedSMS (GSM_StateMachine *s, int Folder, int Location); extern GSM_Error ATGEN_SendSMS (GSM_StateMachine *s, GSM_SMSMessage *sms); extern GSM_Error ATGEN_DeleteSMS (GSM_StateMachine *s, GSM_SMSMessage *sms); extern GSM_Error ATGEN_AddSMS (GSM_StateMachine *s, GSM_SMSMessage *sms); extern GSM_Error ATGEN_GetBatteryCharge (GSM_StateMachine *s, GSM_BatteryCharge *bat); extern GSM_Error ATGEN_GetSignalQuality (GSM_StateMachine *s, GSM_SignalQuality *sig); extern GSM_Error ATGEN_DialVoice (GSM_StateMachine *s, char *number, GSM_CallShowNumber ShowNumber); extern GSM_Error ATGEN_AnswerCall (GSM_StateMachine *s, int ID, bool all); extern GSM_Error ATGEN_CancelCall (GSM_StateMachine *s, int ID, bool all); extern GSM_Error ATGEN_SetDateTime (GSM_StateMachine *s, GSM_DateTime *date_time); extern GSM_Error ATGEN_EnterSecurityCode (GSM_StateMachine *s, GSM_SecurityCode Code); extern GSM_Error ATGEN_GetSecurityStatus (GSM_StateMachine *s, GSM_SecurityCodeType *Status); extern GSM_Error ATGEN_ResetPhoneSettings (GSM_StateMachine *s, GSM_ResetSettingsType Type); extern GSM_Error ATGEN_SendDTMF (GSM_StateMachine *s, char *sequence); extern GSM_Error ATGEN_GetSIMIMSI (GSM_StateMachine *s, char *IMSI); extern GSM_Error ATGEN_HandleCMSError (GSM_StateMachine *s); extern GSM_Error ATGEN_GetNetworkInfo (GSM_StateMachine *s, GSM_NetworkInfo *netinfo); extern GSM_Error ATGEN_Reset (GSM_StateMachine *s, bool hard); extern GSM_Error ATGEN_PressKey (GSM_StateMachine *s, GSM_KeyCode Key, bool Press); extern GSM_Error ATGEN_GetDisplayStatus (GSM_StateMachine *s, GSM_DisplayFeatures *features); extern GSM_Error ATGEN_SetAutoNetworkLogin (GSM_StateMachine *s); extern GSM_Error ATGEN_DeleteAllMemory (GSM_StateMachine *s, GSM_MemoryType type); extern GSM_Error ATGEN_DispatchMessage (GSM_StateMachine *s); extern GSM_Error ATGEN_SetFastSMSSending (GSM_StateMachine *s, bool enable); extern GSM_Error ATGEN_SetIncomingCB (GSM_StateMachine *s, bool enable); extern GSM_Error ATGEN_SetIncomingSMS (GSM_StateMachine *s, bool enable); /** * Alcatel uses some 8-bit characters in contacts, calendar etc.. This table * attempts to decode it, it is probably not complete, here are just chars * that I found... */ unsigned char GSM_AlcatelAlphabet[] = { /* in phone unicode description */ 0x80, 0x00,0x20, /* empty */ 0x81, 0x00,0x20, /* empty */ 0x82, 0x00,0x20, /* empty */ 0x83, 0x00,0x20, /* empty */ 0x84, 0x00,0xe7, /* c cedilla */ 0x85, 0x20,0x26, /* ... */ 0x86, 0x03,0xc0, /* pi */ 0x87, 0x01,0x3e, /* l caron */ 0x88, 0x00,0xc0, /* A grave */ 0x89, 0x00,0xc1, /* A acute */ 0x8a, 0x00,0xc2, /* A circumflex */ 0x8b, 0x00,0xc3, /* A tilde */ 0x8c, 0x00,0xc8, /* E grave */ 0x8d, 0x00,0xca, /* E circumflex */ 0x8e, 0x00,0xcb, /* E diaresis */ 0x8f, 0x00,0xcc, /* I grave */ 0x90, 0x00,0xcd, /* I acute */ 0x91, 0x00,0xd0, /* ETH */ 0x92, 0x00,0xd2, /* O grave */ 0x93, 0x00,0xd3, /* O acute */ 0x94, 0x00,0xd4, /* O circumflex */ 0x95, 0x00,0xd5, /* O tilde */ 0x96, 0x00,0xd9, /* U grave */ 0x97, 0x00,0xda, /* U acute */ 0x98, 0x00,0xe1, /* a acute */ 0x99, 0x00,0xe2, /* a circumflex */ 0x9a, 0x00,0xe3, /* a tilde */ 0x9b, 0x00,0xea, /* e circumflex */ 0x9c, 0x00,0xeb, /* e diaresis */ 0x9d, 0x00,0xed, /* i acute */ 0x9e, 0x00,0xee, /* i circumflex */ 0x9f, 0x00,0xef, /* i diaresis */ 0xa0, 0x00,0xf3, /* o acute */ 0xa1, 0x00,0xf4, /* o circumflex */ 0xa2, 0x00,0xf5, /* o tilde */ 0xa3, 0x00,0xfa, /* u acute */ 0xa4, 0x00,0xa2, /* cent */ 0xa5, 0x00,0x5b, /* [ */ 0xa6, 0x01,0x59, /* r caron */ |