This file is indexed.

/usr/include/gammu/gammu-calendar.h is in libgammu-dev 1.38.1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
/**
 * \file gammu-calendar.h
 * \author Michal Čihař
 *
 * Calendar data and functions.
 */
#ifndef __gammu_calendar_h
#define __gammu_calendar_h

/**
 * \defgroup Calendar Calendar
 * Calendar events manipulations.
 */

#ifdef	__cplusplus
extern "C" {
#endif

#include <gammu-datetime.h>
#include <gammu-limits.h>
#include <gammu-debug.h>

/**
 * \defgroup Note Note
 * Notes manipulations.
 */

/**
 * \defgroup Todo Todo
 * Todo entries manipulations.
 */

/**
 * Calendar settings structure.
 *
 * \ingroup Calendar
 */
typedef struct {
	/**
	 * Monday = 1, Tuesday = 2,...
	 */
	int StartDay;
	/**
	 * 0 = no delete, 1 = after day,...
	 */
	int AutoDelete;
} GSM_CalendarSettings;

/**
 * Status of to do entries.
 *
 * \ingroup Todo
 */
typedef struct {
	/**
	 * Number of free positions.
	 */
	int Free;
	/**
	 * Number of used positions.
	 */
	int Used;
} GSM_ToDoStatus;

/**
 * Structure used for returning calendar status.
 *
 * \ingroup Calendar
 */
typedef struct {
	/**
	 * Number of free positions.
	 */
	int Free;
	/**
	 * Number of used positions.
	 */
	int Used;
} GSM_CalendarStatus;

/**
 * Enum defines types of calendar notes
 *
 * \ingroup Calendar
 */
typedef enum {
	/**
	 * Reminder or Date
	 */
	GSM_CAL_REMINDER = 1,
	/**
	 * Call
	 */
	GSM_CAL_CALL,
	/**
	 * Meeting
	 */
	GSM_CAL_MEETING,
	/**
	 * Birthday or Anniversary or Special Occasion
	 */
	GSM_CAL_BIRTHDAY,
	/**
	 * Memo or Miscellaneous
	 */
	GSM_CAL_MEMO,
	/**
	 * Travel
	 */
	GSM_CAL_TRAVEL,
	/**
	 * Vacation
	 */
	GSM_CAL_VACATION,
	/**
	 * Training - Athletism
	 */
	GSM_CAL_T_ATHL,
	/**
	 * Training - Ball Games
	 */
	GSM_CAL_T_BALL,
	/**
	 * Training - Cycling
	 */
	GSM_CAL_T_CYCL,
	/**
	 * Training - Budo
	 */
	GSM_CAL_T_BUDO,
	/**
	 * Training - Dance
	 */
	GSM_CAL_T_DANC,
	/**
	 * Training - Extreme Sports
	 */
	GSM_CAL_T_EXTR,
	/**
	 * Training - Football
	 */
	GSM_CAL_T_FOOT,
	/**
	 * Training - Golf
	 */
	GSM_CAL_T_GOLF,
	/**
	 * Training - Gym
	 */
	GSM_CAL_T_GYM,
	/**
	 * Training - Horse Race
	 */
	GSM_CAL_T_HORS,
	/**
	 * Training - Hockey
	 */
	GSM_CAL_T_HOCK,
	/**
	 * Training - Races
	 */
	GSM_CAL_T_RACE,
	/**
	 * Training - Rugby
	 */
	GSM_CAL_T_RUGB,
	/**
	 * Training - Sailing
	 */
	GSM_CAL_T_SAIL,
	/**
	 * Training - Street Games
	 */
	GSM_CAL_T_STRE,
	/**
	 * Training - Swimming
	 */
	GSM_CAL_T_SWIM,
	/**
	 * Training - Tennis
	 */
	GSM_CAL_T_TENN,
	/**
	 * Training - Travels
	 */
	GSM_CAL_T_TRAV,
	/**
	 * Training - Winter Games
	 */
	GSM_CAL_T_WINT,
	/**
	 * Alarm
	 */
	GSM_CAL_ALARM,
	/**
	 * Alarm repeating each day.
	 */
	GSM_CAL_DAILY_ALARM,
	/**
	 * Shopping
	 */
	GSM_CAL_SHOPPING,
} GSM_CalendarNoteType;

/**
 * One value of calendar event.
 *
 * \ingroup Calendar
 */
typedef enum {
	/**
	 * Date and time of event start.
	 */
	CAL_START_DATETIME = 1,
	/**
	 * Date and time of event end.
	 */
	CAL_END_DATETIME,
	/**
	 * Alarm date and time.
	 */
	CAL_TONE_ALARM_DATETIME,
	/**
	 * Date and time of silent alarm.
	 */
	CAL_SILENT_ALARM_DATETIME,
	/**
	 * Text.
	 */
	CAL_TEXT,
	/**
	 * Detailed description.
	 */
	CAL_DESCRIPTION,
	/**
	 * Location.
	 */
	CAL_LOCATION,
	/**
	 * Phone number.
	 */
	CAL_PHONE,
	/**
	 * Whether this entry is private.
	 */
	CAL_PRIVATE,
	/**
	 * Related contact id.
	 */
	CAL_CONTACTID,		/* 10 */
	/**
	 * Repeat each x'th day of week.
	 */
	CAL_REPEAT_DAYOFWEEK,
	/**
	 * Repeat each x'th day of month.
	 */
	CAL_REPEAT_DAY,
	/**
	 * Repeat each x'th day of year.
	 */
	CAL_REPEAT_DAYOFYEAR,
	/**
	 * Repeat x'th week of month.
	 */
	CAL_REPEAT_WEEKOFMONTH,
	/**
	 * Repeat x'th month.
	 */
	CAL_REPEAT_MONTH,
	/**
	 * Repeating frequency.
	 */
	CAL_REPEAT_FREQUENCY,
	/**
	 * Repeating start.
	 */
	CAL_REPEAT_STARTDATE,
	/**
	 * Repeating end.
	 */
	CAL_REPEAT_STOPDATE,
	/**
	 * Number of repetitions.
	 */
	CAL_REPEAT_COUNT,
	/**
	 * IrMC LUID which can be used for synchronisation.
	 */
	CAL_LUID,		/* 20 */
	/**
	 * Date and time of last modification.
	 */
	CAL_LAST_MODIFIED,
} GSM_CalendarType;

/**
 * One value of calendar event.
 *
 * \ingroup Calendar
 */
typedef struct {
	/**
	 * Type of value.
	 */
	GSM_CalendarType EntryType;
	/**
	 * Date and time of value, if applicable.
	 */
	GSM_DateTime Date;
	/**
	 * Number of value, if applicable.
	 */
	int Number;
	/**
	 * During adding SubEntry Gammu can return here info, if it was done OK
	 */
	GSM_Error AddError;
	/**
	 * Text of value, if applicable.
	 */
	unsigned char Text[(GSM_MAX_CALENDAR_TEXT_LENGTH + 1) * 2];
} GSM_SubCalendarEntry;

/**
 * Calendar note values.
 *
 * \ingroup Calendar
 */
typedef struct {
	/**
	 * Type of calendar note.
	 */
	GSM_CalendarNoteType Type;
	/**
	 * Location in memory.
	 */
	int Location;
	/**
	 * Number of entries.
	 */
	int EntriesNum;
	/**
	 * Values of entries.
	 */
	GSM_SubCalendarEntry Entries[GSM_CALENDAR_ENTRIES];
} GSM_CalendarEntry;

/**
 * Finds inxedes of default entries.
 *
 * \ingroup Calendar
 */
void GSM_CalendarFindDefaultTextTimeAlarmPhone(GSM_CalendarEntry * entry,
					       int *Text, int *Time, int *Alarm,
					       int *Phone, int *EndTime,
					       int *Location);

/**
 * Types of to do values. In parenthesis is member of @ref GSM_SubToDoEntry,
 * where value is stored.
 *
 * \ingroup Todo
 */
typedef enum {
	/**
	 * Due date (Date).
	 */
	TODO_END_DATETIME = 1,
	/**
	 * Whether is completed (Number).
	 */
	TODO_COMPLETED,
	/**
	 * When should alarm be fired (Date).
	 */
	TODO_ALARM_DATETIME,
	/**
	 * When should silent alarm be fired (Date).
	 */
	TODO_SILENT_ALARM_DATETIME,
	/**
	 * Text of to do (Text).
	 */
	TODO_TEXT,
	/**
	 * Description of to do (Text).
	 */
	TODO_DESCRIPTION,
	/**
	 * Location of to do (Text).
	 */
	TODO_LOCATION,
	/**
	 * Whether entry is private (Number).
	 */
	TODO_PRIVATE,
	/**
	 * Category of entry (Number).
	 */
	TODO_CATEGORY,
	/**
	 * Related contact ID (Number).
	 */
	TODO_CONTACTID,
	/**
	 * Number to call (Text).
	 */
	TODO_PHONE,
	/**
	 * IrMC LUID which can be used for synchronisation (Text).
	 */
	TODO_LUID,
	/**
	 * Date and time of last modification (Date).
	 */
	TODO_LAST_MODIFIED,
	/**
	 * Start date (Date).
	 */
	TODO_START_DATETIME,
	/**
	 * Completed date (Date).
	 */
	TODO_COMPLETED_DATETIME,
} GSM_ToDoType;

/**
 * Priority of to do.
 *
 * \ingroup Todo
 */
typedef enum {
	GSM_Priority_None = 0,
	GSM_Priority_High,
	GSM_Priority_Medium,
	GSM_Priority_Low,
	GSM_Priority_INVALID
} GSM_ToDo_Priority;

/**
 * Value of to do entry.
 *
 * \ingroup Todo
 */
typedef struct {
	/**
	 * Type of entry.
	 */
	GSM_ToDoType EntryType;
	/**
	 * Date of value, if appropriate, see @ref GSM_ToDoType.
	 */
	GSM_DateTime Date;
	/**
	 * Number of value, if appropriate, see @ref GSM_ToDoType.
	 */
	unsigned int Number;
	/**
	 * Text of value, if appropriate, see @ref GSM_ToDoType.
	 */
	unsigned char Text[(GSM_MAX_TODO_TEXT_LENGTH + 1) * 2];
} GSM_SubToDoEntry;

/**
 * To do entry.
 *
 * \ingroup Todo
 */
typedef struct {
	/**
	 * Type of todo note.
	 */
	GSM_CalendarNoteType Type;
	/**
	 * Priority of entry.
	 */
	GSM_ToDo_Priority Priority;
	/**
	 * Location in memory.
	 */
	int Location;
	/**
	 * Number of entries.
	 */
	int EntriesNum;
	/**
	 * Values of current entry.
	 */
	GSM_SubToDoEntry Entries[GSM_TODO_ENTRIES];
} GSM_ToDoEntry;

/**
 * Note entry.
 *
 * \ingroup Note
 */
typedef struct {
	/**
	 * Location in memory.
	 */
	int Location;
	/**
	 * Text of note.
	 */
	char Text[(GSM_MAX_NOTE_TEXT_LENGTH + 1) * 2];
} GSM_NoteEntry;

/**
 * Alarm values.
 *
 * \ingroup Calendar
 */
typedef struct {
	/**
	 * Location where it is stored.
	 */
	int Location;
	/**
	 * Date and time of alarm.
	 */
	GSM_DateTime DateTime;
	/**
	 * Whether it repeats each day.
	 */
	gboolean Repeating;
	/**
	 * Text that is shown on display.
	 */
	unsigned char Text[(GSM_MAX_CALENDAR_TEXT_LENGTH + 1) * 2];
} GSM_Alarm;

/**
 * Format of vTodo.
 *
 * \ingroup Todo
 */
typedef enum {
	/**
	 * Format compatible with Nokia - limited subsed of standard.
	 */
	Nokia_VToDo = 1,
	/**
	 * Format compatible with SonyEricsson - complete standard.
	 */
	SonyEricsson_VToDo,
	/**
	 * Format compatible with Mozilla - iCalendar based.
	 */
	Mozilla_VToDo,
} GSM_VToDoVersion;

/**
 * Format of vCalendar export.
 *
 * \ingroup Calendar
 */
typedef enum {
	/**
	 * vCalendar specially hacked for Nokia .
	 */
	Nokia_VCalendar = 1,
	/**
	 * vCalendar specially hacked for Siemens.
	 */
	Siemens_VCalendar,
	/**
	 * Standard vCalendar (which works for Sony-Ericsson phones)
	 */
	SonyEricsson_VCalendar,
	/**
	 * iCalendar as compatible with Mozilla.
	 */
	Mozilla_iCalendar,
} GSM_VCalendarVersion;

/**
 * Encodes vTodo to buffer.
 *
 * \param Buffer Storage for data.
 * \param[in] buff_len Size of output buffer.
 * \param Length Pointer to current position in data (will be incremented).
 * \param note Note to encode.
 * \param header Whether to include vCalendar header.
 * \param Version Format of vTodo to create.
 *
 * \return Error code.
 *
 * \ingroup Todo
 */
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);

