11 #include "../../gsmstate.h" 12 #include "../../gsmphones.h" 13 #include "../../misc/coding/coding.h" 14 #include "../../misc/locales.h" 15 #include "../../service/gsmnet.h" 16 #include "../../service/gsmlogo.h" 17 #include "../../service/gsmcal.h" 38 smprintf(s,
"Packing phonebook block with ID = %i, block number = %i, block length = %ld\n",
45 block[2] = (size + 6) / 256;
46 block[3] = (size + 6) % 256;
48 memcpy(block+5, buf, size);
56 int count=0, len, i, block=0, j;
57 unsigned char string[500];
64 memset(
string,0,
sizeof(
string));
158 string[len * 2 + 5] = 0;
162 if (DCT4 && VoiceTag) {
338 const unsigned char *src,
339 unsigned char length)
341 if ((length & 1) != 0) {
342 smprintf(s,
"String length not even\n");
368 unsigned char *MessageBuffer,
372 unsigned char *Block;
373 int length = 0, i, bs = 0;
379 int favorite_messaging_numbers[10];
380 size_t used_favorite_messaging_numbers = 0;
385 bitmap->
Text[0] = 0x00;
386 bitmap->
Text[1] = 0x00;
398 Block = &MessageBuffer[0];
404 length = length + bs;
406 if (length >= MessageLength-1)
break;
409 bs = 256*Block[2]+Block[3];
412 smprintf(s,
"Phonebook entry block 0x%02x - length %i\n",
439 Block = &MessageBuffer[0];
447 length = length + bs;
448 if (length >= MessageLength-1)
break;
451 bs = 256*Block[2]+Block[3];
452 smprintf(s,
"Phonebook entry block 0x%02x - length %i\n",
509 memcpy(bitmap->
Text,Block+6,Block[5]);
524 smprintf(s,
"Datetime seems to be invalid, ignoring!\n");
531 smprintf(s,
"Picture ID \"%i\"\n",Block[10]*256+Block[11]);
532 bitmap->
PictureID = Block[10]*256+Block[11];
536 smprintf(s,
"Picture ID \"%i\"\n",Block[10]*256+Block[11]);
543 if (Block[5] == 0x00) {
547 if (Block[5] == 0x01) {
550 if (Block[5] == 0x0B) {
556 if (Block[5] == 0x55) {
560 if (Block[5] == 0x08) {
579 smprintf(s,
"Unknown number type %02x\n",Block[5]);
622 if ((Type == 0x00) && (Block[7]>0)) {
623 smprintf(s,
"Found new bb5 style address\n");
628 smprintf(s,
"Unknown address type %02x\n",Block[5]);
742 if (Block[5] == 0x00) bitmap->
RingtoneID=Block[7];
749 smprintf(s,
"Ringtone ID \"%i\"\n",Block[7]);
777 smprintf(s,
"Caller group \"%i\"\n",Block[5]);
783 smprintf(s,
"Entry %i has voice tag %i\n",Block[5]-1,Block[7]);
792 smprintf(s,
"location %i\n",(Block[6]*256+Block[7]));
808 case 0x05:
smprintf(s,
"ME\n");
break;
809 case 0x06:
smprintf(s,
"SM\n");
break;
810 default :
smprintf(s,
"%02x\n",Block[12]);
812 smprintf(s,
"location %i, number %i in location\n",
813 (Block[6]*256+Block[7])-1,Block[14]);
827 smprintf(s,
"Ringtone ID with possibility of using filesystem\n");
829 if (Block[9] == 0x01) {
830 smprintf(s,
"Filesystem ringtone ID: %02x\n",Block[10]*256+Block[11]);
833 smprintf(s,
"Internal ringtone ID: %02x\n",Block[10]*256+Block[11]);
840 smprintf(s,
"Internal ringtone ID: %02x\n",Block[10]*256+Block[11]);
846 smprintf(s,
"Filesystem ringtone ID: %02x\n",Block[10]*256+Block[11]);
855 smprintf(s,
"Entry %i is assigned to SMS list %i\n",Block[5]-1,Block[9]);
864 smprintf(s,
"Unknown entry type 0x%02x data length %d\n", Block[0], bs-6);
872 smprintf(s,
"Unknown entry type 0x%02x data length %d\n", Block[0], bs-6);
876 smprintf(s,
"Unknown entry - probably ID for conversation list\n");
880 smprintf(s,
"Unknown entry - probably ID for Instant Messaging service list\n");
884 smprintf(s,
"Unknown entry - probably ID for presence list\n");
888 smprintf(s,
"SIP Address (Push to Talk address)\n");
901 smprintf(s,
"Group ID (6230i or later)\n");
905 smprintf(s,
"Caller group \"%i\"\n",Block[7]);
911 if (used_favorite_messaging_numbers >=
sizeof(favorite_messaging_numbers) /
sizeof(
int)) {
912 smprintf(s,
"Too many favorite messaging numbers!\n");
915 favorite_messaging_numbers[used_favorite_messaging_numbers] = (int)Block[5];
916 used_favorite_messaging_numbers++;
920 smprintf(s,
"ERROR: unknown pbk entry 0x%02x\n",Block[0]);
926 smprintf(s,
"Empty entry with missed call reference, adding blank number!\n");
936 for (i = 0; i < (int)used_favorite_messaging_numbers; i++) {
948 smprintf(s,
"Marked entry #%i (%s) as favorite messaging number\n",
949 favorite_messaging_numbers[i],
959 if (Bitmap->
Text[0]==0x00 && Bitmap->
Text[1]==0x00) {
978 datetime->
Year = buffer[0] * 256 + buffer[1];
980 if (datetime->
Year > 3000) {
981 datetime->
Year = buffer[1] * 256 + buffer[0];
983 if (DayMonthReverse) {
984 datetime->
Month = buffer[3];
985 datetime->
Day = buffer[2];
987 datetime->
Month = buffer[2];
988 datetime->
Day = buffer[3];
991 datetime->
Hour = buffer[4];
992 datetime->
Minute = buffer[5];
994 datetime->
Second = buffer[6];
1000 smprintf(s,
"Decoding date and time\n");
1001 smprintf(s,
" Time: %02d:%02d:%02d\n",
1003 smprintf(s,
" Date: %4d/%02d/%02d\n",
1009 buffer[0] = datetime->
Year / 256;
1010 buffer[1] = datetime->
Year % 256;
1011 buffer[2] = datetime->
Month;
1012 buffer[3] = datetime->
Day;
1014 buffer[4] = datetime->
Hour;
1015 buffer[5] = datetime->
Minute;
1019 #if defined(GSM_ENABLE_NOKIA_DCT3) || defined(GSM_ENABLE_NOKIA_DCT4) 1032 smprintf(s,
"Unknown SMS state: %02x\n",state);
1053 return GSM_WaitFor (s, msgframe, msglen,msgtype, 4, request);
1073 length = (input[*current]*256+input[*current+1])*2;
1074 memcpy(output,input+(*current+2),length);
1075 *current = *current + 2 + length;
1077 length = (input[*current])*2;
1078 memcpy(output,input+(*current+1),length);
1079 *current = *current + 1 + length;
1082 output[length ] = 0;
1083 output[length+1] = 0;
1092 dest[0] = length / 256;
1093 dest[1] = length % 256;
1097 dest[0] = length % 256;
1108 while (ID[i+1]!=0x00) {
1109 if (ID[i]==memory_type)
return ID[i+1];
1122 while (i!=Folder->
Number-1) {
1134 for (i=0;i<Folder->
Number;i++) {
1173 switch (msg->
Buffer[3]) {
1175 smprintf(s,
"Message: Call divert status received\n");
1177 switch (msg->
Buffer[6]) {
1178 case 0x43:
smprintf(s,
"when busy");
break;
1179 case 0x3d:
smprintf(s,
"when not answered");
break;
1180 case 0x3e:
smprintf(s,
"when phone off or no coverage");
break;
1181 case 0x15:
smprintf(s,
"all types of diverts");
break;
1188 if (msg->
Length == 0x0b) {
1195 switch (msg->
Buffer[pos]) {
1216 while (msg->
Buffer[j] != 0x00) j++;
1217 msg->
Buffer[pos+1] = j - pos - 2;
1218 number_pos = pos + 1;
1230 smprintf(s,
"Message: Call divert status receiving error ?\n");
1280 return DCT3DCT4_CallDivert(s, request, response,
TRUE);
1285 return DCT3DCT4_CallDivert(s, divert, NULL,
FALSE);
1318 smprintf(s,
"Checking, if connection settings are active\n");
1324 smprintf(s,
"Connection settings activated\n");
1334 reqActivate[4] = settings->
Location-1;
1335 smprintf(s,
"Activating connection settings number %i\n",settings->
Location);
1350 req[4] = strlen(DTMFSequence);
1352 memcpy(req+5,DTMFSequence,strlen(DTMFSequence));
1363 smprintf(s,
"WAP bookmark received\n");
1364 switch (msg->
Buffer[3]) {
1380 switch (msg->
Buffer[4]) {
1382 smprintf(s,
"Security error. Inside WAP bookmarks menu\n");
1397 switch (msg->
Buffer[3]) {
1399 smprintf(s,
"WAP bookmark set OK\n");
1402 smprintf(s,
"WAP bookmark setting error\n");
1403 switch (msg->
Buffer[4]) {
1405 smprintf(s,
"Security error. Inside WAP bookmarks menu\n");
1408 smprintf(s,
"Can't write to empty location ?\n");
1423 smprintf(s,
"Connection functions enabled\n");
1439 smprintf(s,
"Connection functions disabled\n");
1449 smprintf(s,
"Disabling connection settings\n");
1455 switch (msg->
Buffer[3]) {
1457 smprintf(s,
"WAP bookmark deleted OK\n");
1460 smprintf(s,
"WAP bookmark deleting error\n");
1461 switch (msg->
Buffer[4]) {
1463 smprintf(s,
"Security error. Inside WAP bookmarks menu\n");
1484 smprintf(s,
"Deleting WAP bookmark\n");
1505 smprintf(s,
"Getting WAP bookmark\n");
1521 req[4] = (
unsigned char)ID;
1524 smprintf(s,
"Canceling single call\n");
1532 req[4] = (
unsigned char)ID;
1535 smprintf(s,
"Answering single call\n");
1591 smprintf(s,
"Getting firmware version\n");
1610 smprintf(s,
"Wait for synchronisation???\n");
1624 smprintf(s,
"Invalid memory type\n");
1627 smprintf(s,
"Invalid memory type?\n");
1635 smprintf(s,
"Too high location ?\n");
1650 smprintf(s,
"ERROR: unknown status code 0x%x\n", error);
1657 switch (msg->
Buffer[6]) {
1659 smprintf(s,
"Phonebook entry writing failed\n");
1660 switch (msg->
Buffer[10]) {
1662 smprintf(s,
"Invalid block sent\n");
1665 smprintf(s,
"Still busy processing the last command\n");
1668 smprintf(s,
"Block size does not match a definition\n");
1671 smprintf(s,
"when you try to save into entry with caller group assignment in phone with caller groups standard 2 (like in 6230i)\n");
1674 smprintf(s,
"no caller group with given number (6230i)\n");
1677 smprintf(s,
"Ignoring ERROR: unknown 50 (probably group contains 50 entries)\n");
1683 smprintf(s,
"Can not add entry with 0 subentries\n");
1692 smprintf(s,
"Incorrect characters\n");
1699 smprintf(s,
"Phonebook entry written\n");
1708 unsigned char *PhoneID,
1709 unsigned char *PhoneValue)
1713 smprintf(s,
"Trying to find feature %i with value %i\n",FeatureID,FeatureValue);
1714 while (ProfileTable[i].ID != 0x00) {
1715 if (ProfileTable[i].ID == FeatureID &&
1716 ProfileTable[i].Value == FeatureValue) {
1717 *PhoneID = ProfileTable[i].
PhoneID;
1726 #define PROFILE_CALLERGROUPS_GROUP1 0x01 1727 #define PROFILE_CALLERGROUPS_GROUP2 0x02 1728 #define PROFILE_CALLERGROUPS_GROUP3 0x04 1729 #define PROFILE_CALLERGROUPS_GROUP4 0x08 1730 #define PROFILE_CALLERGROUPS_GROUP5 0x10 1735 unsigned char Value,
1742 smprintf(s,
"Caller groups: %i\n", Value);
1746 if ((Value & PROFILE_CALLERGROUPS_GROUP1)==PROFILE_CALLERGROUPS_GROUP1) Data->
Profile->
CallerGroups[0] =
TRUE;
1747 if ((Value & PROFILE_CALLERGROUPS_GROUP2)==PROFILE_CALLERGROUPS_GROUP2) Data->
Profile->
CallerGroups[1] =
TRUE;
1748 if ((Value & PROFILE_CALLERGROUPS_GROUP3)==PROFILE_CALLERGROUPS_GROUP3) Data->
Profile->
CallerGroups[2] =
TRUE;
1749 if ((Value & PROFILE_CALLERGROUPS_GROUP4)==PROFILE_CALLERGROUPS_GROUP4) Data->
Profile->
CallerGroups[3] =
TRUE;
1750 if ((Value & PROFILE_CALLERGROUPS_GROUP5)==PROFILE_CALLERGROUPS_GROUP5) Data->
Profile->
CallerGroups[4] =
TRUE;
1755 while (ProfileTable[i].ID != 0x00) {
1756 if (ProfileTable[i].PhoneID == ID &&
1757 ProfileTable[i].PhoneValue == Value) {
1759 switch (ProfileTable[i].ID) {
1812 {0x00, 0x00, 0x00,0x00}
1820 smprintf(s,
"Enabling incoming SMS\n");
1822 smprintf(s,
"Disabling incoming SMS\n");
1830 unsigned char buffer[2000];
1836 buffer[msg->
Buffer[7]] = 0x00;
1838 smprintf(s,
"USSD reply: \"%s\"\n",buffer);
1857 smprintf(s,
"Enabling incoming USSD\n");
1859 smprintf(s,
"Disabling incoming USSD\n");
1872 smprintf(s,
"Enabling incoming Call\n");
1874 smprintf(s,
"Disabling incoming Call\n");
1884 unsigned char buffer[200];
1892 switch (msg->
Buffer[3]) {
1894 smprintf(s,
"Call established, waiting for answer\n");
1900 if (msg->
Buffer[3] == 0x03) {
1903 }
else if (msg->
Buffer[3] == 0x05) {
1919 if (msg->
Buffer[6] == 7) {
1930 smprintf(s,
"Remote end hang up\n");
1939 smprintf(s,
"Call answer initiated\n");
1946 smprintf(s,
"Call is being released\n");
1949 smprintf(s,
"Meaning not known\n");
1955 else smprintf(s,
"Audio disabled\n");
1959 if (msg->
Buffer[8]==0x01) {
1960 smprintf(s,
"Calling from phone keypad ?\n");
1961 if (msg->
Buffer[14]==0x03) {
1969 if (msg->
Buffer[tmp-3]==0x11) {
1978 if (msg->
Buffer[8]==0x00) {
1984 smprintf(s,
"Meaning not known\n");
2002 smprintf(s,
"Meaning not known\n");
2015 if (msg->
Buffer[3] == 0x09) {
2025 if (msg->
Buffer[3] == 0x07) {
2036 smprintf(s,
"Calendar note added\n");
2044 time_t t_time1,t_time2;
2048 int Text, Time, Alarm, Phone, EndTime, Location, length=25;
2049 unsigned char req[5000] = {
2053 0x00,0x00,0x00,0x00,
2054 0x00,0x00,0x00,0x00,
2055 0x00,0x00,0xff,0xff,
2059 0x00,0x00,0x00,0x00,
2060 0x00,0x00,0x00,0x00};
2068 case GSM_CAL_CALL : req[18] = 0x02; length = 27;
break;
2070 case GSM_CAL_MEMO : req[18] = 0x08; length = 25;
break;
2076 case GSM_CAL_CALL : req[18] = 0x02; length = 27;
break;
2078 case GSM_CAL_MEMO : req[18] = 0x08; length = 25;
break;
2086 smprintf(s,
"Can not save entry without time!\n");
2112 diff = t_time1-t_time2;
2113 smprintf(s,
" Difference : %li seconds\n", -diff);
2114 req[9] = (
unsigned char)(-diff >> 24);
2115 req[10] = (
unsigned char)(-diff >> 16);
2116 req[11] = (
unsigned char)(-diff >> 8);
2117 req[12] = (
unsigned char)(-diff);
2154 diff = t_time1-t_time2;
2164 smprintf(s,
" Difference : %li seconds or minutes\n", -diff);
2165 req[13] = (
unsigned char)(-diff >> 24);
2166 req[14] = (
unsigned char)(-diff >> 16);
2167 req[15] = (
unsigned char)(-diff >> 8);
2168 req[16] = (
unsigned char)(-diff);
2186 req[length++] = 0x00;
2187 req[length++] = 0x00;
2189 req[4] = req[17] = length-7;
2191 smprintf(s,
"Writing calendar note method 2\n");
2208 smprintf(s,
"Getting first free calendar note location\n");
2216 smprintf(s,
"Written calendar note type ");
2217 switch ((msg->
Buffer[3]/2)-1) {
2218 case 0:
smprintf(s,
"Meeting");
break;
2219 case 1:
smprintf(s,
"Call");
break;
2220 case 2:
smprintf(s,
"Birthday");
break;
2221 case 3:
smprintf(s,
"Reminder");
break;
2234 int Text, Time, Alarm, Phone, EndTime, Location, count=12;
2235 unsigned char req[5000] = {
2244 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
2246 error=N71_65_GetCalendarNotePos1(s);
2248 if (FirstCalendarPos != NULL) {
2249 Note->
Location = *FirstCalendarPos;
2250 req[4] = *FirstCalendarPos/256;
2251 req[5] = *FirstCalendarPos%256;
2254 switch(Note->
Type) {
2259 default : req[3]=0x01; req[6]=0x01;
break;
2265 smprintf(s,
"Can not save entry without time!\n");
2269 req[8] = DT.
Year / 256;
2270 req[9] = DT.
Year % 256;
2274 switch(Note->
Type) {
2277 req[count++] = 0x00;
2278 req[count++] = 0x00;
2281 req[count++] = 0x00;
2282 req[count++] = 0x00;
2283 req[count++] = 0xff;
2284 req[count++] = 0xff;
2300 req[count++] = (
unsigned char)(seconds>>24);
2301 req[count++] = (
unsigned char)((seconds>>16) & 0xff);
2302 req[count++] = (
unsigned char)((seconds>>8) & 0xff);
2303 req[count++] = (
unsigned char)(seconds & 0xff);
2315 req[count++] = 0x00;
2326 req[count++] = 0x00;
2330 req[count++] = 0x00;
2331 req[count++] = 0x00;
2338 req[count++] = DT.
Hour;
2339 req[count++] = DT.
Minute;
2342 req[count++] = 0xff;
2343 req[count++] = 0xff;
2348 req[count++] = (
unsigned char)((seconds/60L)>>8);
2349 req[count++] = (
unsigned char)((seconds/60L)&0xff);
2361 req[count++] = 0x00;
2367 req[count++] = 0x00;
2380 smprintf(s,
"Writing calendar note method 1\n");
2400 smprintf(s,
"Deleting calendar note\n");
2409 smprintf(s,
"Info with calendar notes locations received method 1\n");
2410 while (LastCalendar->
Location[j] != 0x00) j++;
2412 smprintf(s,
"Increase GSM_MAXCALENDARNOTES\n");
2421 while (9+(i*2) <= msg->
Length) {
2426 smprintf(s,
"\nNumber of Entries in frame: %ld\n", (
long)i);
2443 LastCalendar->
Number = 0;
2445 smprintf(s,
"Getting locations for calendar method 1\n");
2451 while (LastCalendar->
Location[i] != 0x00) i++;
2452 if (i == LastCalendar->
Number)
break;
2454 smprintf(s,
"Phone doesn't support some notes with this method. Workaround\n");
2455 LastCalendar->
Number = i;
2459 req[4] = LastCalendar->
Location[i-1] / 256;
2460 req[5] = LastCalendar->
Location[i-1] % 256;
2461 smprintf(s,
"Getting locations for calendar\n");
2474 smprintf(s,
"Calendar note received method 1\n");
2477 if (msg->
Buffer[6]!=0x04) {
2488 switch (msg->
Buffer[6]) {
2494 if (timedelta != 0xffff) {
2495 smprintf(s,
" Difference : %i seconds\n", timedelta);
2515 if (timedelta != 0xffff) {
2516 smprintf(s,
" Difference : %i seconds\n", timedelta);
2549 timedelta = ((
unsigned int)msg->
Buffer[14]) << 24;
2550 timedelta += ((
unsigned int)msg->
Buffer[15]) << 16;
2551 timedelta += ((
unsigned int)msg->
Buffer[16]) << 8;
2552 timedelta += msg->
Buffer[17];
2553 if (timedelta != 0xffff) {
2554 smprintf(s,
" Difference : %i seconds\n", timedelta);
2558 if (msg->
Buffer[20]!=0x00) {
2560 smprintf(s,
"Alarm type : Silent\n");
2636 *LastCalendarYear = date_time.
Year;
2637 *LastCalendarPos = 0;
2639 (*LastCalendarPos)++;
2644 req[4] = LastCalendar->
Location[*LastCalendarPos] / 256;
2645 req[5] = LastCalendar->
Location[*LastCalendarPos] % 256;
2652 smprintf(s,
"Getting calendar note method 1\n");
2662 memcpy(buffer+5,buff,len);
2670 switch (msg->
Buffer[3]) {
2678 smprintf(s,
"meaning unknown - during sending DTMF\n");
gboolean EnableIncomingUSSD
GSM_Error DCT3DCT4_ReplyGetActiveConnectSet(GSM_Protocol_Message *msg, GSM_StateMachine *s)
GSM_Error N71_65_ReplyDelCalendar(GSM_Protocol_Message *msg, GSM_StateMachine *s)
GSM_Profile_Feat_ID FeatureID[15]
IncomingUSSDCallback IncomingUSSD
char * DecodeUnicodeString(const unsigned char *src)
void DumpMessage(GSM_Debug_Info *d, const unsigned char *message, const size_t messagesize)
GSM_Profile_Feat_Value Value
GSM_Error DCT3DCT4_GetModel(GSM_StateMachine *s)
void CopyUnicodeString(unsigned char *Dest, const unsigned char *Source)
void NOKIA_DecodeSMSState(GSM_StateMachine *s, unsigned char state, GSM_SMSMessage *sms)
GSM_Error N71_65_AddCalendar1(GSM_StateMachine *s, GSM_CalendarEntry *Note, int *FirstCalendarPos)
void * IncomingCallUserData
void NOKIA_SortSMSFolderStatus(GSM_StateMachine *s, GSM_NOKIASMSFolder *Folder)
GSM_Error NOKIA_SetIncomingUSSD(GSM_StateMachine *s, gboolean enable)
GSM_MemoryType MemoryType
void * IncomingUSSDUserData
#define GSM_PHONEBOOK_TEXT_LENGTH
gboolean FileSystemRingtone
void FreeLines(GSM_CutLines *lines)
GSM_Error DCT3DCT4_GetWAPBookmarkPart(GSM_StateMachine *s, GSM_WAPBookmark *bookmark)
int GSM_PackSemiOctetNumber(const unsigned char *Number, unsigned char *Output, gboolean semioctet)
void GetTimeDifference(unsigned long diff, GSM_DateTime *DT, gboolean Plus, int multi)
#define N6110_FRAME_HEADER
GSM_MemoryType NOKIA_GetMemoryType(GSM_StateMachine *s, GSM_MemoryType memory_type, unsigned char *ID)
GSM_Debug_Info * GSM_GetDI(GSM_StateMachine *s)
#define GSM_PHONEBOOK_ENTRIES
char VerDate[GSM_MAX_VERSION_DATE_LENGTH+1]
GSM_Error N71_65_DelCalendar(GSM_StateMachine *s, GSM_CalendarEntry *Note)
GSM_Error N71_65_GetCalendarInfo1(GSM_StateMachine *s, GSM_NOKIACalToDoLocations *LastCalendar)
void NOKIA_EncodeDateTime(GSM_StateMachine *s UNUSED, unsigned char *buffer, GSM_DateTime *datetime)
const char * GetLineString(const char *message, GSM_CutLines *lines, int start)
GSM_Error DCT3DCT4_ReplyEnableConnectFunc(GSM_Protocol_Message *msg, GSM_StateMachine *s)
gboolean FileSystemPicture
void NOKIA_FindFeatureValue(GSM_StateMachine *s, GSM_Profile_PhoneTableValue ProfileTable[], unsigned char ID, unsigned char Value, GSM_Phone_Data *Data, gboolean CallerGroups)
GSM_Error DCT3DCT4_ReplyDisableConnectFunc(GSM_Protocol_Message *msg, GSM_StateMachine *s)
GSM_Error N71_65_ReplyCallInfo(GSM_Protocol_Message *msg, GSM_StateMachine *s)
size_t UnicodeLength(const unsigned char *str)
GSM_Error DCT3DCT4_EnableWAPFunctions(GSM_StateMachine *s)
GSM_Error N71_65_ReplyGetCalendarNotePos1(GSM_Protocol_Message *msg, GSM_StateMachine *s, int *FirstCalendarPos)
gboolean EnableIncomingCall
GSM_Error N71_65_ReplyAddCalendar1(GSM_Protocol_Message *msg, GSM_StateMachine *s)
void PHONE_DecodeBitmap(GSM_Phone_Bitmap_Types Type, char *buffer, GSM_Bitmap *Bitmap)
void GSM_SetCalendarRecurranceRepeat(GSM_Debug_Info *di, unsigned char *rec, unsigned char *endday, GSM_CalendarEntry *entry)
GSM_CalendarNoteType N71_65_FindCalendarType(GSM_CalendarNoteType Type, GSM_PhoneModel *model)
GSM_Error(* WriteMessage)(GSM_StateMachine *s, unsigned const char *buffer, int length, int type)
char Version[GSM_MAX_VERSION_LENGTH+1]
GSM_Error NOKIA_SetIncomingCall(GSM_StateMachine *s, gboolean enable)
int Location[GSM_MAXCALENDARTODONOTES+1]
GSM_Profile_PhoneTableValue Profile71_65[]
char Manufacturer[GSM_MAX_MANUFACTURER_LENGTH+1]
GSM_PhoneModel * ModelInfo
int smprintf_level(GSM_StateMachine *s, GSM_DebugSeverity severity, const char *format,...)
static gboolean N71_65_PB_CopyString(GSM_StateMachine *s, GSM_MemoryEntry *entry, const unsigned char *src, unsigned char length)
GSM_Error NOKIA_GetPhoneString(GSM_StateMachine *s, const unsigned char *msgframe, int msglen, unsigned char msgtype, char *retvalue, GSM_Phone_RequestID request, int startresponse)
GSM_Error DCT3DCT4_SetActiveConnectSet(GSM_StateMachine *s, GSM_MultiWAPSettings *settings)
void GSM_GetCalendarRecurranceRepeat(GSM_Debug_Info *di, unsigned char *rec, unsigned char *endday, GSM_CalendarEntry *entry)
void GSM_CalendarFindDefaultTextTimeAlarmPhone(GSM_CalendarEntry *entry, int *Text, int *Time, int *Alarm, int *Phone, int *EndTime, int *Location)
GSM_Error DCT3DCT4_GetFirmware(GSM_StateMachine *s)
GSM_Error DCT3DCT4_ReplySetActiveConnectSet(GSM_Protocol_Message *msg, GSM_StateMachine *s)
unsigned char Text[(GSM_PHONEBOOK_TEXT_LENGTH+1) *2]
GSM_CalendarNoteType Type
GSM_PhoneModel * GetModelData(GSM_StateMachine *s, const char *model, const char *number, const char *irdamodel)
GSM_Error DCT3DCT4_SetCallDivert(GSM_StateMachine *s, GSM_CallDivert *divert)
void InitLines(GSM_CutLines *lines)
void EncodeUnicode(unsigned char *dest, const char *src, size_t len)
GSM_Error DCT3DCT4_CancelCall(GSM_StateMachine *s, int ID)
GSM_Error DCT3DCT4_DeleteWAPBookmarkPart(GSM_StateMachine *s, GSM_WAPBookmark *bookmark)
size_t N71_65_PackPBKBlock(GSM_StateMachine *s, int id, size_t size, int no, unsigned char *buf, unsigned char *block)
unsigned int Location[GSM_PHONE_MAXSMSINFOLDER+1]
void NOKIA_GetUnicodeString(GSM_StateMachine *s, int *current, unsigned char *input, unsigned char *output, gboolean FullLength)
GSM_Error N71_65_ReplyGetNextCalendar1(GSM_Protocol_Message *msg, GSM_StateMachine *s)
gboolean NOKIA_FindPhoneFeatureValue(GSM_StateMachine *s, GSM_Profile_PhoneTableValue ProfileTable[], GSM_Profile_Feat_ID FeatureID, GSM_Profile_Feat_Value FeatureValue, unsigned char *PhoneID, unsigned char *PhoneValue)
GSM_Error DCT3DCT4_DisableConnectionFunctions(GSM_StateMachine *s)
GSM_MultiWAPSettings * WAPSettings
void NOKIA_GetDefaultCallerGroupName(GSM_Bitmap *Bitmap)
unsigned char N71_65_MEMORY_TYPES[]
GSM_Error GSM_WaitFor(GSM_StateMachine *s, unsigned const char *buffer, size_t length, int type, int timeout, GSM_Phone_RequestID request)
unsigned char Number[(GSM_MAX_NUMBER_LENGTH+1) *2]
#define GSM_MAXCALENDARTODONOTES
int NOKIA_SetUnicodeString(GSM_StateMachine *s, unsigned char *dest, unsigned char *string, gboolean FullLength)
unsigned char Text[2 *(GSM_MAX_USSD_LENGTH+1)]
GSM_WAPBookmark * WAPBookmark
GSM_Divert_CallTypes CallType
GSM_Phone_RequestID RequestID
GSM_Error N71_65_GetNextCalendar1(GSM_StateMachine *s, GSM_CalendarEntry *Note, gboolean start, GSM_NOKIACalToDoLocations *LastCalendar, int *LastCalendarYear, int *LastCalendarPos)
GSM_Error N71_65_DecodePhonebook(GSM_StateMachine *s, GSM_MemoryEntry *entry, GSM_Bitmap *bitmap, GSM_SpeedDial *speed, unsigned char *MessageBuffer, int MessageLength, gboolean DayMonthReverse)
GSM_Error DCT3DCT4_ReplyCallDivert(GSM_Protocol_Message *msg, GSM_StateMachine *s)
GSM_Profile_Feat_Value FeatureValue[15]
GSM_CalendarType EntryType
GSM_Error N71_65_ReplyAddCalendar2(GSM_Protocol_Message *msg, GSM_StateMachine *s)
IncomingCallCallback IncomingCall
GSM_MultiCallDivert * Divert
GSM_Error DCT3DCT4_ReplyDelWAPBookmark(GSM_Protocol_Message *msg, GSM_StateMachine *s)
GSM_Divert_DivertTypes DivertType
GSM_MemoryType MemoryType
GSM_CallDivert Entries[GSM_MAX_CALL_DIVERTS]
unsigned char PhoneNumber[(GSM_MAX_NUMBER_LENGTH+1) *2]
GSM_Error DCT3DCT4_CancelAllDiverts(GSM_StateMachine *s)
gboolean mywstrncmp(unsigned const char *a, unsigned const char *b, int num)
GSM_Error(* GetDateTime)(GSM_StateMachine *s, GSM_DateTime *date_time)
GSM_Error DCT3DCT4_ReplySetWAPBookmark(GSM_Protocol_Message *msg, GSM_StateMachine *s)
GSM_Error DCT3DCT4_GetCallDivert(GSM_StateMachine *s, GSM_CallDivert *reqest, GSM_MultiCallDivert *response)
unsigned char Title[(50+1) *2]
GSM_Error DCT3DCT4_GetActiveConnectSet(GSM_StateMachine *s)
GSM_Error N71_65_ReplyGetCalendarInfo1(GSM_Protocol_Message *msg, GSM_StateMachine *s, GSM_NOKIACalToDoLocations *LastCalendar)
GSM_Error GSM_UnpackSemiOctetNumber(GSM_Debug_Info *di, unsigned char *retval, const unsigned char *Number, size_t *pos, size_t bufferlength, gboolean semioctet)
GSM_SubCalendarEntry Entries[GSM_CALENDAR_ENTRIES]
GSM_Error N71_65_EnableFunctions(GSM_StateMachine *s, const char *buff, int len)
GSM_Error DCT3DCT4_ReplyGetModelFirmware(GSM_Protocol_Message *msg, GSM_StateMachine *s)
void GSM_GetCurrentDateTime(GSM_DateTime *Date)
GSM_Error N71_65_ReplyUSSDInfo(GSM_Protocol_Message *msg, GSM_StateMachine *s)
time_t Fill_Time_T(GSM_DateTime DT)
gboolean GSM_IsPhoneFeatureAvailable(GSM_PhoneModel *model, GSM_Feature feature)
size_t N71_65_EncodePhonebookFrame(GSM_StateMachine *s, unsigned char *req, GSM_MemoryEntry *entry, size_t *block2, gboolean DCT4, gboolean VoiceTag)
GSM_Phone_Functions * Functions
GSM_Error NOKIA_ReplyGetPhoneString(GSM_Protocol_Message *msg, GSM_StateMachine *s)
GSM_EntryLocation Location
void GSM_CreateFirmwareNumber(GSM_StateMachine *s)
GSM_Error N71_65_AddCalendar2(GSM_StateMachine *s, GSM_CalendarEntry *Note)
unsigned char Text[2 *(GSM_BITMAP_TEXT_LENGTH+1)]
GSM_Error N71_65_ReplyGetMemoryError(unsigned char error, GSM_StateMachine *s)
GSM_Protocol_Functions * Functions
GSM_Error NOKIA_GetManufacturer(GSM_StateMachine *s)
unsigned char Address[(255+1) *2]
void NOKIA_DecodeDateTime(GSM_StateMachine *s, unsigned char *buffer, GSM_DateTime *datetime, gboolean seconds, gboolean DayMonthReverse)
GSM_Error NOKIA_SetIncomingSMS(GSM_StateMachine *s, gboolean enable)
GSM_Error DCT3DCT4_ReplyGetWAPBookmark(GSM_Protocol_Message *msg, GSM_StateMachine *s, gboolean FullLength)
gboolean EnableIncomingSMS
void SplitLines(const char *message, const size_t messagesize, GSM_CutLines *lines, const char *whitespaces, const size_t spaceslen, const char *quotes, const size_t quoteslen, const gboolean eot)
GSM_Error DCT3DCT4_AnswerCall(GSM_StateMachine *s, int ID)
gboolean CheckDate(GSM_DateTime *date)
char Model[GSM_MAX_MODEL_LENGTH+1]
GSM_Error N71_65_ReplySendDTMF(GSM_Protocol_Message *msg, GSM_StateMachine *s)
unsigned char * PhoneString
unsigned char Text[(GSM_MAX_CALENDAR_TEXT_LENGTH+1) *2]
void NOKIA_GetDefaultProfileName(GSM_Profile *Profile)
GSM_Error DCT3DCT4_SendDTMF(GSM_StateMachine *s, char *sequence)
int smprintf(GSM_StateMachine *s, const char *format,...)
GSM_Error N71_65_ReplyWritePhonebook(GSM_Protocol_Message *msg, GSM_StateMachine *s)
GSM_SubMemoryEntry Entries[GSM_PHONEBOOK_ENTRIES]