Diffstat (limited to 'gammu/emb/common/phone/alcatel/alcatel.c') (more/less context) (ignore whitespace changes)
-rw-r--r-- | gammu/emb/common/phone/alcatel/alcatel.c | 298 |
1 files changed, 155 insertions, 143 deletions
diff --git a/gammu/emb/common/phone/alcatel/alcatel.c b/gammu/emb/common/phone/alcatel/alcatel.c index f004ad4..3821f13 100644 --- a/gammu/emb/common/phone/alcatel/alcatel.c +++ b/gammu/emb/common/phone/alcatel/alcatel.c @@ -11,5 +11,5 @@ * - 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 + * 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... @@ -103,2 +103,3 @@ extern GSM_Error ATGEN_DeleteAllMemory (GSM_StateMachine *s, GSM_MemoryType typ 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); @@ -118,3 +119,3 @@ unsigned char GSM_AlcatelAlphabet[] = 0x83, 0x00,0x20, /* empty */ - + 0x84, 0x00,0xe7, /* c cedilla */ @@ -170,14 +171,14 @@ unsigned char GSM_AlcatelAlphabet[] = 0xb5, 0x00,0x20, /* empty */ - + 0xb6, 0x01,0x48, /* n caron */ 0xb7, 0x01,0x65, /* t caron */ - + 0xb8, 0x00,0x20, /* empty */ - + 0xb9, 0x01,0x7e, /* z caron */ 0xba, 0x01,0xe7, /* g caron */ - + 0xbb, 0x00,0x20, /* empty */ 0xbc, 0x00,0x20, /* empty */ - + 0xbd, 0x1e,0x20, /* G macron */ @@ -198,3 +199,3 @@ unsigned char GSM_AlcatelAlphabet[] = 0xcc, 0x01,0x0f, /* d caron */ - + 0xcd, 0x00,0x20, /* empty */ @@ -204,5 +205,5 @@ unsigned char GSM_AlcatelAlphabet[] = 0xd0, 0x00,0x5e, /* ^ */ - + 0xd1, 0x00,0x20, /* empty */ - + 0xd2, 0x00,0x7b, /* { */ @@ -210,7 +211,7 @@ unsigned char GSM_AlcatelAlphabet[] = 0xd4, 0x00,0x7d, /* } */ - + 0xd5, 0x00,0x20, /* empty */ - + 0xd6, 0x01,0x63, /* t cedilla */ - + 0xd7, 0x00,0x20, /* empty */ @@ -225,5 +226,5 @@ unsigned char GSM_AlcatelAlphabet[] = 0xe0, 0x00,0x20, /* empty */ - + 0xe1, 0x00,0x20, /* two candles */ /* FIXME */ - + 0xe2, 0x00,0x20, /* empty */ @@ -231,3 +232,3 @@ unsigned char GSM_AlcatelAlphabet[] = 0xe4, 0x00,0x20, /* empty */ - + 0xe5, 0x01,0xce, /* a caron */ @@ -241,8 +242,8 @@ unsigned char GSM_AlcatelAlphabet[] = 0xed, 0x00,0x20, /* some strange char :-) */ /* FIXME */ - + 0xee, 0x00,0x20, /* big key stroken */ /* FIXME */ 0xef, 0x00,0x20, /* big key */ /* FIXME */ - + 0xf0, 0x00,0x20, /* empty */ - + 0xf1, 0x00,0x31, /* 1 */ @@ -253,12 +254,12 @@ unsigned char GSM_AlcatelAlphabet[] = 0xf6, 0x26,0x6a, /* note */ - + 0xf7, 0x27,0x13, /* okay inv */ /* FIXME */ 0xf8, 0x27,0x13, /* okay */ - + 0xf9, 0x00,0x20, /* empty */ - + 0xfa, 0x00,0x20, /* key */ /* FIXME */ - + 0xfb, 0x00,0x20, /* empty */ - + 0xfc, 0x20,0xac, /* Euro */ @@ -268,3 +269,3 @@ unsigned char GSM_AlcatelAlphabet[] = 0xff, 0x00,0x20, /* empty */ - + 0x00, 0x00,0x00 @@ -317,3 +318,3 @@ static GSM_Error ALCATEL_SetBinaryMode(GSM_StateMachine *s) if (error != ERR_NONE) return error; - + error=GSM_WaitFor (s, "AT+CPROT=?\r", 11, 0x02, 4, ID_AlcatelProtocol); @@ -326,3 +327,3 @@ static GSM_Error ALCATEL_SetBinaryMode(GSM_StateMachine *s) } - + if (error == ERR_TIMEOUT && s->Speed != 19200) { @@ -330,3 +331,3 @@ static GSM_Error ALCATEL_SetBinaryMode(GSM_StateMachine *s) } - + if (error != ERR_NONE) return error; @@ -378,3 +379,3 @@ static GSM_Error ALCATEL_GoToBinaryState(GSM_StateMachine *s, GSM_Alcatel_Binary unsigned char commit_buffer[] = - {0x00, 0x04, + {0x00, 0x04, 0x00, /*type */ @@ -445,3 +446,3 @@ static GSM_Error ALCATEL_GoToBinaryState(GSM_StateMachine *s, GSM_Alcatel_Binary if (error != ERR_NONE) return error; - + switch (Priv->BinaryType) { @@ -546,2 +547,4 @@ static GSM_Error ALCATEL_SetATMode(GSM_StateMachine *s) Priv->Mode = ModeAT; + s->Phone.Data.Priv.ATGEN.PBKCharset = 0; + s->Phone.Data.Priv.ATGEN.PBKMemory = 0; @@ -630,3 +633,3 @@ static GSM_Error ALCATEL_IsIdAvailable(GSM_StateMachine *s, int id) { } - + for (i=0; i<*Priv->CurrentCount; i++) { @@ -634,3 +637,3 @@ static GSM_Error ALCATEL_IsIdAvailable(GSM_StateMachine *s, int id) { } - + return ERR_EMPTY; @@ -848,3 +851,3 @@ static GSM_Error ALCATEL_ReplyGetFieldValue(GSM_Protocol_Message msg, GSM_StateM Priv->ReturnDateTime.Second = buffer[6]; - + Priv->ReturnDateTime.Day = 0; @@ -1098,3 +1101,3 @@ static GSM_Error ALCATEL_GetCategoryText(GSM_StateMachine *s, int id) { GSM_Error error; - + if (Priv->CurrentCategoriesCache[id][0] != '\000' || Priv->CurrentCategoriesCache[id][1] != '\000') { @@ -1103,3 +1106,3 @@ static GSM_Error ALCATEL_GetCategoryText(GSM_StateMachine *s, int id) { } - + smprintf(s,"Reading category %d\n", id); @@ -1125,3 +1128,3 @@ static GSM_Error ALCATEL_GetCategoryText(GSM_StateMachine *s, int id) { if (error != ERR_NONE) return error; - + CopyUnicodeString(Priv->CurrentCategoriesCache[id], Priv->ReturnString); @@ -1215,5 +1218,5 @@ static GSM_Error ALCATEL_BuildWriteBuffer(unsigned char * buffer, GSM_Alcatel_Fi int len; - + buffer[1] = field & 0xff; - + switch(type) { @@ -1331,6 +1334,6 @@ static GSM_Error ALCATEL_CreateField(GSM_StateMachine *s, GSM_Alcatel_FieldType if (error != ERR_NONE) return error; - + error = GSM_WaitFor (s, buffer, 8 + buffer[6], 0x02, ALCATEL_TIMEOUT, ID_AlcatelCreateField); if (error != ERR_NONE) return error; - + return ERR_NONE; @@ -1344,3 +1347,3 @@ static GSM_Error ALCATEL_UpdateField(GSM_StateMachine *s, GSM_Alcatel_FieldType 0x00, /* type */ - 0x26, 0x01, + 0x26, 0x01, 0x00, 0x00, 0x00, 0x00, /* id */ @@ -1352,3 +1355,3 @@ static GSM_Error ALCATEL_UpdateField(GSM_StateMachine *s, GSM_Alcatel_FieldType smprintf(s,"Updating field (%08x.%02x)\n", id, field); - + buffer[5] = (id >> 24); @@ -1371,6 +1374,6 @@ static GSM_Error ALCATEL_UpdateField(GSM_StateMachine *s, GSM_Alcatel_FieldType if (error != ERR_NONE) return error; - + error = GSM_WaitFor (s, buffer, 12 + buffer[10], 0x02, ALCATEL_TIMEOUT, ID_AlcatelUpdateField); if (error != ERR_NONE) return error; - + return ERR_NONE; @@ -1745,3 +1748,3 @@ static GSM_Error ALCATEL_GetNextMemory(GSM_StateMachine *s, GSM_MemoryEntry *ent if (Priv->ContactsItemsCount == 0) return ERR_EMPTY; - + if (start) entry->Location = 0; @@ -1770,3 +1773,3 @@ static GSM_Error ALCATEL_AddMemory(GSM_StateMachine *s, GSM_MemoryEntry *entry) switch (entry->Entries[i].EntryType) { - case PBK_Number_General: + case PBK_Number_General: if ((error = ALCATEL_CreateField(s, Alcatel_phone, 8, entry->Entries[i].Text)) != ERR_NONE) return error; @@ -1779,3 +1782,3 @@ static GSM_Error ALCATEL_AddMemory(GSM_StateMachine *s, GSM_MemoryEntry *entry) break; - case PBK_Number_Fax: + case PBK_Number_Fax: if ((error = ALCATEL_CreateField(s, Alcatel_phone, 9, entry->Entries[i].Text)) != ERR_NONE) return error; @@ -1811,9 +1814,9 @@ static GSM_Error ALCATEL_AddMemory(GSM_StateMachine *s, GSM_MemoryEntry *entry) break; - case PBK_Text_JobTitle: + case PBK_Text_JobTitle: if ((error = ALCATEL_CreateField(s, Alcatel_string, 3, entry->Entries[i].Text)) != ERR_NONE) return error; break; - case PBK_Category: + case PBK_Category: if ((error = ALCATEL_CreateField(s, Alcatel_byte, 5, &(entry->Entries[i].Number))) != ERR_NONE) return error; break; - case PBK_Private: + case PBK_Private: if ((error = ALCATEL_CreateField(s, Alcatel_bool, 6, &(entry->Entries[i].Number))) != ERR_NONE) return error; @@ -1842,3 +1845,3 @@ static GSM_Error ALCATEL_AddMemory(GSM_StateMachine *s, GSM_MemoryEntry *entry) case PBK_Text_Custom3: - if ((error = ALCATEL_CreateField(s, Alcatel_string, 23, entry->Entries[i].Text)) != ERR_NONE) return error; + if ((error = ALCATEL_CreateField(s, Alcatel_string, 23, entry->Entries[i].Text)) != ERR_NONE) return error; break; @@ -1847,3 +1850,3 @@ static GSM_Error ALCATEL_AddMemory(GSM_StateMachine *s, GSM_MemoryEntry *entry) break; - case PBK_PictureID: + case PBK_PictureID: if (s->Phone.Data.Priv.ALCATEL.ProtocolVersion == V_1_1) { @@ -1908,5 +1911,5 @@ static GSM_Error ALCATEL_SetMemory(GSM_StateMachine *s, GSM_MemoryEntry *entry) if ((error = ALCATEL_GetFields(s, entry->Location))!= ERR_NONE) return error; - + for (i = 0; i < 26; i++) { UpdatedFields[i] = false; } - + if ((error = ALCATEL_GoToBinaryState(s, StateEdit, TypeContacts, entry->Location))!= ERR_NONE) return error; @@ -1914,24 +1917,24 @@ static GSM_Error ALCATEL_SetMemory(GSM_StateMachine *s, GSM_MemoryEntry *entry) switch (entry->Entries[i].EntryType) { - case PBK_Number_General: - UpdatedFields[8] = true; - if ((error = ALCATEL_UpdateField(s, Alcatel_phone, entry->Location, 8, entry->Entries[i].Text)) != ERR_NONE) return error; + case PBK_Number_General: + UpdatedFields[8] = true; + if ((error = ALCATEL_UpdateField(s, Alcatel_phone, entry->Location, 8, entry->Entries[i].Text)) != ERR_NONE) return error; break; - case PBK_Number_Mobile: - UpdatedFields[12] = true; - if ((error = ALCATEL_UpdateField(s, Alcatel_phone, entry->Location, 12, entry->Entries[i].Text)) != ERR_NONE) return error; + case PBK_Number_Mobile: + UpdatedFields[12] = true; + if ((error = ALCATEL_UpdateField(s, Alcatel_phone, entry->Location, 12, entry->Entries[i].Text)) != ERR_NONE) return error; break; - case PBK_Number_Work: - UpdatedFields[7] = true; - if ((error = ALCATEL_UpdateField(s, Alcatel_phone, entry->Location, 7, entry->Entries[i].Text)) != ERR_NONE) return error; + case PBK_Number_Work: + UpdatedFields[7] = true; + if ((error = ALCATEL_UpdateField(s, Alcatel_phone, entry->Location, 7, entry->Entries[i].Text)) != ERR_NONE) return error; break; - case PBK_Number_Fax: - UpdatedFields[9] = true; - if ((error = ALCATEL_UpdateField(s, Alcatel_phone, entry->Location, 9, entry->Entries[i].Text)) != ERR_NONE) return error; + case PBK_Number_Fax: + UpdatedFields[9] = true; + if ((error = ALCATEL_UpdateField(s, Alcatel_phone, entry->Location, 9, entry->Entries[i].Text)) != ERR_NONE) return error; break; - case PBK_Number_Home: - UpdatedFields[13] = true; - if ((error = ALCATEL_UpdateField(s, Alcatel_phone, entry->Location, 13, entry->Entries[i].Text)) != ERR_NONE) return error; + case PBK_Number_Home: + UpdatedFields[13] = true; + if ((error = ALCATEL_UpdateField(s, Alcatel_phone, entry->Location, 13, entry->Entries[i].Text)) != ERR_NONE) return error; break; - case PBK_Number_Pager: - UpdatedFields[11] = true; + case PBK_Number_Pager: + UpdatedFields[11] = true; if ((error = ALCATEL_UpdateField(s, Alcatel_phone, entry->Location, 11, entry->Entries[i].Text)) != ERR_NONE) return error; @@ -1940,29 +1943,29 @@ static GSM_Error ALCATEL_SetMemory(GSM_StateMachine *s, GSM_MemoryEntry *entry) UpdatedFields[10] = true; - if ((error = ALCATEL_UpdateField(s, Alcatel_phone, entry->Location, 10, entry->Entries[i].Text)) != ERR_NONE) return error; + if ((error = ALCATEL_UpdateField(s, Alcatel_phone, entry->Location, 10, entry->Entries[i].Text)) != ERR_NONE) return error; break; - case PBK_Text_Note: + case PBK_Text_Note: UpdatedFields[4] = true; - if ((error = ALCATEL_UpdateField(s, Alcatel_string, entry->Location, 4, entry->Entries[i].Text)) != ERR_NONE) return error; + if ((error = ALCATEL_UpdateField(s, Alcatel_string, entry->Location, 4, entry->Entries[i].Text)) != ERR_NONE) return error; break; - case PBK_Text_Email: - UpdatedFields[14] = true; + case PBK_Text_Email: + UpdatedFields[14] = true; if ((error = ALCATEL_UpdateField(s, Alcatel_string, entry->Location, 14, entry->Entries[i].Text)) != ERR_NONE) return error; break; - case PBK_Text_Email2: - UpdatedFields[15] = true; - if ((error = ALCATEL_UpdateField(s, Alcatel_string, entry->Location, 15, entry->Entries[i].Text)) != ERR_NONE) return error; + case PBK_Text_Email2: + UpdatedFields[15] = true; + if ((error = ALCATEL_UpdateField(s, Alcatel_string, entry->Location, 15, entry->Entries[i].Text)) != ERR_NONE) return error; break; - case PBK_Text_LastName: - UpdatedFields[0] = true; - if ((error = ALCATEL_UpdateField(s, Alcatel_string, entry->Location, 0, entry->Entries[i].Text)) != ERR_NONE) return error; NameSet = true; + case PBK_Text_LastName: + UpdatedFields[0] = true; + if ((error = ALCATEL_UpdateField(s, Alcatel_string, entry->Location, 0, entry->Entries[i].Text)) != ERR_NONE) return error; NameSet = true; break; - case PBK_Text_FirstName: - UpdatedFields[1] = true; - if ((error = ALCATEL_UpdateField(s, Alcatel_string, entry->Location, 1, entry->Entries[i].Text)) != ERR_NONE) return error; NameSet = true; + case PBK_Text_FirstName: + UpdatedFields[1] = true; + if ((error = ALCATEL_UpdateField(s, Alcatel_string, entry->Location, 1, entry->Entries[i].Text)) != ERR_NONE) return error; NameSet = true; break; case PBK_Text_Company: - UpdatedFields[2] = true; - if ((error = ALCATEL_UpdateField(s, Alcatel_string, entry->Location, 2, entry->Entries[i].Text)) != ERR_NONE) return error; + UpdatedFields[2] = true; + if ((error = ALCATEL_UpdateField(s, Alcatel_string, entry->Location, 2, entry->Entries[i].Text)) != ERR_NONE) return error; break; - case PBK_Text_JobTitle: + case PBK_Text_JobTitle: UpdatedFields[3] = true; @@ -1971,3 +1974,3 @@ static GSM_Error ALCATEL_SetMemory(GSM_StateMachine *s, GSM_MemoryEntry *entry) case PBK_Category: - UpdatedFields[5] = true; + UpdatedFields[5] = true; if ((error = ALCATEL_UpdateField(s, Alcatel_byte, entry->Location, 5, &(entry->Entries[i].Number))) != ERR_NONE) return error; @@ -1978,17 +1981,17 @@ static GSM_Error ALCATEL_SetMemory(GSM_StateMachine *s, GSM_MemoryEntry *entry) break; - case PBK_Text_StreetAddress: + case PBK_Text_StreetAddress: UpdatedFields[16] = true; - if ((error = ALCATEL_UpdateField(s, Alcatel_string, entry->Location, 16, entry->Entries[i].Text)) != ERR_NONE) return error; + if ((error = ALCATEL_UpdateField(s, Alcatel_string, entry->Location, 16, entry->Entries[i].Text)) != ERR_NONE) return error; break; - case PBK_Text_City: - UpdatedFields[17] = true; - if ((error = ALCATEL_UpdateField(s, Alcatel_string, entry->Location, 17, entry->Entries[i].Text)) != ERR_NONE) return error; + case PBK_Text_City: + UpdatedFields[17] = true; + if ((error = ALCATEL_UpdateField(s, Alcatel_string, entry->Location, 17, entry->Entries[i].Text)) != ERR_NONE) return error; break; - case PBK_Text_State: - UpdatedFields[18] = true; - if ((error = ALCATEL_UpdateField(s, Alcatel_string, entry->Location, 18, entry->Entries[i].Text)) != ERR_NONE) return error; + case PBK_Text_State: + UpdatedFields[18] = true; + if ((error = ALCATEL_UpdateField(s, Alcatel_string, entry->Location, 18, entry->Entries[i].Text)) != ERR_NONE) return error; break; - case PBK_Text_Zip: - UpdatedFields[19] = true; - if ((error = ALCATEL_UpdateField(s, Alcatel_string, entry->Location, 19, entry->Entries[i].Text)) != ERR_NONE) return error; + case PBK_Text_Zip: + UpdatedFields[19] = true; + if ((error = ALCATEL_UpdateField(s, Alcatel_string, entry->Location, 19, entry->Entries[i].Text)) != ERR_NONE) return error; break; @@ -2002,3 +2005,3 @@ static GSM_Error ALCATEL_SetMemory(GSM_StateMachine *s, GSM_MemoryEntry *entry) break; - case PBK_Text_Custom2: + case PBK_Text_Custom2: UpdatedFields[22] = true; @@ -2011,6 +2014,6 @@ static GSM_Error ALCATEL_SetMemory(GSM_StateMachine *s, GSM_MemoryEntry *entry) case PBK_Text_Custom4: - UpdatedFields[24] = true; + UpdatedFields[24] = true; if ((error = ALCATEL_UpdateField(s, Alcatel_string, entry->Location, 24, entry->Entries[i].Text)) != ERR_NONE) return error ; break; - case PBK_PictureID: + case PBK_PictureID: if (s->Phone.Data.Priv.ALCATEL.ProtocolVersion == V_1_1) { @@ -2071,3 +2074,3 @@ static GSM_Error ALCATEL_DeleteMemory(GSM_StateMachine *s, GSM_MemoryEntry *entr if (error != ERR_NONE) return error; - + /* Refresh list */ @@ -2075,3 +2078,3 @@ static GSM_Error ALCATEL_DeleteMemory(GSM_StateMachine *s, GSM_MemoryEntry *entr if ((error = ALCATEL_GetAvailableIds(s, true))!= ERR_NONE) return error; - + return ERR_NONE; @@ -2230,3 +2233,3 @@ static GSM_Error ALCATEL_GetDisplayStatus(GSM_StateMachine *s, GSM_DisplayFeatur } - + static GSM_Error ALCATEL_SetAutoNetworkLogin(GSM_StateMachine *s) @@ -2339,5 +2342,5 @@ static GSM_Error ALCATEL_GetCalendarStatus(GSM_StateMachine *s, GSM_CalendarStat GSM_Phone_ALCATELData *Priv = &s->Phone.Data.Priv.ALCATEL; - + status->Used = 0; - + if ((error = ALCATEL_GoToBinaryState(s, StateSession, TypeCalendar, 0))!= ERR_NONE) return error; @@ -2729,3 +2732,3 @@ static GSM_Error ALCATEL_GetNextCalendar(GSM_StateMachine *s, GSM_CalendarEntry if (Priv->CalendarItemsCount == 0) return ERR_EMPTY; - + if (start) Note->Location = 0; @@ -2770,3 +2773,3 @@ static GSM_Error ALCATEL_AddCalendar(GSM_StateMachine *s, GSM_CalendarEntry *Not if ((error = ALCATEL_GoToBinaryState(s, StateEdit, TypeCalendar, 0))!= ERR_NONE) return error; - + for (i = 0; i < Note->EntriesNum; i++) { @@ -2808,3 +2811,3 @@ static GSM_Error ALCATEL_AddCalendar(GSM_StateMachine *s, GSM_CalendarEntry *Not phone_set = true; - break; + break; case CAL_REPEAT_DAYOFWEEK: @@ -2844,3 +2847,3 @@ static GSM_Error ALCATEL_AddCalendar(GSM_StateMachine *s, GSM_CalendarEntry *Not } - + switch (Note->Type) { @@ -2902,3 +2905,3 @@ static GSM_Error ALCATEL_SetCalendar(GSM_StateMachine *s, GSM_CalendarEntry *Not if ((error = ALCATEL_GetFields(s, Note->Location))!= ERR_NONE) return error; - + for (i = 0; i < 22; i++) { UpdatedFields[i] = false; } @@ -2906,3 +2909,3 @@ static GSM_Error ALCATEL_SetCalendar(GSM_StateMachine *s, GSM_CalendarEntry *Not if ((error = ALCATEL_GoToBinaryState(s, StateEdit, TypeCalendar, Note->Location))!= ERR_NONE) return error; - + for (i = 0; i < Note->EntriesNum; i++) { @@ -2911,3 +2914,3 @@ static GSM_Error ALCATEL_SetCalendar(GSM_StateMachine *s, GSM_CalendarEntry *Not if (!date_set) { - UpdatedFields[0] = true; + UpdatedFields[0] = true; if ((error = ALCATEL_UpdateField(s, Alcatel_date, Note->Location, 0, &(Note->Entries[i].Date))) != ERR_NONE) return error; @@ -2955,3 +2958,3 @@ static GSM_Error ALCATEL_SetCalendar(GSM_StateMachine *s, GSM_CalendarEntry *Not phone_set = true; - break; + break; case CAL_REPEAT_DAYOFWEEK: @@ -2998,3 +3001,3 @@ static GSM_Error ALCATEL_SetCalendar(GSM_StateMachine *s, GSM_CalendarEntry *Not } - + switch (Note->Type) { @@ -3074,3 +3077,3 @@ static GSM_Error ALCATEL_GetAlarm(GSM_StateMachine *s, GSM_Alarm *alarm) if ((error = ALCATEL_GetAvailableIds(s, false))!= ERR_NONE) return error; - + for (i=0; i<Priv->CalendarItemsCount; i++) { @@ -3093,3 +3096,3 @@ static GSM_Error ALCATEL_GetAlarm(GSM_StateMachine *s, GSM_Alarm *alarm) Note.Location = Priv->CalendarItems[i]; - + if ((error = ALCATEL_GetCalendar(s, &Note))!= ERR_NONE) return error; @@ -3101,3 +3104,3 @@ static GSM_Error ALCATEL_GetAlarm(GSM_StateMachine *s, GSM_Alarm *alarm) } - + alarm->Text[0] = 0; alarm->Text[1] = 0; @@ -3148,3 +3151,3 @@ static GSM_Error ALCATEL_SetAlarm (GSM_StateMachine *s, GSM_Alarm *alarm) } - + if (Found) { @@ -3186,5 +3189,5 @@ static GSM_Error ALCATEL_GetToDoStatus(GSM_StateMachine *s, GSM_ToDoStatus *stat GSM_Phone_ALCATELData *Priv = &s->Phone.Data.Priv.ALCATEL; - + status->Used = 0; - + if ((error = ALCATEL_GoToBinaryState(s, StateSession, TypeToDo, 0))!= ERR_NONE) return error; @@ -3453,3 +3456,3 @@ static GSM_Error ALCATEL_GetNextToDo(GSM_StateMachine *s, GSM_ToDoEntry *ToDo, b if (Priv->ToDoItemsCount == 0) return ERR_EMPTY; - + if (start) ToDo->Location = 0; @@ -3492,3 +3495,3 @@ static GSM_Error ALCATEL_AddToDo (GSM_StateMachine *s, GSM_ToDoEntry *ToDo) if ((error = ALCATEL_GoToBinaryState(s, StateEdit, TypeToDo, 0))!= ERR_NONE) return error; - + switch (ToDo->Priority) { @@ -3520,3 +3523,3 @@ static GSM_Error ALCATEL_AddToDo (GSM_StateMachine *s, GSM_ToDoEntry *ToDo) break; - case TODO_ALARM_DATETIME: + case TODO_ALARM_DATETIME: if ((error = ALCATEL_CreateField(s, Alcatel_date, 2, &(ToDo->Entries[i].Date))) != ERR_NONE) return error; @@ -3581,5 +3584,5 @@ static GSM_Error ALCATEL_SetToDo (GSM_StateMachine *s, GSM_ToDoEntry *ToDo) if ((error = ALCATEL_GetFields(s, ToDo->Location))!= ERR_NONE) return error; - + for (i = 0; i < 12; i++) { UpdatedFields[i] = false; } - + if ((error = ALCATEL_GoToBinaryState(s, StateEdit, TypeToDo, ToDo->Location))!= ERR_NONE) return error; @@ -3610,3 +3613,3 @@ static GSM_Error ALCATEL_SetToDo (GSM_StateMachine *s, GSM_ToDoEntry *ToDo) if ((error = ALCATEL_UpdateField(s, Alcatel_date, ToDo->Location, 0, &(ToDo->Entries[i].Date))) != ERR_NONE) return error; - UpdatedFields[0] = true; + UpdatedFields[0] = true; break; @@ -3614,13 +3617,13 @@ static GSM_Error ALCATEL_SetToDo (GSM_StateMachine *s, GSM_ToDoEntry *ToDo) if ((error = ALCATEL_UpdateField(s, Alcatel_bool, ToDo->Location, 1, &(ToDo->Entries[i].Number))) != ERR_NONE) return error; - UpdatedFields[1] = true; + UpdatedFields[1] = true; break; - case TODO_ALARM_DATETIME: + case TODO_ALARM_DATETIME: if ((error = ALCATEL_UpdateField(s, Alcatel_date, ToDo->Location, 2, &(ToDo->Entries[i].Date))) != ERR_NONE) return error; - UpdatedFields[2] = true; + UpdatedFields[2] = true; if ((error = ALCATEL_UpdateField(s, Alcatel_time, ToDo->Location, 3, &(ToDo->Entries[i].Date))) != ERR_NONE) return error; - UpdatedFields[3] = true; + UpdatedFields[3] = true; if ((error = ALCATEL_UpdateField(s, Alcatel_date, ToDo->Location, 10, &(ToDo->Entries[i].Date))) != ERR_NONE) return error; - UpdatedFields[10] = true; + UpdatedFields[10] = true; if ((error = ALCATEL_UpdateField(s, Alcatel_time, ToDo->Location, 11, &(ToDo->Entries[i].Date))) != ERR_NONE) return error; - UpdatedFields[11] = true; + UpdatedFields[11] = true; break; @@ -3628,3 +3631,3 @@ static GSM_Error ALCATEL_SetToDo (GSM_StateMachine *s, GSM_ToDoEntry *ToDo) if ((error = ALCATEL_UpdateField(s, Alcatel_string, ToDo->Location, 4, ToDo->Entries[i].Text)) != ERR_NONE) return error; - UpdatedFields[4] = true; + UpdatedFields[4] = true; break; @@ -3632,3 +3635,3 @@ static GSM_Error ALCATEL_SetToDo (GSM_StateMachine *s, GSM_ToDoEntry *ToDo) if ((error = ALCATEL_UpdateField(s, Alcatel_bool, ToDo->Location, 5, &(ToDo->Entries[i].Number))) != ERR_NONE) return error; - UpdatedFields[5] = true; + UpdatedFields[5] = true; break; @@ -3636,3 +3639,3 @@ static GSM_Error ALCATEL_SetToDo (GSM_StateMachine *s, GSM_ToDoEntry *ToDo) if ((error = ALCATEL_UpdateField(s, Alcatel_byte, ToDo->Location, 6, &(ToDo->Entries[i].Number))) != ERR_NONE) return error; - UpdatedFields[6] = true; + UpdatedFields[6] = true; break; @@ -3640,3 +3643,3 @@ static GSM_Error ALCATEL_SetToDo (GSM_StateMachine *s, GSM_ToDoEntry *ToDo) if ((error = ALCATEL_UpdateField(s, Alcatel_int, ToDo->Location, 8, &(ToDo->Entries[i].Number))) != ERR_NONE) return error; - UpdatedFields[8] = true; + UpdatedFields[8] = true; contact_set = true; @@ -3645,3 +3648,3 @@ static GSM_Error ALCATEL_SetToDo (GSM_StateMachine *s, GSM_ToDoEntry *ToDo) if ((error = ALCATEL_UpdateField(s, Alcatel_phone, ToDo->Location, 9, ToDo->Entries[i].Text)) != ERR_NONE) return error; - UpdatedFields[9] = true; + UpdatedFields[9] = true; phone_set = true; @@ -3824,2 +3827,10 @@ static GSM_Error ALCATEL_SetIncomingSMS (GSM_StateMachine *s, bool enable) +static GSM_Error ALCATEL_SetFastSMSSending(GSM_StateMachine *s, bool enable) +{ + GSM_Error error; + + if ((error = ALCATEL_SetATMode(s))!= ERR_NONE) return error; + return ATGEN_SetFastSMSSending(s, enable); +} + static GSM_Reply_Function ALCATELReplyFunctions[] = { @@ -3915,2 +3926,3 @@ GSM_Phone_Functions ALCATELPhone = { ALCATEL_SendSavedSMS, + ALCATEL_SetFastSMSSending, ALCATEL_SetIncomingSMS, @@ -3969,3 +3981,3 @@ GSM_Phone_Functions ALCATELPhone = { NOTSUPPORTED, /* SetCalendarSettings */ - NOTSUPPORTED, /* GetNote */ + NOTSUPPORTED, /* GetNextNote */ NOTSUPPORTED, /* GetProfile */ |