/**
 * Encodes vCalendar to buffer.
 *
 * \param Buffer Storage for data.
 * \param[in] buff_len Size of output buffer.
 * \param Length Pointer to current position in data (will be incremented).
 * \param note Note to encode.
 * \param header Whether to include vCalendar header.
 * \param Version Format of vCalendar to create.
 *
 * \return Error code.
 *
 * \ingroup Calendar
 */
GSM_Error GSM_EncodeVCALENDAR(char *Buffer, const size_t buff_len,
			      size_t * Length, GSM_CalendarEntry * note,
			      const gboolean header,
			      const GSM_VCalendarVersion Version);

/**
 * Decodes vNote from buffer.
 *
 * \param Buffer Buffer to decode.
 * \param Pos Current position in buffer (will be updated).
 * \param Note Storage for note entry.
 *
 * \return Error code.
 *
 * \ingroup Note
 */
GSM_Error GSM_DecodeVNOTE(char *Buffer, size_t * Pos, GSM_NoteEntry * Note);

/**
 * Encodes vNote to buffer.
 *
 * \param Buffer Storage for data.
 * \param[in] buff_len Size of output buffer.
 * \param Length Pointer to current position in data (will be incremented).
 * \param Note Note to encode.
 *
 * \return Error code.
 *
 * \ingroup Note
 */
