-rw-r--r-- | gammu/emb/common/service/gsmcal.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/gammu/emb/common/service/gsmcal.c b/gammu/emb/common/service/gsmcal.c index 0375fee..7310755 100644 --- a/gammu/emb/common/service/gsmcal.c +++ b/gammu/emb/common/service/gsmcal.c @@ -113,3 +113,3 @@ GSM_Error GSM_EncodeVCALENDAR(char *Buffer, int *Length, GSM_CalendarEntry *note case GSM_CAL_BIRTHDAY: - *Length+=sprintf(Buffer+(*Length), "Special Occasion%c%c",13,10); + *Length+=sprintf(Buffer+(*Length), "Birthday%c%c",13,10); break; @@ -152,3 +152,3 @@ GSM_Error GSM_EncodeVCALENDAR(char *Buffer, int *Length, GSM_CalendarEntry *note /* Birthday is known to be recurranced */ - if (Recurrance != -1 && note->Type != GSM_CAL_BIRTHDAY) { + if (Recurrance != -1 ) { switch(note->Entries[Recurrance].Number/24) { @@ -157,3 +157,3 @@ GSM_Error GSM_EncodeVCALENDAR(char *Buffer, int *Length, GSM_CalendarEntry *note case 14 : *Length+=sprintf(Buffer+(*Length), "RRULE:W2 #0%c%c",13,10); break; - case 365 : *Length+=sprintf(Buffer+(*Length), "RRULE:YD1 #0%c%c",13,10); break; + case 365 : *Length+=sprintf(Buffer+(*Length), "RRULE:YM1 #0%c%c",13,10); break; } @@ -170,3 +170,3 @@ GSM_Error GSM_EncodeVCALENDAR(char *Buffer, int *Length, GSM_CalendarEntry *note case GSM_CAL_BIRTHDAY: - *Length+=sprintf(Buffer+(*Length), "Anniversary%c%c",13,10); + *Length+=sprintf(Buffer+(*Length), "Birthday%c%c",13,10); break; @@ -190,3 +190,3 @@ GSM_Error GSM_EncodeVCALENDAR(char *Buffer, int *Length, GSM_CalendarEntry *note case 30 : *Length+=sprintf(Buffer+(*Length), "RRULE:MD1%c%c",13,10); break; - case 365 : *Length+=sprintf(Buffer+(*Length), "RRULE:YD1%c%c",13,10); break; + case 365 : *Length+=sprintf(Buffer+(*Length), "RRULE:YM1%c%c",13,10); break; } @@ -222,3 +222,3 @@ GSM_Error GSM_EncodeVCALENDAR(char *Buffer, int *Length, GSM_CalendarEntry *note case GSM_CAL_BIRTHDAY: - *Length+=sprintf(Buffer+(*Length), "Anninversary%c%c",13,10); + *Length+=sprintf(Buffer+(*Length), "Birthday%c%c",13,10); break; @@ -392,4 +392,4 @@ GSM_Error GSM_DecodeVCALENDAR_VTODO(unsigned char *Buffer, int *Pos, GSM_Calenda if (strstr(Line,"CATEGORIES:Phone Call")) Calendar->Type = GSM_CAL_CALL; - if (strstr(Line,"CATEGORIES:Special Occasion")) Calendar->Type = GSM_CAL_BIRTHDAY; if (strstr(Line,"CATEGORIES:Anniversary")) Calendar->Type = GSM_CAL_BIRTHDAY; + if (strstr(Line,"CATEGORIES:Birthday")) Calendar->Type = GSM_CAL_BIRTHDAY; if (strstr(Line,"CATEGORIES:Meeting")) Calendar->Type = GSM_CAL_MEETING; @@ -422,2 +422,8 @@ GSM_Error GSM_DecodeVCALENDAR_VTODO(unsigned char *Buffer, int *Pos, GSM_Calenda // LR + if (strstr(Line,"RRULE:YM1")) { + Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_RECURRANCE; + Calendar->Entries[Calendar->EntriesNum].Number = 365*24; + Calendar->EntriesNum++; + } + // LR if ((ReadVCALText(Line, "SUMMARY", Buff)) ) { |