29 #include "../../gsmcomon.h" 30 #include "../../misc/coding/coding.h" 31 #include "../../gsmphones.h" 32 #include "../../gsmstate.h" 33 #include "../../service/gsmmisc.h" 34 #include "../../protocol/obex/obex.h" 37 #include "../../../helper/string.h" 39 #ifdef GSM_ENABLE_OBEXGEN 47 #define OBEX_TIMEOUT 10 54 switch (msg->
Type & 0x7f) {
79 smprintf(s,
"Internal phone error (0x%02x)\n", msg->
Type);
89 smprintf(s,
"Precondition failed\n");
103 Buffer[(*Pos)++] = 0xCB;
123 smprintf(s,
"Connected/disconnected OK\n");
133 for (i = 4; i < msg->
Length;) {
146 smprintf(s,
"Unknown OBEX header: 0x%02X, skipping rest\n", msg->
Buffer[i]);
153 smprintf(s,
"Wrong request sent to phone!\n");
157 smprintf(s,
"Connection not allowed!\n");
161 if ((msg->
Type & 0x7f) >= 0x40) {
162 return OBEXGEN_HandleError(msg, s);
186 unsigned char req2[200];
187 unsigned char req[200] = {
207 if (error !=
ERR_NONE)
return error;
212 smprintf(s,
"No service requested\n");
215 smprintf(s,
"IrMC service requested\n");
217 req2[0] =
'I'; req2[1] =
'R'; req2[2] =
'M';
218 req2[3] =
'C'; req2[4] =
'-'; req2[5] =
'S';
219 req2[6] =
'Y'; req2[7] =
'N'; req2[8] =
'C';
225 smprintf(s,
"Folder Browsing service requested\n");
227 req2[0] = 0xF9; req2[1] = 0xEC; req2[2] = 0x7B;
228 req2[3] = 0xC4; req2[4] = 0x95; req2[5] = 0x3C;
229 req2[6] = 0x11; req2[7] = 0xD2; req2[8] = 0x98;
230 req2[9] = 0x4E; req2[10]= 0x52; req2[11]= 0x54;
231 req2[12]= 0x00; req2[13]= 0xDC; req2[14]= 0x9E;
241 req2[0] =
'M'; req2[1] =
'O'; req2[2] =
'B';
242 req2[3] =
'E'; req2[4] =
'X';
328 IRMC_InitCapabilities(&(Priv->
NoteCap));
329 IRMC_InitCapabilities(&(Priv->
PbCap));
330 IRMC_InitCapabilities(&(Priv->
CalCap));
347 if (error !=
ERR_NONE)
return error;
359 service_forced =
TRUE;
362 service_forced =
TRUE;
365 service_forced =
TRUE;
368 service_forced =
TRUE;
371 service_forced =
TRUE;
374 service_forced =
TRUE;
395 if (error !=
ERR_NONE)
return error;
490 void OBEXGEN_CreateFileName(
unsigned char *Dest,
unsigned char *Path,
unsigned char *Name)
500 Dest[2*len + 1] =
'/';
510 static void OBEXGEN_FindNextDir(
unsigned char *Path,
size_t *Pos,
unsigned char *Return)
515 if (Path[(*Pos)*2] == 0 && Path[(*Pos)*2+1] == 0)
break;
516 if (Path[(*Pos)*2] == 0 && Path[(*Pos)*2+1] ==
'/') {
520 Return[Retlen*2] = Path[(*Pos)*2];
521 Return[Retlen*2+1] = Path[(*Pos)*2+1];
525 Return[Retlen*2] = 0;
526 Return[Retlen*2+1] = 0;
535 if (msg->
Type == 0x80) {
540 if ((msg->
Type & 0x7f) >= 0x40) {
541 return OBEXGEN_HandleError(msg, s);
559 unsigned char req[400];
573 OBEXGEN_AddConnectionID(s, req, &Current);
590 unsigned char *req, req2[200];
592 if (Buffer == NULL) {
599 error = OBEXGEN_ChangePath(s, NULL, 2);
600 if (error !=
ERR_NONE)
return error;
604 OBEXGEN_FindNextDir(File, &Pos, req);
606 smprintf(s,
"Changing path down to %s (%ld, %ld)\n",
610 error=OBEXGEN_ChangePath(s, req, 2);
611 if (error !=
ERR_NONE)
return error;
623 size_t Pos=0, pos2, len2;
624 char *NewLUID = NULL;
625 char *timestamp = NULL;
627 gboolean UpdatePbLUID, UpdateCalLUID, UpdateTodoLUID;
637 if ((msg->
Type & 0x7f) >= 0x40) {
638 return OBEXGEN_HandleError(msg, s);
643 smprintf(s,
"Last part of file added OK\n");
646 smprintf(s,
"Part of file added OK\n");
648 if (Pos >= msg->
Length)
break;
649 switch (msg->
Buffer[Pos]) {
651 smprintf(s,
"Application data received:");
655 if (pos2 >= len2)
break;
656 switch (msg->
Buffer[Pos + 3 + pos2]) {
667 NewLUID = (
char *)malloc(msg->
Buffer[Pos + 3 + pos2 + 1]+1);
668 memcpy(NewLUID,msg->
Buffer + Pos + 3 + pos2 + 2, msg->
Buffer[Pos + 3 + pos2 + 1]);
669 NewLUID[msg->
Buffer[Pos + 3 + pos2 + 1]]=0;
670 smprintf(s,
" LUID=\"%s\"", NewLUID);
673 CC = (
char *)malloc(msg->
Buffer[Pos + 3 + pos2 + 1]+1);
674 memcpy(CC,msg->
Buffer + Pos + 3 + pos2 + 2, msg->
Buffer[Pos + 3 + pos2 + 1]);
675 CC[msg->
Buffer[Pos + 3 + pos2 + 1]]=0;
679 timestamp = (
char *)malloc(msg->
Buffer[Pos + 3 + pos2 + 1]+1);
680 memcpy(timestamp,msg->
Buffer + Pos + 3 + pos2 + 2, msg->
Buffer[Pos + 3 + pos2 + 1]);
681 timestamp[msg->
Buffer[Pos + 3 + pos2 + 1]] = 0;
682 smprintf(s,
" Timestamp=\"%s\"", timestamp);
685 pos2 += 2 + msg->
Buffer[Pos + 3 + pos2 + 1];
688 if (timestamp != NULL) {
696 if (NewLUID != NULL) {
700 if (Priv->
PbLUID == NULL) {
704 }
else if (UpdateTodoLUID) {
711 }
else if (UpdateCalLUID) {
755 unsigned char req[2000];
756 unsigned char hard_delete_header[2] = {
'\x12',
'\x0'};
762 OBEXGEN_AddConnectionID(s, req, &Current);
769 if (error !=
ERR_NONE)
return error;
773 if (error !=
ERR_NONE)
return error;
799 req[Current++] = 0xC3;
800 req[Current++] = (File->
Used >> 24) & 0xff;
801 req[Current++] = (File->
Used >> 16) & 0xff;
802 req[Current++] = (File->
Used >> 8) & 0xff;
803 req[Current++] = File->
Used & 0xff;
807 OBEXAddBlock(req, &Current, 0x4c, hard_delete_header, 2);
812 if (j > 1000) j = 1000;
814 if (File->
Used - *Pos < j) {
815 j = File->
Used - *Pos;
818 smprintf(s,
"Adding last file part %ld %ld\n", (
long)*Pos, (
long)j);
821 if (error !=
ERR_NONE)
return error;
826 smprintf(s,
"Adding file part %ld %ld\n", (
long)*Pos, (
long)j);
839 if (error !=
ERR_NONE)
return error;
843 error = OBEXGEN_PrivAddFilePart(s, File, Pos, Handle,
FALSE);
859 if (error !=
ERR_NONE)
return error;
865 error = OBEXGEN_PrivAddFilePart(s, File, Pos, Handle,
FALSE);
866 if (error !=
ERR_NONE)
return error;
878 size_t old,Pos=0,len2,pos2;
882 if (msg->
Type == 0x80) {
887 if ((msg->
Type & 0x7f) >= 0x40) {
888 return OBEXGEN_HandleError(msg, s);
893 smprintf(s,
"Last file part received\n");
899 if (Pos >= msg->
Length)
break;
900 switch (msg->
Buffer[Pos]) {
906 smprintf(s,
"Length of file part: %i\n",
923 smprintf(s,
"Application data received:");
927 if (pos2 >= len2)
break;
928 switch (msg->
Buffer[Pos + 3 + pos2]) {
939 pos2 += 2 + msg->
Buffer[Pos + 3 + pos2 + 1];
958 unsigned char req[2000], req2[200];
970 OBEXGEN_AddConnectionID(s, req, &Current);
973 if (File->
Used == 0x00) {
976 strcpy(req2,
"x-obex/folder-listing");
977 OBEXAddBlock(req, &Current, 0x42, req2, strlen(req2)+1);
987 smprintf(s,
"No filename requested, grabbing OBEX capabilities as obex-capability.xml\n");
989 strcpy(req2,
"x-obex/capability");
995 smprintf(s,
"No filename requested, grabbing device information as devinfo.txt\n");
1009 if (error !=
ERR_NONE)
return error;
1031 smprintf(s,
"Getting first file part\n");
1033 while (retries < 5) {
1035 smprintf(s,
"Retry %d\n", retries);
1042 if (error !=
ERR_NONE)
return error;
1047 OBEXGEN_AddConnectionID(s, req, &Current);
1053 smprintf(s,
"Getting next file part\n");
1056 while (retries < 5) {
1058 smprintf(s,
"Retry %d\n", retries);
1065 if (error !=
ERR_NONE)
return error;
1076 if (error !=
ERR_NONE)
return error;
1079 error = OBEXGEN_PrivGetFilePart(s, File,
FALSE);
1080 (*Size) = File->
Used;
1095 unsigned char Line[500],Line2[500],*name,*size;
1101 if (error !=
ERR_NONE)
return error;
1134 if (error !=
ERR_NONE)
return error;
1140 error = OBEXGEN_PrivGetFilePart(s, File,
TRUE);
1148 if (error !=
ERR_NONE)
return error;
1149 if (strlen(Line) == 0)
break;
1150 name = strstr(Line,
"folder name=\"");
1155 if (name[j] ==
'"')
break;
1160 if (strcmp(name,
".")) num++;
1162 name = strstr(Line,
"file name=\"");
1163 if (name != NULL) num++;
1180 if (error !=
ERR_NONE)
return error;
1181 if (strlen(Line) == 0)
break;
1183 name = strstr(Line2,
"folder name=\"");
1188 if (name[j] ==
'"')
break;
1192 if (strcmp(name,
".")) {
1197 OBEXGEN_CreateFileName(
1209 name = strstr(Line2,
"file name=\"");
1214 if (name[j] ==
'"')
break;
1222 OBEXGEN_CreateFileName(
1232 size = strstr(Line2,
"size=\"");
1237 size = strstr(Line2,
"modified=\"");
1269 unsigned char req[200],req2[200];
1273 if (error !=
ERR_NONE)
return error;
1280 error = OBEXGEN_ChangeToFilePath(s, ID,
TRUE, req2);
1281 if (error !=
ERR_NONE)
return error;
1287 OBEXGEN_AddConnectionID(s, req, &Current);
1298 if (error !=
ERR_NONE)
return error;
1306 if (error !=
ERR_NONE)
return error;
1310 error = OBEXGEN_ChangePath(s, File->
Name, 0);
1311 if (error !=
ERR_NONE)
return error;
1335 memset(&File, 0,
sizeof(
GSM_File));
1342 error = OBEXGEN_PrivGetFilePart(s, &File,
FALSE);
1347 if (File.
Buffer != NULL) {
1368 error = OBEXGEN_GetFile(s, FileName, (
unsigned char **)Buffer, len);
1369 if (error !=
ERR_NONE)
return error;
1372 smprintf(s,
"Got %ld bytes of data\n", (
long int)*len);
1373 *Buffer = (
unsigned char *)realloc(*Buffer, *len + 1);
1374 if (*Buffer == NULL) {
1377 (*Buffer)[*len] = 0;
1405 File.
Buffer = (
unsigned char *)Buffer;
1409 error = OBEXGEN_PrivAddFilePart(s, &File, &Pos, &Handle, HardDelete);
1434 int maximum_records = -1;
1435 int used_records = -1;
1436 int free_records = -1;
1437 char free_text[] =
"Free-Records:";
1438 char used_text[] =
"Total-Records:";
1439 char maximum_text[] =
"Maximum-Records:";
1440 char IEL_text[] =
"IEL:";
1441 char HD_text[] =
"HD:";
1443 smprintf(s,
"OBEX info data:\n---\n%s\n---\n", data);
1445 pos = strstr(data, IEL_text);
1447 smprintf(s,
"Could not grab Information Exchange Level, phone does not support it\n");
1450 pos += strlen(IEL_text);
1452 if (pos[0] != 0 && pos[0] ==
'0' && pos[1] != 0 && pos[1] ==
'x') {
1454 IEL = strtol(pos + 2, (
char **)NULL, 16);
1471 smprintf(s,
"Information Exchange Level 1 supported\n");
1474 smprintf(s,
"Information Exchange Level 1 and 2 supported\n");
1477 smprintf(s,
"Information Exchange Level 1, 2 and 3 supported\n");
1480 smprintf(s,
"Information Exchange Level 1, 2 and 4 supported\n");
1483 smprintf(s,
"Information Exchange Level 1, 2, 3 and 4 supported\n");
1486 smprintf(s,
"Could not parse Information Exchange Level (0x%x)\n", IEL);
1494 pos = strstr(data, HD_text);
1496 smprintf(s,
"Could not grab HD support\n");
1498 pos += strlen(HD_text);
1499 if (strncasecmp(
"YES", pos, 3) == 0) {
1504 }
else if (strncasecmp(
"NO", pos, 2) == 0) {
1505 smprintf(s,
"HD is not supported\n");
1507 smprintf(s,
"WARNING: Could not parse HD support\n");
1511 pos = strstr(data, free_text);
1513 smprintf(s,
"Could not grab number of free records\n");
1515 pos += strlen(free_text);
1516 free_records = atoi(pos);
1517 smprintf(s,
"Number of free records: %d\n", free_records);
1520 pos = strstr(data, used_text);
1522 smprintf(s,
"Could not grab number of used records\n");
1524 pos += strlen(used_text);
1525 used_records = atoi(pos);
1526 smprintf(s,
"Number of used records: %d\n", used_records);
1529 pos = strstr(data, maximum_text);
1531 smprintf(s,
"Could not grab number of maximum records\n");
1533 pos += strlen(maximum_text);
1534 maximum_records = atoi(pos);
1535 smprintf(s,
"Number of maximum records: %d\n", maximum_records);
1538 if (free_out != NULL) {
1539 if (free_records != -1) {
1540 *free_out = free_records;
1541 }
else if (maximum_records != -1 && used_records != -1) {
1542 *free_out = maximum_records - used_records;
1545 smprintf(s,
"Could not grab number of free records\n");
1550 if (used_out != NULL) {
1551 if (used_records != -1) {
1552 *used_out = used_records;
1553 }
else if (maximum_records != -1 && free_records != -1) {
1554 *used_out = maximum_records - free_records;
1557 smprintf(s,
"Could not grab number of used records\n");
1578 if (error !=
ERR_NONE)
return error;
1589 if (free_records == NULL) {
1602 error = OBEXGEN_ParseInfoLog(s, data, free_records, used_records, Cap);
1612 int OBEXGEN_GetFirstFreeLocation(
int **IndexStorage,
int *IndexCount) {
1617 for (i = 0; i < *IndexCount; i++) {
1618 if (*IndexStorage[i] > max) {
1619 max = (*IndexStorage)[i];
1628 *IndexStorage = (
int *)realloc(*IndexStorage, (*IndexCount + 1) *
sizeof(int));
1629 (*IndexStorage)[*IndexCount] = max;
1640 char **Data,
int **Offsets,
int *Count,
1641 char ***LUIDStorage,
int *LUIDCount,
1642 int **IndexStorage,
int *IndexCount)
1658 if (*Data != NULL) {
1668 if (!Recalculate || *Data == NULL) {
1671 if (error !=
ERR_NONE)
return error;
1674 if (error !=
ERR_NONE)
return error;
1680 *LUIDStorage = NULL;
1682 *IndexStorage = NULL;
1683 len = strlen(*Data);
1684 hlen = strlen(Header);
1689 error =
MyGetLine(*Data, &linepos, line, len,
sizeof(line),
TRUE);
1690 if (error !=
ERR_NONE)
return error;
1691 if (strlen(line) == 0)
break;
1694 if (strncmp(line, Header, hlen) == 0) {
1698 if (*Count >= Size) {
1700 *Offsets = (
int *)realloc(*Offsets, Size *
sizeof(
int));
1701 if (*Offsets == NULL) {
1706 (*Offsets)[*Count] = prevpos;
1707 }
else if (strncmp(line,
"BEGIN:VCALENDAR", 15) == 0) {
1709 }
else if (strncmp(line,
"BEGIN:", 6) == 0) {
1715 if (strncmp(line,
"END:", 4) == 0) {
1717 }
else if (strncmp(line,
"X-IRMC-LUID:", 12) == 0) {
1721 if (*LUIDCount >= LUIDSize) {
1723 *LUIDStorage = (
char **)realloc(*LUIDStorage, LUIDSize *
sizeof(
char *));
1724 if (*LUIDStorage == NULL) {
1729 (*LUIDStorage)[*LUIDCount] = strdup(pos);
1731 smprintf(s,
"Added LUID %s at position %d\n", (*LUIDStorage)[*LUIDCount], *LUIDCount);
1733 }
else if (strncmp(line,
"X-INDEX:", 8) == 0) {
1737 if (*IndexCount >= IndexSize) {
1739 *IndexStorage = (
int *)realloc(*IndexStorage, IndexSize *
sizeof(
int));
1740 if (*IndexStorage == NULL) {
1745 (*IndexStorage)[*IndexCount] = atoi(pos);
1747 smprintf(s,
"Added Index %d at position %d\n", (*IndexStorage)[*IndexCount], *IndexCount);
1752 if (strncmp(line,
"END:", 4) == 0) level = 0;
1757 smprintf(s,
"Data parsed, found %d entries, %d indexes and %d LUIDs\n", *Count, *IndexCount, *LUIDCount);
1777 return OBEXGEN_GetInformation(s,
"telecom/pb/info.log", free_records, used, &(Priv->
PbCap));
1810 return OBEXGEN_InitLUID(s,
"telecom/pb.vcf",
FALSE,
"BEGIN:VCARD",
1826 error = OBEXGEN_InitPbLUID(s);
1827 if (error !=
ERR_NONE)
return error;
1830 path = (
char *)malloc(20 + 22);
1834 sprintf(path,
"telecom/pb/%d.vcf", Entry->
Location);
1835 smprintf(s,
"Getting vCard %s\n", path);
1843 if (error !=
ERR_NONE)
return error;
1850 if (error !=
ERR_NONE)
return error;
1866 error = OBEXGEN_InitPbLUID(s);
1867 if (error !=
ERR_NONE)
return error;
1874 path = (
char *)malloc(strlen(Priv->
PbLUID[Entry->
Location]) + 22);
1878 sprintf(path,
"telecom/pb/luid/%s.vcf", Priv->
PbLUID[Entry->
Location]);
1879 smprintf(s,
"Getting vCard %s\n", path);
1885 if (error !=
ERR_NONE)
return error;
1891 if (error !=
ERR_NONE)
return error;
1906 error = OBEXGEN_InitPbLUID(s);
1907 if (error !=
ERR_NONE)
return error;
1914 if (error !=
ERR_NONE)
return error;
1935 if (error !=
ERR_NONE)
return error;
1939 error = OBEXGEN_GetPbInformation(s, NULL, NULL);
1940 if (error !=
ERR_NONE)
return error;
1945 return OBEXGEN_GetMemoryLUID(s, Entry);
1946 }
else if (Priv->
PbCap.
IEL == 0x4) {
1947 return OBEXGEN_GetMemoryIndex(s, Entry);
1948 }
else if (Priv->
PbCap.
IEL == 0x2) {
1949 return OBEXGEN_GetMemoryFull(s, Entry);
1951 smprintf(s,
"Can not read phonebook from IEL 1 phone\n");
1997 unsigned char req[5000];
2007 if (error !=
ERR_NONE)
return error;
2016 if (error !=
ERR_NONE)
return error;
2020 error = OBEXGEN_GetPbInformation(s, NULL, NULL);
2021 if (error !=
ERR_NONE)
return error;
2027 error = OBEXGEN_InitPbLUID(s);
2028 if (error !=
ERR_NONE)
return error;
2030 smprintf(s,
"Adding phonebook entry %ld:\n%s\n", (
long)size, req);
2036 }
else if (Priv->
PbCap.
IEL == 0x4) {
2038 error = OBEXGEN_InitPbLUID(s);
2039 if (error !=
ERR_NONE)
return error;
2042 smprintf(s,
"Adding phonebook entry %ld at location %d:\n%s\n", (
long)size, Entry->
Location, req);
2043 sprintf(path,
"telecom/pb/%d.vcf", Entry->
Location);
2050 smprintf(s,
"Sending phonebook entry\n");
2061 error = OBEXGEN_InitPbLUID(s);
2062 if (error !=
ERR_NONE)
return error;
2074 path = (
char *)malloc(strlen(Priv->
PbLUID[Entry->
Location]) + 22);
2078 sprintf(path,
"telecom/pb/luid/%s.vcf", Priv->
PbLUID[Entry->
Location]);
2106 path = (
char *)malloc(20 + 22);
2110 sprintf(path,
"telecom/pb/%d.vcf", Entry->
Location);
2111 smprintf(s,
"Seting vCard %s\n", path);
2121 unsigned char req[5000];
2130 if (error !=
ERR_NONE)
return error;
2139 if (error !=
ERR_NONE)
return error;
2143 error = OBEXGEN_GetPbInformation(s, NULL, NULL);
2144 if (error !=
ERR_NONE)
return error;
2149 return OBEXGEN_SetMemoryLUID(s, Entry, req, size);
2150 }
else if (Priv->
PbCap.
IEL == 0x4) {
2151 return OBEXGEN_SetMemoryIndex(s, Entry, req, size);
2152 }
else if (Priv->
PbCap.
IEL == 0x2) {
2175 if (error !=
ERR_NONE)
return error;
2179 error = OBEXGEN_GetPbInformation(s, NULL, NULL);
2180 if (error !=
ERR_NONE)
return error;
2185 return OBEXGEN_SetMemoryLUID(s, Entry,
"", 0);
2186 }
else if (Priv->
PbCap.
IEL == 0x4) {
2187 return OBEXGEN_SetMemoryIndex(s, Entry,
"", 0);
2188 }
else if (Priv->
PbCap.
IEL == 0x2) {
2207 if (error !=
ERR_NONE)
return error;
2210 error = OBEXGEN_InitPbLUID(s);
2211 if (error !=
ERR_NONE)
return error;
2239 return OBEXGEN_GetInformation(s,
"telecom/cal/info.log", free_records, used, &(Priv->
CalCap));
2254 error = OBEXGEN_InitLUID(s,
"telecom/cal.vcs",
FALSE,
"BEGIN:VEVENT",
2258 if (error !=
ERR_NONE)
return error;
2259 return OBEXGEN_InitLUID(s,
"telecom/cal.vcs",
TRUE,
"BEGIN:VTODO",
2285 error = OBEXGEN_InitCalLUID(s);
2286 if (error !=
ERR_NONE)
return error;
2290 return OBEXGEN_GetCalInformation(s, &(Status->
Free), NULL);
2305 error = OBEXGEN_InitCalLUID(s);
2306 if (error !=
ERR_NONE)
return error;
2309 path = (
char *)malloc(20 + 22);
2313 sprintf(path,
"telecom/cal/%d.vcs", Entry->
Location);
2314 smprintf(s,
"Getting vCalendar %s\n", path);
2321 if (error !=
ERR_NONE)
return error;
2327 if (error !=
ERR_NONE)
return error;
2344 error = OBEXGEN_InitCalLUID(s);
2345 if (error !=
ERR_NONE)
return error;
2356 sprintf(path,
"telecom/cal/luid/%s.vcs", Priv->
CalLUID[Entry->
Location]);
2357 smprintf(s,
"Getting vCalendar %s\n", path);
2363 if (error !=
ERR_NONE)
return error;
2369 if (error !=
ERR_NONE)
return error;
2385 error = OBEXGEN_InitCalLUID(s);
2386 if (error !=
ERR_NONE)
return error;
2393 if (error !=
ERR_NONE)
return error;
2410 if (error !=
ERR_NONE)
return error;
2414 error = OBEXGEN_GetCalInformation(s, NULL, NULL);
2415 if (error !=
ERR_NONE)
return error;
2420 return OBEXGEN_GetCalendarLUID(s, Entry);
2422 return OBEXGEN_GetCalendarIndex(s, Entry);
2424 return OBEXGEN_GetCalendarFull(s, Entry);
2426 smprintf(s,
"Can not read calendar from IEL 1 phone\n");
2471 unsigned char req[5000];
2479 if (error !=
ERR_NONE)
return error;
2488 if (error !=
ERR_NONE)
return error;
2492 error = OBEXGEN_GetCalInformation(s, NULL, NULL);
2493 if (error !=
ERR_NONE)
return error;
2499 error = OBEXGEN_InitCalLUID(s);
2500 if (error !=
ERR_NONE)
return error;
2502 smprintf(s,
"Adding calendar entry %ld:\n%s\n", (
long)size, req);
2510 error = OBEXGEN_InitCalLUID(s);
2511 if (error !=
ERR_NONE)
return error;
2514 smprintf(s,
"Adding calendar entry %ld at location %d:\n%s\n", (
long)size, Entry->
Location, req);
2515 sprintf(path,
"telecom/cal/%d.vcf", Entry->
Location);
2522 smprintf(s,
"Sending calendar entry\n");
2533 error = OBEXGEN_InitCalLUID(s);
2534 if (error !=
ERR_NONE)
return error;
2550 sprintf(path,
"telecom/cal/luid/%s.vcs", Priv->
CalLUID[Entry->
Location]);
2551 smprintf(s,
"Seting vCalendar %s\n", path);
2578 path = (
char *)malloc(20 + 22);
2582 sprintf(path,
"telecom/cal/%d.vcs", Entry->
Location);
2583 smprintf(s,
"Seting vCalendar %s\n", path);
2593 unsigned char req[5000];
2600 if (error !=
ERR_NONE)
return error;
2609 if (error !=
ERR_NONE)
return error;
2613 error = OBEXGEN_GetCalInformation(s, NULL, NULL);
2614 if (error !=
ERR_NONE)
return error;
2619 return OBEXGEN_SetCalendarLUID(s, Entry, req, size);
2621 return OBEXGEN_SetCalendarIndex(s, Entry, req, size);
2642 if (error !=
ERR_NONE)
return error;
2646 error = OBEXGEN_GetCalInformation(s, NULL, NULL);
2647 if (error !=
ERR_NONE)
return error;
2652 return OBEXGEN_SetCalendarLUID(s, Entry,
"", 0);
2654 return OBEXGEN_SetCalendarIndex(s, Entry,
"", 0);
2671 if (error !=
ERR_NONE)
return error;
2674 error = OBEXGEN_InitCalLUID(s);
2675 if (error !=
ERR_NONE)
return error;
2707 error = OBEXGEN_InitCalLUID(s);
2708 if (error !=
ERR_NONE)
return error;
2712 return OBEXGEN_GetCalInformation(s, &(Status->
Free), NULL);
2728 path = (
char *)malloc(20 + 22);
2732 sprintf(path,
"telecom/cal/%d.vcs", Entry->
Location);
2733 smprintf(s,
"Getting vTodo %s\n", path);
2740 if (error !=
ERR_NONE)
return error;
2746 if (error !=
ERR_NONE)
return error;
2763 error = OBEXGEN_InitCalLUID(s);
2764 if (error !=
ERR_NONE)
return error;
2776 smprintf(s,
"Getting vTodo %s\n", path);
2782 if (error !=
ERR_NONE)
return error;
2788 if (error !=
ERR_NONE)
return error;
2804 error = OBEXGEN_InitCalLUID(s);
2805 if (error !=
ERR_NONE)
return error;
2812 if (error !=
ERR_NONE)
return error;
2829 if (error !=
ERR_NONE)
return error;
2833 error = OBEXGEN_GetCalInformation(s, NULL, NULL);
2834 if (error !=
ERR_NONE)
return error;
2839 return OBEXGEN_GetTodoLUID(s, Entry);
2841 return OBEXGEN_GetTodoIndex(s, Entry);
2843 return OBEXGEN_GetTodoFull(s, Entry);
2845 smprintf(s,
"Can not read todo from IEL 1 phone\n");
2893 unsigned char req[5000];
2901 if (error !=
ERR_NONE)
return error;
2910 if (error !=
ERR_NONE)
return error;
2914 error = OBEXGEN_GetCalInformation(s, NULL, NULL);
2915 if (error !=
ERR_NONE)
return error;
2921 error = OBEXGEN_InitCalLUID(s);
2922 if (error !=
ERR_NONE)
return error;
2924 smprintf(s,
"Adding todo entry %ld:\n%s\n", (
long)size, req);
2932 error = OBEXGEN_InitCalLUID(s);
2933 if (error !=
ERR_NONE)
return error;
2936 smprintf(s,
"Adding todo entry %ld at location %d:\n%s\n", (
long)size, Entry->
Location, req);
2937 sprintf(path,
"telecom/cal/%d.vcf", Entry->
Location);
2944 smprintf(s,
"Sending todo entry\n");
2955 error = OBEXGEN_InitCalLUID(s);
2956 if (error !=
ERR_NONE)
return error;
2973 smprintf(s,
"Seting vTodo %s\n", path);
3000 path = (
char *)malloc(20 + 22);
3004 sprintf(path,
"telecom/cal/%d.vcs", Entry->
Location);
3005 smprintf(s,
"Seting vTodo %s\n", path);
3015 unsigned char req[5000];
3022 if (error !=
ERR_NONE)
return error;
3032 if (error !=
ERR_NONE)
return error;
3036 error = OBEXGEN_GetCalInformation(s, NULL, NULL);
3037 if (error !=
ERR_NONE)
return error;
3042 return OBEXGEN_SetTodoLUID(s, Entry, req, size);
3044 return OBEXGEN_SetTodoIndex(s, Entry, req, size);
3065 if (error !=
ERR_NONE)
return error;
3069 error = OBEXGEN_GetCalInformation(s, NULL, NULL);
3070 if (error !=
ERR_NONE)
return error;
3075 return OBEXGEN_SetTodoLUID(s, Entry,
"", 0);
3077 return OBEXGEN_SetTodoIndex(s, Entry,
"", 0);
3094 if (error !=
ERR_NONE)
return error;
3097 error = OBEXGEN_InitCalLUID(s);
3098 if (error !=
ERR_NONE)
return error;
3125 return OBEXGEN_GetInformation(s,
"telecom/nt/info.log", free_records, used, &(Priv->
NoteCap));
3134 return OBEXGEN_GetNoteInformation(s, &(Status->
Free), &(Status->
Used));
3148 return OBEXGEN_InitLUID(s,
"telecom/nt.vcf",
FALSE,
"BEGIN:VNOTE",
3164 error = OBEXGEN_InitNoteLUID(s);
3165 if (error !=
ERR_NONE)
return error;
3168 path = (
char *)malloc(20 + 22);
3172 sprintf(path,
"telecom/nt/%d.vnt", Entry->
Location);
3173 smprintf(s,
"Getting vNote %s\n", path);
3180 if (error !=
ERR_NONE)
return error;
3186 if (error !=
ERR_NONE)
return error;
3202 error = OBEXGEN_InitNoteLUID(s);
3203 if (error !=
ERR_NONE)
return error;
3215 smprintf(s,
"Getting vNote %s\n", path);
3221 if (error !=
ERR_NONE)
return error;
3227 if (error !=
ERR_NONE)
return error;
3242 error = OBEXGEN_InitNoteLUID(s);
3243 if (error !=
ERR_NONE)
return error;
3250 if (error !=
ERR_NONE)
return error;
3262 if (error !=
ERR_NONE)
return error;
3266 error = OBEXGEN_GetNoteInformation(s, NULL, NULL);
3267 if (error !=
ERR_NONE)
return error;
3272 return OBEXGEN_GetNoteLUID(s, Entry);
3274 return OBEXGEN_GetNoteIndex(s, Entry);
3276 return OBEXGEN_GetNoteFull(s, Entry);
3278 smprintf(s,
"Can not read note from IEL 1 phone\n");
3318 unsigned char req[5000];
3326 if (error !=
ERR_NONE)
return error;
3330 error = OBEXGEN_GetNoteInformation(s, NULL, NULL);
3331 if (error !=
ERR_NONE)
return error;
3336 if (error !=
ERR_NONE)
return error;
3341 error = OBEXGEN_InitNoteLUID(s);
3342 if (error !=
ERR_NONE)
return error;
3344 smprintf(s,
"Adding note entry %ld:\n%s\n", (
long)size, req);
3352 error = OBEXGEN_InitNoteLUID(s);
3353 if (error !=
ERR_NONE)
return error;
3356 smprintf(s,
"Adding note entry %ld at location %d:\n%s\n", (
long)size, Entry->
Location, req);
3357 sprintf(path,
"telecom/nt/%d.vcf", Entry->
Location);
3364 smprintf(s,
"Sending note entry\n");
3375 error = OBEXGEN_InitNoteLUID(s);
3376 if (error !=
ERR_NONE)
return error;
3393 smprintf(s,
"Seting vNote %s\n", path);
3420 path = (
char *)malloc(20 + 22);
3424 sprintf(path,
"telecom/nt/%d.vnt", Entry->
Location);
3425 smprintf(s,
"Seting vNote %s\n", path);
3435 unsigned char req[5000];
3442 if (error !=
ERR_NONE)
return error;
3446 error = OBEXGEN_GetNoteInformation(s, NULL, NULL);
3447 if (error !=
ERR_NONE)
return error;
3452 if (error !=
ERR_NONE)
return error;
3456 return OBEXGEN_SetNoteLUID(s, Entry, req, size);
3458 return OBEXGEN_SetNoteIndex(s, Entry, req, size);
3474 if (error !=
ERR_NONE)
return error;
3478 error = OBEXGEN_GetNoteInformation(s, NULL, NULL);
3479 if (error !=
ERR_NONE)
return error;
3484 return OBEXGEN_SetNoteLUID(s, Entry,
"", 0);
3486 return OBEXGEN_SetNoteIndex(s, Entry,
"", 0);
3503 if (error !=
ERR_NONE)
return error;
3506 error = OBEXGEN_InitNoteLUID(s);
3507 if (error !=
ERR_NONE)
return error;
3538 strcat(match, Name);
3543 pos += strlen(match);
3547 while (*pos != 0 && *pos !=
'\r' && *pos !=
'\n') {
3548 *(dest++) = *(pos++);
3567 strcat(match, Name);
3572 pos_start += strlen(match);
3576 strcat(match,
"</");
3577 strcat(match, Name);
3580 pos_end = strstr(pos_start, match);
3584 strncpy(Dest, pos_start, pos_end - pos_start);
3585 Dest[pos_end - pos_start] = 0;
3602 strcat(match, Name);
3606 pos_start += strlen(match);
3610 strcat(match, Attrib);
3611 strcat(match,
"=\"");
3613 pos_start = strstr(pos_start, match);
3615 pos_start += strlen(match);
3618 pos_end = strchr(pos_start,
'"');
3622 strncpy(Dest, pos_start, pos_end - pos_start);
3623 Dest[pos_end - pos_start] = 0;
3647 error = OBEXGEN_GetCapabilityField(s,
"Model", s->
Phone.
Data.
Model);
3671 error = OBEXGEN_GetCapabilityFieldAttrib(s,
"SW",
"Version", s->
Phone.
Data.
Version);
3688 error = OBEXGEN_GetCapabilityField(s,
"SN", s->
Phone.
Data.
IMEI);
3691 return OBEXGEN_GetDevinfoField(s,
"SN", s->
Phone.
Data.
IMEI);
3697 {OBEXGEN_ReplyAddFilePart,
"\x90",0x00,0x00,
ID_AddFile },
3698 {OBEXGEN_ReplyGetFilePart,
"\x90",0x00,0x00,
ID_GetFile },
3701 {OBEXGEN_ReplyChangePath,
"\xA0",0x00,0x00,
ID_SetPath },
3703 {OBEXGEN_ReplyAddFilePart,
"\xA0",0x00,0x00,ID_AddFile },
3704 {OBEXGEN_ReplyGetFilePart,
"\xA0",0x00,0x00,ID_GetFile },
3707 {OBEXGEN_ReplyChangePath,
"\xA1",0x00,0x00,ID_SetPath },
3710 {OBEXGEN_ReplyConnect,
"\xC0",0x00,0x00,ID_Initialise },
3711 {OBEXGEN_ReplyGetFilePart,
"\xC0",0x00,0x00,ID_GetFile },
3712 {OBEXGEN_ReplyAddFilePart,
"\xC0",0x00,0x00,ID_AddFile },
3715 {OBEXGEN_ReplyConnect,
"\xC1",0x00,0x00,ID_Initialise },
3716 {OBEXGEN_ReplyGetFilePart,
"\xC1",0x00,0x00,ID_GetFile },
3717 {OBEXGEN_ReplyAddFilePart,
"\xC1",0x00,0x00,ID_AddFile },
3720 {OBEXGEN_ReplyConnect,
"\xC3",0x00,0x00,ID_Initialise },
3721 {OBEXGEN_ReplyChangePath,
"\xC3",0x00,0x00,ID_SetPath },
3722 {OBEXGEN_ReplyGetFilePart,
"\xC3",0x00,0x00,ID_GetFile },
3723 {OBEXGEN_ReplyAddFilePart,
"\xC3",0x00,0x00,ID_AddFile },
3726 {OBEXGEN_ReplyConnect,
"\xC6",0x00,0x00,ID_Initialise },
3727 {OBEXGEN_ReplyChangePath,
"\xC6",0x00,0x00,ID_SetPath },
3728 {OBEXGEN_ReplyGetFilePart,
"\xC6",0x00,0x00,ID_GetFile },
3729 {OBEXGEN_ReplyAddFilePart,
"\xC6",0x00,0x00,ID_AddFile },
3732 {OBEXGEN_ReplyConnect,
"\xC9",0x00,0x00,ID_Initialise },
3733 {OBEXGEN_ReplyChangePath,
"\xC9",0x00,0x00,ID_SetPath },
3734 {OBEXGEN_ReplyGetFilePart,
"\xC9",0x00,0x00,ID_GetFile },
3735 {OBEXGEN_ReplyAddFilePart,
"\xC9",0x00,0x00,ID_AddFile },
3738 {OBEXGEN_ReplyConnect,
"\xC4",0x00,0x00,ID_Initialise },
3739 {OBEXGEN_ReplyChangePath,
"\xC4",0x00,0x00,ID_SetPath },
3740 {OBEXGEN_ReplyGetFilePart,
"\xC4",0x00,0x00,ID_GetFile },
3741 {OBEXGEN_ReplyChangePath,
"\xC4",0x00,0x00,ID_SetPath },
3744 {OBEXGEN_ReplyConnect,
"\xCC",0x00,0x00,ID_Initialise },
3745 {OBEXGEN_ReplyChangePath,
"\xCC",0x00,0x00,ID_SetPath },
3746 {OBEXGEN_ReplyGetFilePart,
"\xCC",0x00,0x00,ID_GetFile },
3747 {OBEXGEN_ReplyAddFilePart,
"\xCC",0x00,0x00,ID_AddFile },
3750 {OBEXGEN_ReplyGetFilePart,
"\x80",0x00,0x00,ID_GetFile },
3751 {OBEXGEN_ReplyChangePath,
"\x80",0x00,0x00,ID_SetPath },
3754 {OBEXGEN_ReplyConnect,
"\xD0",0x00,0x00,ID_Initialise },
3755 {OBEXGEN_ReplyChangePath,
"\xD0",0x00,0x00,ID_SetPath },
3756 {OBEXGEN_ReplyGetFilePart,
"\xD0",0x00,0x00,ID_GetFile },
3757 {OBEXGEN_ReplyAddFilePart,
"\xD0",0x00,0x00,ID_AddFile },
3760 {OBEXGEN_ReplyConnect,
"\xD1",0x00,0x00,ID_Initialise },
3761 {OBEXGEN_ReplyChangePath,
"\xD1",0x00,0x00,ID_SetPath },
3762 {OBEXGEN_ReplyGetFilePart,
"\xD1",0x00,0x00,ID_GetFile },
3763 {OBEXGEN_ReplyAddFilePart,
"\xD1",0x00,0x00,ID_AddFile },
3766 {OBEXGEN_ReplyConnect,
"\xD3",0x00,0x00,ID_Initialise },
3767 {OBEXGEN_ReplyChangePath,
"\xD3",0x00,0x00,ID_SetPath },
3768 {OBEXGEN_ReplyGetFilePart,
"\xD3",0x00,0x00,ID_GetFile },
3769 {OBEXGEN_ReplyAddFilePart,
"\xD3",0x00,0x00,ID_AddFile },
3772 {OBEXGEN_ReplyConnect,
"\xE0",0x00,0x00,ID_Initialise },
3773 {OBEXGEN_ReplyChangePath,
"\xE0",0x00,0x00,ID_SetPath },
3774 {OBEXGEN_ReplyGetFilePart,
"\xE0",0x00,0x00,ID_GetFile },
3775 {OBEXGEN_ReplyAddFilePart,
"\xE0",0x00,0x00,ID_AddFile },
3778 {OBEXGEN_ReplyConnect,
"\xE1",0x00,0x00,ID_Initialise },
3779 {OBEXGEN_ReplyChangePath,
"\xE1",0x00,0x00,ID_SetPath },
3780 {OBEXGEN_ReplyGetFilePart,
"\xE1",0x00,0x00,ID_GetFile },
3781 {OBEXGEN_ReplyAddFilePart,
"\xE1",0x00,0x00,ID_AddFile },
3783 {NULL,
"\x00",0x00,0x00,
ID_None }
3787 "obex|seobex|obexfs|obexirmc|obexnone|mobex",
3794 OBEXGEN_GetManufacturer,
3796 OBEXGEN_GetFirmware,
GSM_Error GSM_EncodeVCALENDAR(char *Buffer, const size_t buff_len, size_t *Length, GSM_CalendarEntry *note, const gboolean header, const GSM_VCalendarVersion Version)
GSM_Config * CurrentConfig
GSM_Error MOBEX_GetTodo(GSM_StateMachine *s, GSM_ToDoEntry *Entry)
GSM_Error MOBEX_CreateEntry(GSM_StateMachine *s, const char *path, unsigned char type, int *location, const char *data)
GSM_Error MOBEX_GetMemory(GSM_StateMachine *s, GSM_MemoryEntry *Entry)
GSM_Error OBEXGEN_DeleteFile(GSM_StateMachine *s, unsigned char *ID)
unsigned char Name[2 *(GSM_MAX_FILENAME_LENGTH+1)]
GSM_Error OBEXGEN_GetNextCalendar(GSM_StateMachine *s, GSM_CalendarEntry *Entry, gboolean start)
size_t m_obex_contacts_buffer_pos
size_t m_obex_calendar_buffer_size
unsigned char ID_FullName[2 *(GSM_MAX_FILENAME_ID_LENGTH+1)]
GSM_Error GSM_EncodeVCARD(GSM_Debug_Info *di, char *Buffer, const size_t buff_len, size_t *Length, GSM_MemoryEntry *pbk, const gboolean header, const GSM_VCardVersion Version)
char * DecodeUnicodeString(const unsigned char *src)
void CopyUnicodeString(unsigned char *Dest, const unsigned char *Source)
GSM_Error MOBEX_UpdateEntry(GSM_StateMachine *s, const char *path, const int location, unsigned char type, const char *data)
unsigned char * m_obex_calendar_buffer
GSM_MemoryType MemoryType
size_t m_obex_calendar_buffer_pos
GSM_Error OBEXGEN_Connect(GSM_StateMachine *s, OBEX_Service service)
unsigned char * m_obex_appdata
void OBEXAddBlock(char *Buffer, int *Pos, unsigned char ID, const char *AddData, int AddLength)
GSM_Error OBEXGEN_GetMemoryStatus(GSM_StateMachine *s, GSM_MemoryStatus *Status)
char VerDate[GSM_MAX_VERSION_DATE_LENGTH+1]
GSM_Error OBEXGEN_SetMemory(GSM_StateMachine *s, GSM_MemoryEntry *Entry)
GSM_Error OBEXGEN_GetFilePart(GSM_StateMachine *s, GSM_File *File, int *Handle, size_t *Size)
int FilesLocationsCurrent
GSM_Error GSM_DispatchMessage(GSM_StateMachine *s)
GSM_Error OBEXGEN_GetNoteStatus(GSM_StateMachine *s, GSM_ToDoStatus *Status)
unsigned char * m_obex_contacts_buffer
size_t UnicodeLength(const unsigned char *str)
GSM_Error OBEXGEN_SetFile(GSM_StateMachine *s, const char *FileName, const unsigned char *Buffer, size_t Length, gboolean HardDelete)
GSM_Error OBEXGEN_DeleteTodo(GSM_StateMachine *s, GSM_ToDoEntry *Entry)
GSM_Error OBEXGEN_GetNextMemory(GSM_StateMachine *s, GSM_MemoryEntry *entry, gboolean start)
GSM_Error OBEXGEN_DeleteCalendar(GSM_StateMachine *s, GSM_CalendarEntry *Entry)
OBEX_Service InitialService
char IMEI[GSM_MAX_IMEI_LENGTH+1]
char Version[GSM_MAX_VERSION_LENGTH+1]
char Manufacturer[GSM_MAX_MANUFACTURER_LENGTH+1]
GSM_PhoneModel * ModelInfo
GSM_Error OBEXGEN_AddNote(GSM_StateMachine *s, GSM_NoteEntry *Entry)
GSM_Error OBEXGEN_AddCalendar(GSM_StateMachine *s, GSM_CalendarEntry *Entry)
GSM_Error OBEXGEN_GetCalendarStatus(GSM_StateMachine *s, GSM_CalendarStatus *Status)
GSM_Error OBEXGEN_AddMemory(GSM_StateMachine *s, GSM_MemoryEntry *Entry)
GSM_Error OBEXGEN_SetCalendar(GSM_StateMachine *s, GSM_CalendarEntry *Entry)
int m_obex_calendar_nextid
gboolean ReadVCALDateTime(const char *Buffer, GSM_DateTime *dt)
GSM_Error OBEXGEN_GetTodoStatus(GSM_StateMachine *s, GSM_ToDoStatus *Status)
GSM_Error OBEXGEN_DeleteMemory(GSM_StateMachine *s, GSM_MemoryEntry *Entry)
GSM_Error OBEXGEN_GetMemory(GSM_StateMachine *s, GSM_MemoryEntry *Entry)
GSM_PhoneModel * GetModelData(GSM_StateMachine *s, const char *model, const char *number, const char *irdamodel)
void EncodeUnicode(unsigned char *dest, const char *src, size_t len)
struct GSM_Phone_Data::@2 Priv
GSM_Error OBEXGEN_DeleteAllMemory(GSM_StateMachine *, GSM_MemoryType MemoryTypes)
GSM_Error MOBEX_GetStatus(GSM_StateMachine *s, const char *path, unsigned char type, int *free_records, int *used)
void OBEXGEN_FreeVars(GSM_StateMachine *s)
GSM_Error GSM_EncodeVTODO(char *Buffer, const size_t buff_len, size_t *Length, const GSM_ToDoEntry *note, const gboolean header, const GSM_VToDoVersion Version)
GSM_Error GSM_WaitFor(GSM_StateMachine *s, unsigned const char *buffer, size_t length, int type, int timeout, GSM_Phone_RequestID request)
GSM_Error OBEXGEN_GetTextFile(GSM_StateMachine *s, const char *FileName, char **Buffer)
int m_obex_contacts_nexterror
GSM_Error OBEXGEN_DeleteAllCalendar(GSM_StateMachine *s)
int m_obex_calendar_nexterror
GSM_Error MOBEX_GetNextCalendar(GSM_StateMachine *s, GSM_CalendarEntry *Entry, gboolean start)
GSM_Error OBEXGEN_SetNote(GSM_StateMachine *s, GSM_NoteEntry *Entry)
GSM_Error GSM_DecodeVCARD(GSM_Debug_Info *di, char *Buffer, size_t *Pos, GSM_MemoryEntry *Pbk, GSM_VCardVersion Version)
GSM_Error GSM_DecodeVCALENDAR_VTODO(GSM_Debug_Info *di, char *Buffer, size_t *Pos, GSM_CalendarEntry *Calendar, GSM_ToDoEntry *ToDo, GSM_VCalendarVersion CalVer, GSM_VToDoVersion ToDoVer)
GSM_Error GSM_EncodeVNTFile(char *Buffer, const size_t buff_len, size_t *Length, GSM_NoteEntry *Note)
GSM_Error OBEXGEN_InitialiseVars(GSM_StateMachine *s)
GSM_Error GSM_DecodeVNOTE(char *Buffer, size_t *Pos, GSM_NoteEntry *Note)
unsigned char connection_id[4]
int m_obex_contacts_nextid
size_t m_obex_contacts_buffer_size
GSM_MemoryType MemoryType
gboolean GSM_IsPhoneFeatureAvailable(GSM_PhoneModel *model, GSM_Feature feature)
GSM_Error OBEXGEN_GetNote(GSM_StateMachine *s, GSM_NoteEntry *Entry)
GSM_Error OBEXGEN_Disconnect(GSM_StateMachine *s)
GSM_Error OBEXGEN_DeleteNote(GSM_StateMachine *s, GSM_NoteEntry *Entry)
GSM_Error OBEXGEN_GetTodo(GSM_StateMachine *s, GSM_ToDoEntry *Entry)
GSM_Error OBEXGEN_DeleteAllNotes(GSM_StateMachine *s)
GSM_Error OBEXGEN_GetNextNote(GSM_StateMachine *s, GSM_NoteEntry *Entry, gboolean start)
GSM_Error OBEXGEN_AddFolder(GSM_StateMachine *s, GSM_File *File)
GSM_Error OBEXGEN_GetNextFileFolder(GSM_StateMachine *s, GSM_File *File, gboolean start)
GSM_Error OBEXGEN_AddFilePart(GSM_StateMachine *s, GSM_File *File, size_t *Pos, int *Handle)
GSM_Error OBEXGEN_SendFilePart(GSM_StateMachine *s, GSM_File *File, size_t *Pos, int *Handle)
GSM_Error OBEXGEN_GetBinaryFile(GSM_StateMachine *s, const char *FileName, unsigned char **Buffer, size_t *len)
GSM_Reply_Function OBEXGENReplyFunctions[]
GSM_Error OBEXGEN_AddTodo(GSM_StateMachine *s, GSM_ToDoEntry *Entry)
GSM_Error MOBEX_GetNextMemory(GSM_StateMachine *s, GSM_MemoryEntry *Entry, gboolean start)
void DecodeXMLUTF8(unsigned char *dest, const char *src, size_t len)
GSM_Error OBEXGEN_DeleteAllTodo(GSM_StateMachine *s)
char Model[GSM_MAX_MODEL_LENGTH+1]
GSM_Error MyGetLine(char *Buffer, size_t *Pos, char *OutBuffer, size_t MaxLen, size_t MaxOutLen, gboolean MergeLines)
GSM_Error MOBEX_GetCalendar(GSM_StateMachine *s, GSM_CalendarEntry *Entry)
GSM_Error OBEXGEN_SetTodo(GSM_StateMachine *s, GSM_ToDoEntry *Entry)
GSM_Error MOBEX_GetNextTodo(GSM_StateMachine *s, GSM_ToDoEntry *Entry, gboolean start)
GSM_Error OBEXGEN_GetCalendar(GSM_StateMachine *s, GSM_CalendarEntry *Entry)
int smprintf(GSM_StateMachine *s, const char *format,...)
GSM_Error OBEXGEN_GetNextTodo(GSM_StateMachine *s, GSM_ToDoEntry *Entry, gboolean start)