GSM_Error GSM_EncodeVNTFile(char *Buffer, const size_t buff_len,
			    size_t * Length, GSM_NoteEntry * Note);

/**
 * Decodes vCalendar and vTodo buffer.
 *
 * \param di Pointer to debugging description.
 * \param Buffer Buffer to decode.
 * \param Pos Current position in buffer (will be updated).
 * \param Calendar Storage for calendar entry.
 * \param ToDo Storage for todo entry.
 * \param CalVer Format of vCalendar.
 * \param ToDoVer Format of vTodo.
 *
 * \return Error code
 *
 * \ingroup Calendar
 */
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);

/**
 * Detects whether calendar note is in past.
 *
 * \param note Note to check.
 *
 * \return Whether entry is in past.
 *
 * \ingroup Calendar
 */
gboolean GSM_IsCalendarNoteFromThePast(GSM_CalendarEntry * note);

/**
 * Reads alarm set in phone.
 *
 * \param s State machine pointer.
 * \param Alarm Storage for alarm.
 *
 * \return Error code
 *
 * \ingroup Calendar
 */
GSM_Error GSM_GetAlarm(GSM_StateMachine * s, GSM_Alarm * Alarm);

/**
 * Sets alarm in phone.
 *
 * \param s State machine pointer.
 * \param Alarm Alarm to set.
 *
 * \return Error code
 *
 * \ingroup Calendar
 */
