author | zautrix <zautrix> | 2004-10-15 14:26:07 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-15 14:26:07 (UTC) |
commit | 4f276d80bd977401d656851515474cc00c661e5b (patch) (unidiff) | |
tree | 0d3a747bef0431ef791b69876f5bda554f9ca83f /gammu | |
parent | c2fb960297c4b08980921c818a4d347057732390 (diff) | |
download | kdepimpi-4f276d80bd977401d656851515474cc00c661e5b.zip kdepimpi-4f276d80bd977401d656851515474cc00c661e5b.tar.gz kdepimpi-4f276d80bd977401d656851515474cc00c661e5b.tar.bz2 |
many phone and sync fixes
-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 | |||
@@ -90,158 +90,158 @@ GSM_Error GSM_EncodeVCALENDAR(char *Buffer, int *Length, GSM_CalendarEntry *note | |||
90 | int Text, Time, Alarm, Phone, Recurrance, EndTime, Location; | 90 | int Text, Time, Alarm, Phone, Recurrance, EndTime, Location; |
91 | char buffer[2000]; | 91 | char buffer[2000]; |
92 | 92 | ||
93 | GSM_CalendarFindDefaultTextTimeAlarmPhoneRecurrance(note, &Text, &Time, &Alarm, &Phone, &Recurrance, &EndTime, &Location); | 93 | GSM_CalendarFindDefaultTextTimeAlarmPhoneRecurrance(note, &Text, &Time, &Alarm, &Phone, &Recurrance, &EndTime, &Location); |
94 | 94 | ||
95 | if (header) { | 95 | if (header) { |
96 | *Length+=sprintf(Buffer, "BEGIN:VCALENDAR%c%c",13,10); | 96 | *Length+=sprintf(Buffer, "BEGIN:VCALENDAR%c%c",13,10); |
97 | *Length+=sprintf(Buffer+(*Length), "VERSION:1.0%c%c",13,10); | 97 | *Length+=sprintf(Buffer+(*Length), "VERSION:1.0%c%c",13,10); |
98 | } | 98 | } |
99 | *Length+=sprintf(Buffer+(*Length), "BEGIN:VEVENT%c%c",13,10); | 99 | *Length+=sprintf(Buffer+(*Length), "BEGIN:VEVENT%c%c",13,10); |
100 | 100 | ||
101 | if (Version == Nokia_VCalendar) { | 101 | if (Version == Nokia_VCalendar) { |
102 | *Length+=sprintf(Buffer+(*Length), "CATEGORIES:"); | 102 | *Length+=sprintf(Buffer+(*Length), "CATEGORIES:"); |
103 | switch (note->Type) { | 103 | switch (note->Type) { |
104 | case GSM_CAL_REMINDER: | 104 | case GSM_CAL_REMINDER: |
105 | *Length+=sprintf(Buffer+(*Length), "Reminder%c%c",13,10); | 105 | *Length+=sprintf(Buffer+(*Length), "Reminder%c%c",13,10); |
106 | break; | 106 | break; |
107 | case GSM_CAL_MEMO: | 107 | case GSM_CAL_MEMO: |
108 | *Length+=sprintf(Buffer+(*Length), "Miscellaneous%c%c",13,10); | 108 | *Length+=sprintf(Buffer+(*Length), "Miscellaneous%c%c",13,10); |
109 | break; | 109 | break; |
110 | case GSM_CAL_CALL: | 110 | case GSM_CAL_CALL: |
111 | *Length+=sprintf(Buffer+(*Length), "Phone Call%c%c",13,10); | 111 | *Length+=sprintf(Buffer+(*Length), "Phone Call%c%c",13,10); |
112 | break; | 112 | break; |
113 | case GSM_CAL_BIRTHDAY: | 113 | case GSM_CAL_BIRTHDAY: |
114 | *Length+=sprintf(Buffer+(*Length), "Special Occasion%c%c",13,10); | 114 | *Length+=sprintf(Buffer+(*Length), "Birthday%c%c",13,10); |
115 | break; | 115 | break; |
116 | case GSM_CAL_MEETING: | 116 | case GSM_CAL_MEETING: |
117 | default: | 117 | default: |
118 | *Length+=sprintf(Buffer+(*Length), "MeetingDEF%c%c",13,10); | 118 | *Length+=sprintf(Buffer+(*Length), "MeetingDEF%c%c",13,10); |
119 | break; | 119 | break; |
120 | } | 120 | } |
121 | if (note->Type == GSM_CAL_CALL) { | 121 | if (note->Type == GSM_CAL_CALL) { |
122 | buffer[0] = 0; | 122 | buffer[0] = 0; |
123 | buffer[1] = 0; | 123 | buffer[1] = 0; |
124 | if (Phone != -1) CopyUnicodeString(buffer,note->Entries[Phone].Text); | 124 | if (Phone != -1) CopyUnicodeString(buffer,note->Entries[Phone].Text); |
125 | if (Text != -1) { | 125 | if (Text != -1) { |
126 | if (Phone != -1) EncodeUnicode(buffer+UnicodeLength(buffer)*2," ",1); | 126 | if (Phone != -1) EncodeUnicode(buffer+UnicodeLength(buffer)*2," ",1); |
127 | CopyUnicodeString(buffer+UnicodeLength(buffer)*2,note->Entries[Text].Text); | 127 | CopyUnicodeString(buffer+UnicodeLength(buffer)*2,note->Entries[Text].Text); |
128 | } | 128 | } |
129 | SaveVCALText(Buffer, Length, buffer, "SUMMARY"); | 129 | SaveVCALText(Buffer, Length, buffer, "SUMMARY"); |
130 | } else { | 130 | } else { |
131 | SaveVCALText(Buffer, Length, note->Entries[Text].Text, "SUMMARY"); | 131 | SaveVCALText(Buffer, Length, note->Entries[Text].Text, "SUMMARY"); |
132 | } | 132 | } |
133 | if (note->Type == GSM_CAL_MEETING && Location != -1) { | 133 | if (note->Type == GSM_CAL_MEETING && Location != -1) { |
134 | SaveVCALText(Buffer, Length, note->Entries[Location].Text, "LOCATION"); | 134 | SaveVCALText(Buffer, Length, note->Entries[Location].Text, "LOCATION"); |
135 | } | 135 | } |
136 | 136 | ||
137 | if (Time == -1) return ERR_UNKNOWN; | 137 | if (Time == -1) return ERR_UNKNOWN; |
138 | SaveVCALDateTime(Buffer, Length, ¬e->Entries[Time].Date, "DTSTART"); | 138 | SaveVCALDateTime(Buffer, Length, ¬e->Entries[Time].Date, "DTSTART"); |
139 | 139 | ||
140 | if (EndTime != -1) { | 140 | if (EndTime != -1) { |
141 | SaveVCALDateTime(Buffer, Length, ¬e->Entries[EndTime].Date, "DTEND"); | 141 | SaveVCALDateTime(Buffer, Length, ¬e->Entries[EndTime].Date, "DTEND"); |
142 | } | 142 | } |
143 | 143 | ||
144 | if (Alarm != -1) { | 144 | if (Alarm != -1) { |
145 | if (note->Entries[Alarm].EntryType == CAL_SILENT_ALARM_DATETIME) { | 145 | if (note->Entries[Alarm].EntryType == CAL_SILENT_ALARM_DATETIME) { |
146 | SaveVCALDateTime(Buffer, Length, ¬e->Entries[Alarm].Date, "DALARM"); | 146 | SaveVCALDateTime(Buffer, Length, ¬e->Entries[Alarm].Date, "DALARM"); |
147 | } else { | 147 | } else { |
148 | SaveVCALDateTime(Buffer, Length, ¬e->Entries[Alarm].Date, "DALARM"); | 148 | SaveVCALDateTime(Buffer, Length, ¬e->Entries[Alarm].Date, "DALARM"); |
149 | } | 149 | } |
150 | } | 150 | } |
151 | 151 | ||
152 | /* Birthday is known to be recurranced */ | 152 | /* Birthday is known to be recurranced */ |
153 | if (Recurrance != -1 && note->Type != GSM_CAL_BIRTHDAY) { | 153 | if (Recurrance != -1 ) { |
154 | switch(note->Entries[Recurrance].Number/24) { | 154 | switch(note->Entries[Recurrance].Number/24) { |
155 | case 1 : *Length+=sprintf(Buffer+(*Length), "RRULE:D1 #0%c%c",13,10); break; | 155 | case 1 : *Length+=sprintf(Buffer+(*Length), "RRULE:D1 #0%c%c",13,10); break; |
156 | case 7 : *Length+=sprintf(Buffer+(*Length), "RRULE:W1 #0%c%c",13,10); break; | 156 | case 7 : *Length+=sprintf(Buffer+(*Length), "RRULE:W1 #0%c%c",13,10); break; |
157 | case 14 : *Length+=sprintf(Buffer+(*Length), "RRULE:W2 #0%c%c",13,10); break; | 157 | case 14 : *Length+=sprintf(Buffer+(*Length), "RRULE:W2 #0%c%c",13,10); break; |
158 | case 365 : *Length+=sprintf(Buffer+(*Length), "RRULE:YD1 #0%c%c",13,10); break; | 158 | case 365 : *Length+=sprintf(Buffer+(*Length), "RRULE:YM1 #0%c%c",13,10); break; |
159 | } | 159 | } |
160 | } | 160 | } |
161 | } else if (Version == Siemens_VCalendar) { | 161 | } else if (Version == Siemens_VCalendar) { |
162 | *Length+=sprintf(Buffer+(*Length), "CATEGORIES:"); | 162 | *Length+=sprintf(Buffer+(*Length), "CATEGORIES:"); |
163 | switch (note->Type) { | 163 | switch (note->Type) { |
164 | case GSM_CAL_MEETING: | 164 | case GSM_CAL_MEETING: |
165 | *Length+=sprintf(Buffer+(*Length), "Meeting%c%c",13,10); | 165 | *Length+=sprintf(Buffer+(*Length), "Meeting%c%c",13,10); |
166 | break; | 166 | break; |
167 | case GSM_CAL_CALL: | 167 | case GSM_CAL_CALL: |
168 | *Length+=sprintf(Buffer+(*Length), "Phone Call%c%c",13,10); | 168 | *Length+=sprintf(Buffer+(*Length), "Phone Call%c%c",13,10); |
169 | break; | 169 | break; |
170 | case GSM_CAL_BIRTHDAY: | 170 | case GSM_CAL_BIRTHDAY: |
171 | *Length+=sprintf(Buffer+(*Length), "Anniversary%c%c",13,10); | 171 | *Length+=sprintf(Buffer+(*Length), "Birthday%c%c",13,10); |
172 | break; | 172 | break; |
173 | case GSM_CAL_MEMO: | 173 | case GSM_CAL_MEMO: |
174 | default: | 174 | default: |
175 | *Length+=sprintf(Buffer+(*Length), "Miscellaneous%c%c",13,10); | 175 | *Length+=sprintf(Buffer+(*Length), "Miscellaneous%c%c",13,10); |
176 | break; | 176 | break; |
177 | } | 177 | } |
178 | 178 | ||
179 | if (Time == -1) return ERR_UNKNOWN; | 179 | if (Time == -1) return ERR_UNKNOWN; |
180 | SaveVCALDateTime(Buffer, Length, ¬e->Entries[Time].Date, "DTSTART"); | 180 | SaveVCALDateTime(Buffer, Length, ¬e->Entries[Time].Date, "DTSTART"); |
181 | 181 | ||
182 | if (Alarm != -1) { | 182 | if (Alarm != -1) { |
183 | SaveVCALDateTime(Buffer, Length, ¬e->Entries[Alarm].Date, "DALARM"); | 183 | SaveVCALDateTime(Buffer, Length, ¬e->Entries[Alarm].Date, "DALARM"); |
184 | } | 184 | } |
185 | 185 | ||
186 | if (Recurrance != -1) { | 186 | if (Recurrance != -1) { |
187 | switch(note->Entries[Recurrance].Number/24) { | 187 | switch(note->Entries[Recurrance].Number/24) { |
188 | case 1 : *Length+=sprintf(Buffer+(*Length), "RRULE:D1%c%c",13,10);break; | 188 | case 1 : *Length+=sprintf(Buffer+(*Length), "RRULE:D1%c%c",13,10);break; |
189 | case 7 : *Length+=sprintf(Buffer+(*Length), "RRULE:D7%c%c",13,10);break; | 189 | case 7 : *Length+=sprintf(Buffer+(*Length), "RRULE:D7%c%c",13,10);break; |
190 | case 30 : *Length+=sprintf(Buffer+(*Length), "RRULE:MD1%c%c",13,10);break; | 190 | case 30 : *Length+=sprintf(Buffer+(*Length), "RRULE:MD1%c%c",13,10);break; |
191 | case 365 : *Length+=sprintf(Buffer+(*Length), "RRULE:YD1%c%c",13,10);break; | 191 | case 365 : *Length+=sprintf(Buffer+(*Length), "RRULE:YM1%c%c",13,10);break; |
192 | } | 192 | } |
193 | } | 193 | } |
194 | 194 | ||
195 | if (note->Type == GSM_CAL_CALL) { | 195 | if (note->Type == GSM_CAL_CALL) { |
196 | buffer[0] = 0; | 196 | buffer[0] = 0; |
197 | buffer[1] = 0; | 197 | buffer[1] = 0; |
198 | if (Phone != -1) CopyUnicodeString(buffer,note->Entries[Phone].Text); | 198 | if (Phone != -1) CopyUnicodeString(buffer,note->Entries[Phone].Text); |
199 | if (Text != -1) { | 199 | if (Text != -1) { |
200 | if (Phone != -1) EncodeUnicode(buffer+UnicodeLength(buffer)*2," ",1); | 200 | if (Phone != -1) EncodeUnicode(buffer+UnicodeLength(buffer)*2," ",1); |
201 | CopyUnicodeString(buffer+UnicodeLength(buffer)*2,note->Entries[Text].Text); | 201 | CopyUnicodeString(buffer+UnicodeLength(buffer)*2,note->Entries[Text].Text); |
202 | } | 202 | } |
203 | SaveVCALText(Buffer, Length, buffer, "SUMMARY"); | 203 | SaveVCALText(Buffer, Length, buffer, "SUMMARY"); |
204 | } else { | 204 | } else { |
205 | SaveVCALText(Buffer, Length, note->Entries[Text].Text, "SUMMARY"); | 205 | SaveVCALText(Buffer, Length, note->Entries[Text].Text, "SUMMARY"); |
206 | } | 206 | } |
207 | } else if (Version == SonyEricsson_VCalendar) { | 207 | } else if (Version == SonyEricsson_VCalendar) { |
208 | *Length+=sprintf(Buffer+(*Length), "CATEGORIES:"); | 208 | *Length+=sprintf(Buffer+(*Length), "CATEGORIES:"); |
209 | switch (note->Type) { | 209 | switch (note->Type) { |
210 | case GSM_CAL_MEETING: | 210 | case GSM_CAL_MEETING: |
211 | *Length+=sprintf(Buffer+(*Length), "Meeting%c%c",13,10); | 211 | *Length+=sprintf(Buffer+(*Length), "Meeting%c%c",13,10); |
212 | break; | 212 | break; |
213 | case GSM_CAL_REMINDER: | 213 | case GSM_CAL_REMINDER: |
214 | *Length+=sprintf(Buffer+(*Length), "Date%c%c",13,10); | 214 | *Length+=sprintf(Buffer+(*Length), "Date%c%c",13,10); |
215 | break; | 215 | break; |
216 | case GSM_CAL_TRAVEL: | 216 | case GSM_CAL_TRAVEL: |
217 | *Length+=sprintf(Buffer+(*Length), "Travel%c%c",13,10); | 217 | *Length+=sprintf(Buffer+(*Length), "Travel%c%c",13,10); |
218 | break; | 218 | break; |
219 | case GSM_CAL_VACATION: | 219 | case GSM_CAL_VACATION: |
220 | *Length+=sprintf(Buffer+(*Length), "Vacation%c%c",13,10); | 220 | *Length+=sprintf(Buffer+(*Length), "Vacation%c%c",13,10); |
221 | break; | 221 | break; |
222 | case GSM_CAL_BIRTHDAY: | 222 | case GSM_CAL_BIRTHDAY: |
223 | *Length+=sprintf(Buffer+(*Length), "Anninversary%c%c",13,10); | 223 | *Length+=sprintf(Buffer+(*Length), "Birthday%c%c",13,10); |
224 | break; | 224 | break; |
225 | case GSM_CAL_MEMO: | 225 | case GSM_CAL_MEMO: |
226 | default: | 226 | default: |
227 | *Length+=sprintf(Buffer+(*Length), "Miscellaneous%c%c",13,10); | 227 | *Length+=sprintf(Buffer+(*Length), "Miscellaneous%c%c",13,10); |
228 | break; | 228 | break; |
229 | } | 229 | } |
230 | 230 | ||
231 | if (Time == -1) return ERR_UNKNOWN; | 231 | if (Time == -1) return ERR_UNKNOWN; |
232 | SaveVCALDateTime(Buffer, Length, ¬e->Entries[Time].Date, "DTSTART"); | 232 | SaveVCALDateTime(Buffer, Length, ¬e->Entries[Time].Date, "DTSTART"); |
233 | 233 | ||
234 | if (EndTime != -1) { | 234 | if (EndTime != -1) { |
235 | SaveVCALDateTime(Buffer, Length, ¬e->Entries[EndTime].Date, "DTEND"); | 235 | SaveVCALDateTime(Buffer, Length, ¬e->Entries[EndTime].Date, "DTEND"); |
236 | } | 236 | } |
237 | 237 | ||
238 | if (Alarm != -1) { | 238 | if (Alarm != -1) { |
239 | SaveVCALDateTime(Buffer, Length, ¬e->Entries[Alarm].Date, "AALARM"); | 239 | SaveVCALDateTime(Buffer, Length, ¬e->Entries[Alarm].Date, "AALARM"); |
240 | } | 240 | } |
241 | 241 | ||
242 | SaveVCALText(Buffer, Length, note->Entries[Text].Text, "SUMMARY"); | 242 | SaveVCALText(Buffer, Length, note->Entries[Text].Text, "SUMMARY"); |
243 | 243 | ||
244 | if (Location != -1) { | 244 | if (Location != -1) { |
245 | SaveVCALText(Buffer, Length, note->Entries[Location].Text, "LOCATION"); | 245 | SaveVCALText(Buffer, Length, note->Entries[Location].Text, "LOCATION"); |
246 | } | 246 | } |
247 | } | 247 | } |
@@ -369,78 +369,84 @@ GSM_Error GSM_DecodeVCALENDAR_VTODO(unsigned char *Buffer, int *Pos, GSM_Calenda | |||
369 | if (strlen(Line) == 0) break; | 369 | if (strlen(Line) == 0) break; |
370 | switch (Level) { | 370 | switch (Level) { |
371 | case 0: | 371 | case 0: |
372 | if (strstr(Line,"BEGIN:VEVENT")) { | 372 | if (strstr(Line,"BEGIN:VEVENT")) { |
373 | Calendar->Type = GSM_CAL_MEMO; | 373 | Calendar->Type = GSM_CAL_MEMO; |
374 | Level = 1; | 374 | Level = 1; |
375 | } | 375 | } |
376 | if (strstr(Line,"BEGIN:VTODO")) { | 376 | if (strstr(Line,"BEGIN:VTODO")) { |
377 | ToDo->Priority = GSM_Priority_Medium; | 377 | ToDo->Priority = GSM_Priority_Medium; |
378 | Level = 2; | 378 | Level = 2; |
379 | } | 379 | } |
380 | break; | 380 | break; |
381 | case 1: /* Calendar note */ | 381 | case 1: /* Calendar note */ |
382 | if (strstr(Line,"END:VEVENT")) { | 382 | if (strstr(Line,"END:VEVENT")) { |
383 | if (Calendar->EntriesNum == 0) return ERR_EMPTY; | 383 | if (Calendar->EntriesNum == 0) return ERR_EMPTY; |
384 | return ERR_NONE; | 384 | return ERR_NONE; |
385 | } | 385 | } |
386 | Calendar->Type = GSM_CAL_MEETING; | 386 | Calendar->Type = GSM_CAL_MEETING; |
387 | if (strstr(Line,"CATEGORIES:Reminder")) Calendar->Type = GSM_CAL_REMINDER; | 387 | if (strstr(Line,"CATEGORIES:Reminder")) Calendar->Type = GSM_CAL_REMINDER; |
388 | if (strstr(Line,"CATEGORIES:Date")) Calendar->Type = GSM_CAL_REMINDER;//SE | 388 | if (strstr(Line,"CATEGORIES:Date")) Calendar->Type = GSM_CAL_REMINDER;//SE |
389 | if (strstr(Line,"CATEGORIES:Travel")) Calendar->Type = GSM_CAL_TRAVEL; //SE | 389 | if (strstr(Line,"CATEGORIES:Travel")) Calendar->Type = GSM_CAL_TRAVEL; //SE |
390 | if (strstr(Line,"CATEGORIES:Vacation")) Calendar->Type = GSM_CAL_VACATION;//SE | 390 | if (strstr(Line,"CATEGORIES:Vacation")) Calendar->Type = GSM_CAL_VACATION;//SE |
391 | if (strstr(Line,"CATEGORIES:Miscellaneous")) Calendar->Type = GSM_CAL_MEMO; | 391 | if (strstr(Line,"CATEGORIES:Miscellaneous")) Calendar->Type = GSM_CAL_MEMO; |
392 | if (strstr(Line,"CATEGORIES:Phone Call")) Calendar->Type = GSM_CAL_CALL; | 392 | if (strstr(Line,"CATEGORIES:Phone Call")) Calendar->Type = GSM_CAL_CALL; |
393 | if (strstr(Line,"CATEGORIES:Special Occasion")) Calendar->Type = GSM_CAL_BIRTHDAY; | ||
394 | if (strstr(Line,"CATEGORIES:Anniversary")) Calendar->Type = GSM_CAL_BIRTHDAY; | 393 | if (strstr(Line,"CATEGORIES:Anniversary")) Calendar->Type = GSM_CAL_BIRTHDAY; |
394 | if (strstr(Line,"CATEGORIES:Birthday")) Calendar->Type = GSM_CAL_BIRTHDAY; | ||
395 | if (strstr(Line,"CATEGORIES:Meeting")) Calendar->Type = GSM_CAL_MEETING; | 395 | if (strstr(Line,"CATEGORIES:Meeting")) Calendar->Type = GSM_CAL_MEETING; |
396 | if (strstr(Line,"CATEGORIES:Appointment")) Calendar->Type = GSM_CAL_MEETING; | 396 | if (strstr(Line,"CATEGORIES:Appointment")) Calendar->Type = GSM_CAL_MEETING; |
397 | if (strstr(Line,"RRULE:D1")) { | 397 | if (strstr(Line,"RRULE:D1")) { |
398 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_RECURRANCE; | 398 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_RECURRANCE; |
399 | Calendar->Entries[Calendar->EntriesNum].Number = 1*24; | 399 | Calendar->Entries[Calendar->EntriesNum].Number = 1*24; |
400 | Calendar->EntriesNum++; | 400 | Calendar->EntriesNum++; |
401 | } | 401 | } |
402 | if ((strstr(Line,"RRULE:W1")) || (strstr(Line,"RRULE:D7"))) { | 402 | if ((strstr(Line,"RRULE:W1")) || (strstr(Line,"RRULE:D7"))) { |
403 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_RECURRANCE; | 403 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_RECURRANCE; |
404 | Calendar->Entries[Calendar->EntriesNum].Number = 7*24; | 404 | Calendar->Entries[Calendar->EntriesNum].Number = 7*24; |
405 | Calendar->EntriesNum++; | 405 | Calendar->EntriesNum++; |
406 | } | 406 | } |
407 | if (strstr(Line,"RRULE:W2")) { | 407 | if (strstr(Line,"RRULE:W2")) { |
408 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_RECURRANCE; | 408 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_RECURRANCE; |
409 | Calendar->Entries[Calendar->EntriesNum].Number = 14*24; | 409 | Calendar->Entries[Calendar->EntriesNum].Number = 14*24; |
410 | Calendar->EntriesNum++; | 410 | Calendar->EntriesNum++; |
411 | } | 411 | } |
412 | if (strstr(Line,"RRULE:MD1")) { | 412 | if (strstr(Line,"RRULE:MD1")) { |
413 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_RECURRANCE; | 413 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_RECURRANCE; |
414 | Calendar->Entries[Calendar->EntriesNum].Number = 30*24; | 414 | Calendar->Entries[Calendar->EntriesNum].Number = 30*24; |
415 | Calendar->EntriesNum++; | 415 | Calendar->EntriesNum++; |
416 | } | 416 | } |
417 | if (strstr(Line,"RRULE:YD1")) { | 417 | if (strstr(Line,"RRULE:YD1")) { |
418 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_RECURRANCE; | 418 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_RECURRANCE; |
419 | Calendar->Entries[Calendar->EntriesNum].Number = 365*24; | 419 | Calendar->Entries[Calendar->EntriesNum].Number = 365*24; |
420 | Calendar->EntriesNum++; | 420 | Calendar->EntriesNum++; |
421 | } | 421 | } |
422 | // LR | 422 | // LR |
423 | if (strstr(Line,"RRULE:YM1")) { | ||
424 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_RECURRANCE; | ||
425 | Calendar->Entries[Calendar->EntriesNum].Number = 365*24; | ||
426 | Calendar->EntriesNum++; | ||
427 | } | ||
428 | // LR | ||
423 | if ((ReadVCALText(Line, "SUMMARY", Buff)) ) { | 429 | if ((ReadVCALText(Line, "SUMMARY", Buff)) ) { |
424 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_TEXT; | 430 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_TEXT; |
425 | CopyUnicodeString(Calendar->Entries[Calendar->EntriesNum].Text,Buff); | 431 | CopyUnicodeString(Calendar->Entries[Calendar->EntriesNum].Text,Buff); |
426 | Calendar->EntriesNum++; | 432 | Calendar->EntriesNum++; |
427 | } | 433 | } |
428 | if (ReadVCALText(Line, "DESCRIPTION", Buff)) { | 434 | if (ReadVCALText(Line, "DESCRIPTION", Buff)) { |
429 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_DESCRIPTION; | 435 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_DESCRIPTION; |
430 | CopyUnicodeString(Calendar->Entries[Calendar->EntriesNum].Text,Buff); | 436 | CopyUnicodeString(Calendar->Entries[Calendar->EntriesNum].Text,Buff); |
431 | Calendar->EntriesNum++; | 437 | Calendar->EntriesNum++; |
432 | } | 438 | } |
433 | if (ReadVCALText(Line, "LOCATION", Buff)) { | 439 | if (ReadVCALText(Line, "LOCATION", Buff)) { |
434 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_LOCATION; | 440 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_LOCATION; |
435 | CopyUnicodeString(Calendar->Entries[Calendar->EntriesNum].Text,Buff); | 441 | CopyUnicodeString(Calendar->Entries[Calendar->EntriesNum].Text,Buff); |
436 | Calendar->EntriesNum++; | 442 | Calendar->EntriesNum++; |
437 | } | 443 | } |
438 | if (ReadVCALText(Line, "DTSTART", Buff)) { | 444 | if (ReadVCALText(Line, "DTSTART", Buff)) { |
439 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_START_DATETIME; | 445 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_START_DATETIME; |
440 | ReadVCALDateTime(DecodeUnicodeString(Buff), &Calendar->Entries[Calendar->EntriesNum].Date); | 446 | ReadVCALDateTime(DecodeUnicodeString(Buff), &Calendar->Entries[Calendar->EntriesNum].Date); |
441 | Calendar->EntriesNum++; | 447 | Calendar->EntriesNum++; |
442 | } | 448 | } |
443 | if (ReadVCALText(Line, "DTEND", Buff)) { | 449 | if (ReadVCALText(Line, "DTEND", Buff)) { |
444 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_END_DATETIME; | 450 | Calendar->Entries[Calendar->EntriesNum].EntryType = CAL_END_DATETIME; |
445 | ReadVCALDateTime(DecodeUnicodeString(Buff), &Calendar->Entries[Calendar->EntriesNum].Date); | 451 | ReadVCALDateTime(DecodeUnicodeString(Buff), &Calendar->Entries[Calendar->EntriesNum].Date); |
446 | Calendar->EntriesNum++; | 452 | Calendar->EntriesNum++; |