This commit was manufactured by cvs2svn to create tag
[gnokii.git] / include / gsm-datetime.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_datetime_h
12 #define __gsm_datetime_h
13
14 /* Define enum used to describe what sort of date/time support is
15    available. */
16 typedef enum {
17   GDT_None,     /* The mobile phone doesn't support time and date. */
18   GDT_TimeOnly, /* The mobile phone supports only time. */
19   GDT_DateOnly, /* The mobile phone supports only date. */
20   GDT_DateTime  /* Wonderful phone - it supports date and time. */
21 } GSM_DateTimeSupport;
22
23 /* Structure used for passing dates/times to date/time functions such as
24    GSM_GetTime and GSM_GetAlarm etc. */
25 typedef struct {
26   bool IsSet;      /* for time=is set and available ? for alarm=is set ? */
27   int Year;          /* The complete year specification - e.g. 1999. Y2K :-) */
28   int Month;         /* January = 1 */
29   int Day;
30   int Hour;
31   int Minute;
32   int Second;
33   int Timezone;      /* The difference between local time and GMT */
34 } GSM_DateTime;
35
36 char *DayOfWeek (int year, int month, int day);
37 void GetMachineDateTime( char nowdate[], char nowtime[] );
38
39 void EncodeDateTime(unsigned char* buffer, GSM_DateTime *datetime);
40 void DecodeDateTime(unsigned char* buffer, GSM_DateTime *datetime);
41
42 #endif