[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Support termination of repeating events
From: |
Keith Packard |
Subject: |
[PATCH] Support termination of repeating events |
Date: |
Sun, 8 Jul 2007 21:32:58 -0700 |
---
common/phones/nk6510.c | 9 +++++++++
include/gnokii/common.h | 1 +
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/common/phones/nk6510.c b/common/phones/nk6510.c
index aba8a7f..6259dd5 100644
--- a/common/phones/nk6510.c
+++ b/common/phones/nk6510.c
@@ -2696,6 +2696,8 @@ static gn_error calnote2_decode(unsigned char *message,
int length, gn_data *dat
data->calnote->end_time.second = 0;
/* Recurrence */
data->calnote->recurrence = 256 * message[40] + message[41];
+ /* Occurrence */
+ data->calnote->occurrences = 256 * message[46] + message[47];
/* Alarm */
alarm_mark = 256 * message[14] + message[15];
alarm = 256 * message[16] + message[17];
@@ -3055,6 +3057,13 @@ static gn_error NK6510_WriteCalendarNote2(gn_data *data,
struct gn_statemachine
req[40] = calnote->recurrence / 256;
req[41] = calnote->recurrence % 256;
+ /* Occurrences */
+ if (calnote->recurrence)
+ {
+ req[46] = calnote->occurrences / 256;
+ req[47] = calnote->occurrences % 256;
+ }
+
/* Set start time and end time */
req[28] = calnote->time.year / 256;
req[29] = calnote->time.year % 256;
diff --git a/include/gnokii/common.h b/include/gnokii/common.h
index dfa4872..06843b9 100644
--- a/include/gnokii/common.h
+++ b/include/gnokii/common.h
@@ -377,6 +377,7 @@ typedef struct {
char phone_number[GN_CALNOTE_NUMBER_MAX_LENGTH]; /* For Call only: the
phone number */
char mlocation[GN_CALNOTE_MAX_LENGTH]; /* For Meeting only:
the location field */
gn_calnote_recurrence recurrence; /* Recurrence of the
note */
+ int occurrences; /* number of events, 0
for infinite */
} gn_calnote;
/* List of Calendar Notes in phone */
--
1.5.2.2
- Fixes to avoid locking up 6131 phone and send more useful data, Keith Packard, 2007/07/09
- [PATCH] When processing incoming phone book messages, skip unrelated errors., Keith Packard, 2007/07/09
- [PATCH] Limit phonebook to 1000 entries (as on 6131), Keith Packard, 2007/07/09
- [PATCH] Account for phonebook blocks not sent due to limited packet space, Keith Packard, 2007/07/09
- [PATCH] Support termination of repeating events,
Keith Packard <=
- [PATCH] Speed up calendar fetch by not restarting note fetch, Keith Packard, 2007/07/09
- [PATCH] Delete message when write fails, Keith Packard, 2007/07/09
- [PATCH] Avoid duplicate phone and address entries, Keith Packard, 2007/07/09
- [PATCH] treat Postal entries as addresses, Keith Packard, 2007/07/09
- [PATCH] Set of address blocks counts as one data block., Keith Packard, 2007/07/09
- Re: [Opensync-users] [PATCH] treat Postal entries as addresses, Pawel Kot, 2007/07/09
- Re: [Opensync-users] [PATCH] Avoid duplicate phone and address entries, Pawel Kot, 2007/07/09
- Re: [Opensync-users] [PATCH] Avoid duplicate phone and address entries, Keith Packard, 2007/07/09
- Re: [Opensync-users] [PATCH] Avoid duplicate phone and address entries, Pawel Kot, 2007/07/09
- Re: [Opensync-users] [PATCH] Delete message when write fails, Pawel Kot, 2007/07/09