GSM_Error GSM_SetAlarm(GSM_StateMachine * s, GSM_Alarm * Alarm);

/**
 * Gets status of ToDos (count of used entries).
 *
 * \param s State machine pointer.
 * \param status Storage for todo status.
 *
 * \return Error code
 *
 * \ingroup Todo
 */
GSM_Error GSM_GetToDoStatus(GSM_StateMachine * s, GSM_ToDoStatus * status);

/**
 * Reads ToDo from phone.
 *
 * \param s State machine pointer.
 * \param ToDo Storage for note.
 *
 * \return Error code
 *
 * \ingroup Todo
 */
GSM_Error GSM_GetToDo(GSM_StateMachine * s, GSM_ToDoEntry * ToDo);

/**
 * Reads ToDo from phone.
 *
 * \param s State machine pointer.
 * \param ToDo Storage for note, if start is FALSE, should contain
 * data from previous read (at least position).
 * \param start Whether we're doing initial read or continue in reading.
 *
 * \return Error code
 *
 * \ingroup Todo
 */
GSM_Error GSM_GetNextToDo(GSM_StateMachine * s, GSM_ToDoEntry * ToDo,
			  gboolean start);
/**
 * Sets ToDo in phone.
 *
 * \param s State machine pointer.
 * \param ToDo ToDo to set, should contain valid location.
 *
 * \return Error code
 *
 * \ingroup Todo
 */
