summaryrefslogtreecommitdiffabout
path: root/gammu/emb
Side-by-side diff
Diffstat (limited to 'gammu/emb') (more/less context) (show whitespace changes)
-rw-r--r--gammu/emb/common/service/gsmcal.c20
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
@@ -112,5 +112,5 @@ GSM_Error GSM_EncodeVCALENDAR(char *Buffer, int *Length, GSM_CalendarEntry *note
break;
case GSM_CAL_BIRTHDAY:
- *Length+=sprintf(Buffer+(*Length), "Special Occasion%c%c",13,10);
+ *Length+=sprintf(Buffer+(*Length), "Birthday%c%c",13,10);
break;
case GSM_CAL_MEETING:
@@ -151,10 +151,10 @@ 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) {
case 1 : *Length+=sprintf(Buffer+(*Length), "RRULE:D1 #0%c%c",13,10); break;
case 7 : *Length+=sprintf(Buffer+(*Length), "RRULE:W1 #0%c%c",13,10); break;
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;
}
}
@@ -169,5 +169,5 @@ GSM_Error GSM_EncodeVCALENDAR(char *Buffer, int *Length, GSM_CalendarEntry *note
break;
case GSM_CAL_BIRTHDAY:
- *Length+=sprintf(Buffer+(*Length), "Anniversary%c%c",13,10);
+ *Length+=sprintf(Buffer+(*Length), "Birthday%c%c",13,10);
break;
case GSM_CAL_MEMO:
@@ -189,5 +189,5 @@ GSM_Error GSM_EncodeVCALENDAR(char *Buffer, int *Length, GSM_CalendarEntry *note
case 7 : *Length+=sprintf(Buffer+(*Length), "RRULE:D7%c%c",13,10); break;
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;
}
}
@@ -221,5 +221,5 @@ GSM_Error GSM_EncodeVCALENDAR(char *Buffer, int *Length, GSM_CalendarEntry *note
break;
case GSM_CAL_BIRTHDAY:
- *Length+=sprintf(Buffer+(*Length), "Anninversary%c%c",13,10);
+ *Length+=sprintf(Buffer+(*Length), "Birthday%c%c",13,10);
break;
case GSM_CAL_MEMO:
@@ -391,6 +391,6 @@ GSM_Error GSM_DecodeVCALENDAR_VTODO(unsigned char *Buffer, int *Pos, GSM_Calenda
if (strstr(Line,"CATEGORIES:Miscellaneous")) Calendar->Type = GSM_CAL_MEMO;
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;
if (strstr(Line,"CATEGORIES:Appointment")) Calendar->Type = GSM_CAL_MEETING;
@@ -421,4 +421,10 @@ 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)) ) {
Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_TEXT;