http://marcin-wiacek.fkn.pl/english/zips/mygnokii.tar.gz
[gnokii.git] / include / gsm-calendar.h
1 /*
2
3   G N O K I I
4
5   A Linux/Unix toolset and driver for Nokia mobile phones.
6
7   Released under the terms of the GNU GPL, see file COPYING for more details.
8
9 */
10
11 #ifndef __gsm_calendar_h
12 #define __gsm_calendar_h
13
14 #include "gsm-datetime.h"
15 #include "gsm-sms.h"
16
17 /* Define enums for Calendar Note types */
18 typedef enum {
19   GCN_REMINDER=1, /* Reminder */
20   GCN_CALL,       /* Call */
21   GCN_MEETING,    /* Meeting */
22   GCN_BIRTHDAY    /* Birthday */
23 } GSM_CalendarNoteType;
24
25 #define MAX_CALENDAR_TEXT_LENGTH 0x3a /* In 6210 max. 48 chars. 10 more precaution bytes*/
26 #define MAX_CALENDAR_PHONE_LENGTH 0x24
27
28 /* Calendar note type */
29
30 typedef struct {
31   int Location;              /* The number of the note in the phone memory */
32   GSM_CalendarNoteType Type; /* The type of the note */
33   GSM_DateTime Time;         /* The time of the note */
34   GSM_DateTime Alarm;        /* The alarm of the note */
35   char Text[MAX_CALENDAR_TEXT_LENGTH+1];   /* The text of the note */
36   char Phone[MAX_CALENDAR_PHONE_LENGTH+1]; /* For Call only: the phone number */
37
38   /* the following are only used for N7110/N6210 */
39   int Recurrance; /* after how many hours note repeats. 0x0000 = No Repeat */
40   int YearOfBirth; /* Only in GCN_BIRTHDAY for 62/71 - The Year of birth of recurrance */
41   u8 AlarmType;    /* Only in GCN_BIRTHDAY for 62/71 - 0x00 = Tone, 0x01 = Silent */
42
43   bool ReadNotesInfo; /* Important in 6210/7110 - if we should read notes info or not */
44 } GSM_CalendarNote;
45
46 /* NotesInfo type : Nowadays only N6210/7110 */
47 #define MAX_NOTES_INFO_ELEMS 1024
48
49 typedef struct {
50     u16 HowMany;                        /* How many notes info used */
51     u16 Location[MAX_NOTES_INFO_ELEMS]; /* In N6210/7110 adresses for notes */
52 } GSM_NotesInfo;
53
54 char *GSM_GetVCALENDARStart(int version);
55 char *GSM_GetVCALENDARNote(GSM_CalendarNote *note, int version);
56 char *GSM_GetVCALENDAREnd(int version);
57
58 int GSM_SaveCalendarNoteToSMS(GSM_MultiSMSMessage *SMS,
59                               GSM_CalendarNote *note);
60
61 #endif  /* __gsm_calendar_h */