GSM_Error GSM_SetToDo(GSM_StateMachine * s, GSM_ToDoEntry * ToDo);

/**
 * Adds ToDo in phone.
 *
 * \param s State machine pointer.
 * \param ToDo ToDo to add.
 *
 * \return Error code
 *
 * \ingroup Todo
 */
GSM_Error GSM_AddToDo(GSM_StateMachine * s, GSM_ToDoEntry * ToDo);

/**
 * Deletes ToDo entry in phone.
 *
 * \param s State machine pointer.
 * \param ToDo ToDo to delete, only location is actually used.
 *
 * \return Error code
 *
 * \ingroup Todo
 */
GSM_Error GSM_DeleteToDo(GSM_StateMachine * s, GSM_ToDoEntry * ToDo);

/**
 * Deletes all todo entries in phone.
 *
 * \param s State machine pointer.
 *
 * \return Error code
 *
 * \ingroup Todo
 */
GSM_Error GSM_DeleteAllToDo(GSM_StateMachine * s);

/**
 * Retrieves calendar status (number of used entries).
 *
 * \param s State machine pointer.
 * \param Status Storage for status.
 *
 * \return Error code
 *
 * \ingroup Calendar
 */
GSM_Error GSM_GetCalendarStatus(GSM_StateMachine * s,
				GSM_CalendarStatus * Status);
/**
 * Retrieves calendar entry.
 *
 * \param s State machine pointer.
 * \param Note Storage for note.
 *
 * \return Error code
 *
 * \ingroup Calendar
 */
GSM_Error GSM_GetCalendar(GSM_StateMachine * s, GSM_CalendarEntry * Note);

/**
 * Retrieves calendar entry. This is useful for continuous reading of all
 * calendar entries.
 *
 * \param s State machine pointer.
 * \param Note Storage for note, if start is FALSE, should contain
 * data from previous read (at least position).
 * \param start Whether we're doing initial read or continue in reading.
 *
 * \return Error code
 *
 * \ingroup Calendar
 */
GSM_Error GSM_GetNextCalendar(GSM_StateMachine * s, GSM_CalendarEntry * Note,
			      gboolean start);
/**
 * Sets calendar entry
 *
 * \param s State machine pointer.
 * \param Note New note values, needs to contain valid position.
 *
 * \return Error code
 *
 * \ingroup Calendar
 */
