summaryrefslogtreecommitdiffabout
path: root/gammu/emb
Side-by-side diff
Diffstat (limited to 'gammu/emb') (more/less context) (ignore whitespace changes)
-rw-r--r--gammu/emb/common/service/gsmcal.c15
-rw-r--r--gammu/emb/common/service/gsmcal.h1
2 files changed, 13 insertions, 3 deletions
diff --git a/gammu/emb/common/service/gsmcal.c b/gammu/emb/common/service/gsmcal.c
index 0ea8e06..0375fee 100644
--- a/gammu/emb/common/service/gsmcal.c
+++ b/gammu/emb/common/service/gsmcal.c
@@ -63,16 +63,19 @@ void GSM_CalendarFindDefaultTextTimeAlarmPhoneRecurrance(GSM_CalendarEntry *entr
case CAL_ALARM_DATETIME :
case CAL_SILENT_ALARM_DATETIME:
if (*Alarm == -1) *Alarm = i;
break;
case CAL_RECURRANCE:
if (*Recurrance == -1) *Recurrance = i;
break;
case CAL_TEXT:
+ *Text = i;
+ break;
+ case CAL_DESCRIPTION:
if (*Text == -1) *Text = i;
break;
case CAL_PHONE:
if (*Phone == -1) *Phone = i;
break;
case CAL_LOCATION:
if (*Location == -1) *Location = i;
break;
@@ -192,19 +195,19 @@ GSM_Error GSM_EncodeVCALENDAR(char *Buffer, int *Length, GSM_CalendarEntry *note
if (note->Type == GSM_CAL_CALL) {
buffer[0] = 0;
buffer[1] = 0;
if (Phone != -1) CopyUnicodeString(buffer,note->Entries[Phone].Text);
if (Text != -1) {
if (Phone != -1) EncodeUnicode(buffer+UnicodeLength(buffer)*2," ",1);
CopyUnicodeString(buffer+UnicodeLength(buffer)*2,note->Entries[Text].Text);
}
- SaveVCALText(Buffer, Length, buffer, "DESCRIPTION");
+ SaveVCALText(Buffer, Length, buffer, "SUMMARY");
} else {
- SaveVCALText(Buffer, Length, note->Entries[Text].Text, "DESCRIPTION");
+ SaveVCALText(Buffer, Length, note->Entries[Text].Text, "SUMMARY");
}
} else if (Version == SonyEricsson_VCalendar) {
*Length+=sprintf(Buffer+(*Length), "CATEGORIES:");
switch (note->Type) {
case GSM_CAL_MEETING:
*Length+=sprintf(Buffer+(*Length), "Meeting%c%c",13,10);
break;
case GSM_CAL_REMINDER:
@@ -411,21 +414,27 @@ GSM_Error GSM_DecodeVCALENDAR_VTODO(unsigned char *Buffer, int *Pos, GSM_Calenda
Calendar->Entries[Calendar->EntriesNum].Number = 30*24;
Calendar->EntriesNum++;
}
if (strstr(Line,"RRULE:YD1")) {
Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_RECURRANCE;
Calendar->Entries[Calendar->EntriesNum].Number = 365*24;
Calendar->EntriesNum++;
}
- if ((ReadVCALText(Line, "SUMMARY", Buff)) || (ReadVCALText(Line, "DESCRIPTION", Buff))) {
+ // LR
+ if ((ReadVCALText(Line, "SUMMARY", Buff)) ) {
Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_TEXT;
CopyUnicodeString(Calendar->Entries[Calendar->EntriesNum].Text,Buff);
Calendar->EntriesNum++;
}
+ if (ReadVCALText(Line, "DESCRIPTION", Buff)) {
+ Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_DESCRIPTION;
+ CopyUnicodeString(Calendar->Entries[Calendar->EntriesNum].Text,Buff);
+ Calendar->EntriesNum++;
+ }
if (ReadVCALText(Line, "LOCATION", Buff)) {
Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_LOCATION;
CopyUnicodeString(Calendar->Entries[Calendar->EntriesNum].Text,Buff);
Calendar->EntriesNum++;
}
if (ReadVCALText(Line, "DTSTART", Buff)) {
Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_START_DATETIME;
ReadVCALDateTime(DecodeUnicodeString(Buff), &Calendar->Entries[Calendar->EntriesNum].Date);
diff --git a/gammu/emb/common/service/gsmcal.h b/gammu/emb/common/service/gsmcal.h
index 0a41b7b..c69fdbe 100644
--- a/gammu/emb/common/service/gsmcal.h
+++ b/gammu/emb/common/service/gsmcal.h
@@ -152,16 +152,17 @@ typedef enum {
/**
* Recurrance.
*/
CAL_RECURRANCE,
/**
* Text.
*/
CAL_TEXT,
+ CAL_DESCRIPTION, // LR added
/**
* Location.
*/
CAL_LOCATION,
/**
* Phone number.
*/
CAL_PHONE,