Tizen 2.1 base
[platform/core/system/sync-agent.git] / src / fw-plugins / common-public / slp-sysnoti-alarm / include / plugin_slp_sysnoti_alarm.h
1 /*
2  * sync-agent
3  * Copyright (c) 2012 Samsung Electronics Co., Ltd.
4  *
5  * Licensed under the Apache License, Version 2.0 (the License);
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17
18 #ifndef PLUGIN_SLP_SYSNOTI_ALARM_H_
19 #define PLUGIN_SLP_SYSNOTI_ALARM_H_
20
21 #include <time.h>
22
23 #define DAY_CNT 7
24
25 /**
26  * @brief Enumerations for the day type
27  */
28 typedef enum {
29         DAY_NO_TYPE = 0x00,
30         DAY_SUN = 0x01,
31         DAY_MON = 0x02,
32         DAY_TUE = 0x04,
33         DAY_WED = 0x08,
34         DAY_THU = 0x10,
35         DAY_FRI = 0x20,
36         DAY_SAT = 0x40
37 } pmci_day_type_e;
38
39 /**
40  * @brief Enumerations for the repeat type
41  */
42 typedef enum {
43         REPEAT_NO_TYPE = 0,
44         ONCE = 1,
45         REPEAT,
46         REPEAT_WEEKLY,
47         REPEAT_MONTHLY,
48         REPEAT_ANNUALLY,
49 } pmci_repeat_type_e;
50
51 /**
52  * sync-agent
53  * @see PMCI_Add_Item_To_Specific_Type(), SPECIFIC_TYPE_CALLBACK
54  */
55 typedef struct {
56         /* start alarm time : time to start alarm at first.
57          *  format: 2011-01-02T15:13:02Z
58          */
59         char *start_alarm_time;
60
61         /* repeat type */
62         pmci_repeat_type_e repeat_type;
63
64         /* repeat value
65          * 1) repeat_type: ONCE => repeat_value: do not mean
66          * 1) repeat_type: REPEAT => repeat_value: interval time (second)
67          * 2) repeat_type: etc  => repeat_value: pmci_day_type_e
68          */
69         int repeat_value;
70
71         int is_disposable;
72 } pmci_alarm_s;
73
74 #endif                          /* PLUGIN_SLP_SYSNOTI_ALARM_H_ */