Gammu internals  1.38.0
gammu-calendar.h
Go to the documentation of this file.
1 
7 #ifndef __gammu_calendar_h
8 #define __gammu_calendar_h
9 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 #include <gammu-datetime.h>
20 #include <gammu-limits.h>
21 #include <gammu-debug.h>
22 
38 typedef struct {
42  int StartDay;
48 
54 typedef struct {
58  int Free;
62  int Used;
64 
70 typedef struct {
74  int Free;
78  int Used;
80 
86 typedef enum {
204 
210 typedef enum {
250  CAL_CONTACTID, /* 10 */
290  CAL_LUID, /* 20 */
296 
302 typedef struct {
306  GSM_CalendarType EntryType;
314  int Number;
322  unsigned char Text[(GSM_MAX_CALENDAR_TEXT_LENGTH + 1) * 2];
324 
330 typedef struct {
334  GSM_CalendarNoteType Type;
338  int Location;
346  GSM_SubCalendarEntry Entries[GSM_CALENDAR_ENTRIES];
348 
355  int *Text, int *Time, int *Alarm,
356  int *Phone, int *EndTime,
357  int *Location);
358 
365 typedef enum {
426 } GSM_ToDoType;
427 
433 typedef enum {
440 
446 typedef struct {
450  GSM_ToDoType EntryType;
458  unsigned int Number;
462  unsigned char Text[(GSM_MAX_TODO_TEXT_LENGTH + 1) * 2];
464 
470 typedef struct {
474  GSM_CalendarNoteType Type;
478  GSM_ToDo_Priority Priority;
482  int Location;
490  GSM_SubToDoEntry Entries[GSM_TODO_ENTRIES];
491 } GSM_ToDoEntry;
492 
498 typedef struct {
502  int Location;
506  char Text[(GSM_MAX_NOTE_TEXT_LENGTH + 1) * 2];
507 } GSM_NoteEntry;
508 
514 typedef struct {
518  int Location;
530  unsigned char Text[(GSM_MAX_CALENDAR_TEXT_LENGTH + 1) * 2];
531 } GSM_Alarm;
532 
538 typedef enum {
552 
558 typedef enum {
576 
591 GSM_Error GSM_EncodeVTODO(char *Buffer, const size_t buff_len, size_t * Length,
592  const GSM_ToDoEntry * note, const gboolean header,
593  const GSM_VToDoVersion Version);
594 
609 GSM_Error GSM_EncodeVCALENDAR(char *Buffer, const size_t buff_len,
610  size_t * Length, GSM_CalendarEntry * note,
611  const gboolean header,
612  const GSM_VCalendarVersion Version);
613 
625 GSM_Error GSM_DecodeVNOTE(char *Buffer, size_t * Pos, GSM_NoteEntry * Note);
626 
639 GSM_Error GSM_EncodeVNTFile(char *Buffer, const size_t buff_len,
640  size_t * Length, GSM_NoteEntry * Note);
641 
658  size_t * Pos, GSM_CalendarEntry * Calendar,
659  GSM_ToDoEntry * ToDo,
660  GSM_VCalendarVersion CalVer,
661  GSM_VToDoVersion ToDoVer);
662 
673 
684 GSM_Error GSM_GetAlarm(GSM_StateMachine * s, GSM_Alarm * Alarm);
685 
696 GSM_Error GSM_SetAlarm(GSM_StateMachine * s, GSM_Alarm * Alarm);
697 
709 
721 
735  gboolean start);
747 
759 
771 
782 
794  GSM_CalendarStatus * Status);
806 
821  gboolean start);
833 
845 
857 
868 
880  GSM_CalendarSettings * settings);
892  GSM_CalendarSettings * settings);
904 
915 GSM_Error GSM_GetNote(GSM_StateMachine * s, GSM_NoteEntry * Note);
916 
930 GSM_Error GSM_GetNextNote(GSM_StateMachine * s, GSM_NoteEntry * Note,
931  gboolean start);
942 GSM_Error GSM_SetNote(GSM_StateMachine * s, GSM_NoteEntry * Note);
943 
954 GSM_Error GSM_AddNote(GSM_StateMachine * s, GSM_NoteEntry * Note);
955 
966 GSM_Error GSM_DeleteNote(GSM_StateMachine * s, GSM_NoteEntry * Note);
967 
978 
979 #ifdef __cplusplus
980 }
981 #endif
982 #endif
983 
984 /* Editor configuration
985  * vim: noexpandtab sw=8 ts=8 sts=8 tw=72:
986  */
GSM_Error GSM_DeleteAllNotes(GSM_StateMachine *s)
Definition: api.c:1620
GSM_Error GSM_EncodeVCALENDAR(char *Buffer, const size_t buff_len, size_t *Length, GSM_CalendarEntry *note, const gboolean header, const GSM_VCalendarVersion Version)
Definition: gsmcal.c:814
GSM_Error GSM_DeleteNote(GSM_StateMachine *s, GSM_NoteEntry *Note)
Definition: api.c:1606
GSM_ToDo_Priority Priority
GSM_VCalendarVersion
GSM_Error GSM_GetCalendarStatus(GSM_StateMachine *s, GSM_CalendarStatus *Status)
Definition: api.c:1411
unsigned int Number
#define GSM_MAX_CALENDAR_TEXT_LENGTH
Definition: gammu-limits.h:112
GSM_CalendarNoteType Type
GSM_VToDoVersion
GSM_Error GSM_SetCalendarSettings(GSM_StateMachine *s, GSM_CalendarSettings *settings)
Definition: api.c:1522
GSM_Error GSM_GetNextCalendar(GSM_StateMachine *s, GSM_CalendarEntry *Note, gboolean start)
Definition: api.c:1439
GSM_DateTime DateTime
GSM_Error
Definition: gammu-error.h:23
GSM_Error GSM_GetNote(GSM_StateMachine *s, GSM_NoteEntry *Note)
Definition: api.c:1548
GSM_Error GSM_EncodeVNTFile(char *Buffer, const size_t buff_len, size_t *Length, GSM_NoteEntry *Note)
Definition: gsmcal.c:2066
GSM_Error GSM_DeleteToDo(GSM_StateMachine *s, GSM_ToDoEntry *ToDo)
Definition: api.c:1384
GSM_Error GSM_DeleteCalendar(GSM_StateMachine *s, GSM_CalendarEntry *Note)
Definition: api.c:1482
GSM_Error GSM_GetToDo(GSM_StateMachine *s, GSM_ToDoEntry *ToDo)
Definition: api.c:1327
GSM_ToDoType
GSM_Error GSM_GetCalendar(GSM_StateMachine *s, GSM_CalendarEntry *Note)
Definition: api.c:1424
GSM_Error GSM_SetAlarm(GSM_StateMachine *s, GSM_Alarm *Alarm)
Definition: api.c:268
GSM_Error GSM_DeleteAllToDo(GSM_StateMachine *s)
Definition: api.c:1398
gboolean GSM_IsCalendarNoteFromThePast(GSM_CalendarEntry *note)
Definition: gsmcal.c:224
GSM_Error GSM_GetNextNote(GSM_StateMachine *s, GSM_NoteEntry *Note, gboolean start)
Definition: api.c:1563
GSM_ToDoType EntryType
void GSM_CalendarFindDefaultTextTimeAlarmPhone(GSM_CalendarEntry *entry, int *Text, int *Time, int *Alarm, int *Phone, int *EndTime, int *Location)
Definition: gsmcal.c:279
GSM_Error GSM_EncodeVTODO(char *Buffer, const size_t buff_len, size_t *Length, const GSM_ToDoEntry *note, const gboolean header, const GSM_VToDoVersion Version)
Definition: gsmcal.c:1038
int gboolean
Definition: gammu-types.h:23
#define GSM_CALENDAR_ENTRIES
Definition: gammu-limits.h:105
GSM_CalendarNoteType Type
GSM_Error GSM_GetToDoStatus(GSM_StateMachine *s, GSM_ToDoStatus *status)
Definition: api.c:1314
#define GSM_MAX_NOTE_TEXT_LENGTH
Definition: gammu-limits.h:119
GSM_Error GSM_GetNotesStatus(GSM_StateMachine *s, GSM_ToDoStatus *status)
Definition: api.c:1535
GSM_Error GSM_DeleteAllCalendar(GSM_StateMachine *s)
Definition: api.c:1496
GSM_Error GSM_GetAlarm(GSM_StateMachine *s, GSM_Alarm *Alarm)
Definition: api.c:255
#define GSM_TODO_ENTRIES
Definition: gammu-limits.h:126
GSM_Error GSM_DecodeVCALENDAR_VTODO(GSM_Debug_Info *di, char *Buffer, size_t *Pos, GSM_CalendarEntry *Calendar, GSM_ToDoEntry *ToDo, GSM_VCalendarVersion CalVer, GSM_VToDoVersion ToDoVer)
Definition: gsmcal.c:1673
GSM_CalendarType EntryType
GSM_CalendarNoteType
GSM_Error GSM_DecodeVNOTE(char *Buffer, size_t *Pos, GSM_NoteEntry *Note)
Definition: gsmcal.c:2030
GSM_Error GSM_AddNote(GSM_StateMachine *s, GSM_NoteEntry *Note)
Definition: api.c:1592
GSM_Error GSM_SetCalendar(GSM_StateMachine *s, GSM_CalendarEntry *Note)
Definition: api.c:1454
GSM_ToDo_Priority
GSM_Error GSM_SetToDo(GSM_StateMachine *s, GSM_ToDoEntry *ToDo)
Definition: api.c:1356
GSM_Error GSM_SetNote(GSM_StateMachine *s, GSM_NoteEntry *Note)
Definition: api.c:1578
#define GSM_MAX_TODO_TEXT_LENGTH
Definition: gammu-limits.h:133
GSM_CalendarType
GSM_Error GSM_AddCalendar(GSM_StateMachine *s, GSM_CalendarEntry *Note)
Definition: api.c:1468
GSM_Error GSM_GetNextToDo(GSM_StateMachine *s, GSM_ToDoEntry *ToDo, gboolean start)
Definition: api.c:1341
GSM_Error GSM_GetCalendarSettings(GSM_StateMachine *s, GSM_CalendarSettings *settings)
Definition: api.c:1509
GSM_Error GSM_AddToDo(GSM_StateMachine *s, GSM_ToDoEntry *ToDo)
Definition: api.c:1370
gboolean Repeating
GSM_DateTime Date