FreeCalypso > hg > leo2moko-debug
comparison g23m/condat/ms/src/mfw/Mfw_td.h @ 0:509db1a7b7b8
initial import: leo2moko-r1
author | Space Falcon <falcon@ivan.Harhan.ORG> |
---|---|
date | Mon, 01 Jun 2015 03:24:05 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:509db1a7b7b8 |
---|---|
1 #ifndef _MFW_TD_H_ | |
2 #define _MFW_TD_H_ | |
3 | |
4 /* | |
5 +--------------------------------------------------------------------+ | |
6 | PROJECT: MMI-Framework (8417) $Workfile:: mfw_td.c $| | |
7 | $Author:: NDH $Revision:: 1 $| | |
8 | CREATED: 03.03.2003 $Modtime:: 10.04.00 14:58 $| | |
9 | STATE : code $| | |
10 +--------------------------------------------------------------------+ | |
11 | |
12 MODULE : MFW_TD | |
13 | |
14 PURPOSE : This modul contains Time and Date functionality. | |
15 | |
16 */ | |
17 | |
18 #include <string.h> | |
19 | |
20 | |
21 #if defined (NEW_FRAME) | |
22 | |
23 #include "typedefs.h" | |
24 #include "vsi.h" | |
25 #include "pei.h" | |
26 #include "custom.h" | |
27 #include "gsm.h" | |
28 | |
29 #else | |
30 | |
31 #include "STDDEFS.H" | |
32 #include "custom.h" | |
33 #include "gsm.h" | |
34 #include "vsi.h" | |
35 | |
36 #endif | |
37 | |
38 #include "mfw_mfw.h" | |
39 #include "mfw_utils.h" | |
40 | |
41 #include "cus_aci.h" | |
42 #include "prim.h" | |
43 #include "pcm.h" | |
44 #include "rtc.h" | |
45 | |
46 /***************************Data types**************************************** | |
47 **/ | |
48 | |
49 | |
50 #define T_MFW_TIME T_RTC_TIME | |
51 #define T_MFW_DATE T_RTC_DATE | |
52 | |
53 typedef enum | |
54 { | |
55 MFW_TIME_FORMAT_12HOUR, | |
56 MFW_TIME_FORMAT_24HOUR | |
57 } T_MFW_TIME_FORMAT; | |
58 /*SPR 2639, added data structure definition for writing to FFS*/ | |
59 typedef struct | |
60 { T_MFW_TIME alarm_time; | |
61 T_MFW_DATE alarm_date; | |
62 | |
63 } T_MFW_ALARM_INFO; | |
64 | |
65 /* | |
66 * TD Parameter | |
67 */ | |
68 #define T_MFW_TD_PARA UBYTE | |
69 | |
70 /* | |
71 * Time and date Control Block | |
72 */ | |
73 typedef struct | |
74 { | |
75 T_MFW_EVENT emask; /* events of interest */ | |
76 T_MFW_EVENT event; /* current event */ | |
77 T_MFW_CB handler; | |
78 T_MFW_TD_PARA para; | |
79 } T_MFW_TD; | |
80 /*************************************Events**********************************************/ | |
81 | |
82 #define MFW_TD_ALARM 1 | |
83 | |
84 /***************************Prototypes**************************************** | |
85 **/ | |
86 void mfw_td_init(void); // Initialise time and date on ME switch-on // RAVI | |
87 | |
88 | |
89 T_MFW_HND mfw_td_create(MfwHnd hWin, MfwEvt event, MfwCb cbfunc);//specify MFW event handler | |
90 MfwRes mfw_td_delete (MfwHnd h);//delete event handler | |
91 MfwRes mfw_td_set_time(T_MFW_TIME* time);//set the current time | |
92 MfwRes mfw_td_set_date(T_MFW_DATE* date);//et the current date | |
93 | |
94 | |
95 | |
96 char* mfw_td_get_clock_str(void); // return clock string (ASCII).Used by MmiIdle // RAVI | |
97 char* mfw_td_get_date_str(void); // return date string(ASCII) // RAVI | |
98 | |
99 T_MFW_DATE* mfw_td_get_date(void);//return date structure .Used by MmiTimeDate // RAVI | |
100 T_MFW_TIME* mfw_td_get_time(void);//return time structure // RAVI | |
101 | |
102 MfwRes mfw_td_set_alarm(T_MFW_TIME* time, T_MFW_DATE* date);//set alarm | |
103 | |
104 MfwRes mfw_td_cancel_alarm(void);//cancel alarm // RAVI | |
105 | |
106 MfwRes mfw_td_get_alarm(T_MFW_TIME* time, T_MFW_DATE* date);// MmiTimeDate, editing | |
107 | |
108 MfwRes mfw_td_set_time_format(T_MFW_TIME_FORMAT format);//set time format | |
109 /*SPR 2639, added prototype for this function so it can be called from outside the module */ | |
110 UBYTE mfw_td_convert_to_24_hour(T_MFW_TIME* time);//returns the hour value in 24-hour clock format | |
111 | |
112 void mfw_td_exit(void); //kill any data structures // RAVI | |
113 | |
114 | |
115 #endif |