GSM_Error GSM_SetCalendar(GSM_StateMachine * s, GSM_CalendarEntry * Note);

/**
 * Adds calendar entry.
 *
 * \param s State machine pointer.
 * \param Note Note to add.
 *
 * \return Error code
 *
 * \ingroup Calendar
 */
GSM_Error GSM_AddCalendar(GSM_StateMachine * s, GSM_CalendarEntry * Note);

/**
 * Deletes calendar entry.
 *
 * \param s State machine pointer.
 * \param Note Note to delete, must contain position.
 *
 * \return Error code
 *
 * \ingroup Calendar
 */
GSM_Error GSM_DeleteCalendar(GSM_StateMachine * s, GSM_CalendarEntry * Note);

/**
 * Deletes all calendar entries.
 *
 * \param s State machine pointer.
 *
 * \return Error code
 *
 * \ingroup Calendar
 */
GSM_Error GSM_DeleteAllCalendar(GSM_StateMachine * s);

/**
 * Reads calendar settings.
 *
 * \param s State machine pointer.
 * \param settings Storage for settings.
 *
 * \return Error code
 *
 * \ingroup Calendar
 */
GSM_Error GSM_GetCalendarSettings(GSM_StateMachine * s,
				  GSM_CalendarSettings * settings);
/**
 * Sets calendar settings.
 *
 * \param s State machine pointer.
 * \param settings New calendar settings.
 *
 * \return Error code
 *
 * \ingroup Calendar
 */
GSM_Error GSM_SetCalendarSettings(GSM_StateMachine * s,
				  GSM_CalendarSettings * settings);
/**
 * Retrieves notes status (number of used entries).
 *
 * \param s State machine pointer.
 * \param status Storage for status.
 *
 * \return Error code
 *
 * \ingroup Note
 */
GSM_Error GSM_GetNotesStatus(GSM_StateMachine * s, GSM_ToDoStatus * status);

/**
 * Retrieves notes entry.
 *
 * \param s State machine pointer.
 * \param Note Storage for note.
 *
 * \return Error code
 *
 * \ingroup Note
 */
GSM_Error GSM_GetNote(GSM_StateMachine * s, GSM_NoteEntry * Note);

/**
 * Retrieves note entry. This is useful for continuous reading of all
 * notes entries.
 *
 * \param s State machine pointer.
 * \param Note Storage for note, if start is FALSE, should contain
 * data from previous read (at least position).
 * \param start Whether we're doing initial read or continue in reading.
 *
 * \return Error code
 *
 * \ingroup Note
 */
GSM_Error GSM_GetNextNote(GSM_StateMachine * s, GSM_NoteEntry * Note,
			  gboolean start);
/**
 * Sets note entry
 *
 * \param s State machine pointer.
 * \param Note New note values, needs to contain valid position.
 *
 * \return Error code
 *
 * \ingroup Note
 */
GSM_Error GSM_SetNote(GSM_StateMachine * s, GSM_NoteEntry * Note);

/**
 * Adds note entry.
 *
 * \param s State machine pointer.
 * \param Note Note to add.
 *
 * \return Error code
 *
 * \ingroup Note
 */
GSM_Error GSM_AddNote(GSM_StateMachine * s, GSM_NoteEntry * Note);

/**
 * Deletes note entry.
 *
 * \param s State machine pointer.
 * \param Note Note to delete, must contain position.
 *
 * \return Error code
 *
 * \ingroup Note
 */
GSM_Error GSM_DeleteNote(GSM_StateMachine * s, GSM_NoteEntry * Note);

/**
 * Deletes all notes entries.
 *
 * \param s State machine pointer.
 *
 * \return Error code
 *
 * \ingroup Note
 */
GSM_Error GSM_DeleteAllNotes(GSM_StateMachine * s);

#ifdef	__cplusplus
}
#endif
#endif

/* Editor configuration
 * vim: noexpandtab sw=8 ts=8 sts=8 tw=72:
 */