gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Opensync-users] [PATCH] Support termination of repeating events


From: Pawel Kot
Subject: Re: [Opensync-users] [PATCH] Support termination of repeating events
Date: Mon, 9 Jul 2007 20:29:42 +0200

Hi,

Applied, thanks.

take care,
pkot

On 7/9/07, Keith Packard <address@hidden> wrote:
---
 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


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Opensync-users mailing list
address@hidden
https://lists.sourceforge.net/lists/listinfo/opensync-users



--
Pawel Kot




reply via email to

[Prev in Thread] Current Thread [Next in Thread]