Tizen 2.0 Release
[framework/system/oma-dm-agent.git] / include / common / dm_common_def.h
1 /*
2  * oma-dm-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 /**
19  *   @DM_Common_Def.h
20  *   @version                                                                   0.1
21  *   @brief                                                                             This file is the header file of defined common define and common enum type for using oma-dm-serice
22  */
23
24 #ifndef OMA_DM_COMMON_DEF_H_
25 #define OMA_DM_COMMON_DEF_H_
26
27 /*#define _OMA_DM_V11_*/
28 #define _OMA_DM_V12_
29
30 #define _OMA_DM_DEBUG_
31 #ifdef _OMA_DM_DEBUG_
32 #define _OMA_DM_TEST_DEBUG
33 #endif
34
35 /*log tag define*/
36 /*
37 #define OMA_DM_LOG
38 #ifdef OMA_DM_LOG
39         #define LOG_TAG "OMA_DM"
40 #endif
41 */
42
43 //#define _DM_SCORE_TEST
44 #ifdef _DM_SCORE_TEST
45 #define _DM_BUNDANG_TEST
46 #endif
47
48 #define _SLP_SAMSUNG_DM_MO
49
50 /*
51  * ==============================================
52  *                      OMA DM APP ID
53  * ==============================================
54  */
55 /*for bada*/
56 /*#define OMA_DM_FUMO_APPID "3b74c3e0075a630e"*/
57 /*for slp  fota*/
58
59 /*
60 #define OMA_DM_FUMO_APPID "bc2d5906ebefbb66"
61 #define OMA_DM_FUMO_APPSECRETID "rLIrPQYjzNOgkSU6gQME+b2J8Ro="
62
63 #define OMA_DM_LAWMO_APPID "ed7b8510eb22050e"
64 #define OMA_DM_LAWMO_APPSECRETID "OHlxuLBrlM25AQlN6ZN05GFowk8="
65 */
66
67 /*
68  * ==============================================
69  *                      OMA DM PKG DEFINE
70  * ==============================================
71  */
72 #define OMA_DM_AGENT_PKG "oma-dm-agent"
73 #define OMA_DM_FUMO_UI_PKG      "com.samsung.oma-dm"
74 #define OMA_DM_FUMO_NOTI_UI_PKG "com.samsung.oma-dm-noti"
75 #define OMA_DM_ADMIN_UI_PKG     "com.samsung.oma-dm-admin"
76 #define OMA_DM_ALERT_UI_PKG     "com.samsung.oma-dm-alert"
77 #define OMA_DM_CP_UI_PKG                "com.samsung.oma-dm-cp"
78
79 /*
80  * ==============================================
81  *                      OMA DM MSG
82  * ==============================================
83  */
84
85 #define OMA_DM_MSG_PATH "/tmp/dm.txt"
86
87 /*
88  * ==============================================
89  *                      FUMO ENGINE DEFINE
90  * ==============================================
91  */
92 #define FUMO "fumo"
93 #define OMADM_FUMO_UI_TYPE "omadm_fota_ui"
94 #define OMADM_FUMO_NOTI_UI_TYPE "omadm_noti_ui"
95 #define OMADM_FUMO_BACKGROUND_UI_TYPE "omadm_background_ui"
96 #define OMADM_ADMIN_UI_TYPE "omadm_admin_ui"
97 #define OMADM_ALERT_UI_TYPE "omadm_alert_ui"
98 #define OMADM_CP_UI_TYPE "omadm_cp_ui"
99
100 #define FUMO_ACCOUNT_FLAG "fumo_account_flag"
101 #define FUMO_ACCOUNT_ALARM "fumo_account_alarm"
102 #define FUMO_ENGINE "fumo_engine"
103 #define FUMO_INTERVAL "fumo_interval"
104 #define FUMO_WIFI_ONLY_CONFIG "fumo_wifi_only_config"
105
106 #define LAWMO_ENGINE "lawmo_engine"
107 #define LAWMO_ACCOUNT_FLAG "lawmo_account_flag"
108 #define LAWMO_ACCOUNT_ALARM "lawmo_account_alarm"
109
110 #define IPC_DS                                                                                                          "/tmp/agent_fw_event_omads"
111 #define FOTA_DELTA_INTERNAL_STORAGE                             "/opt/data/fota"
112 #define FOTA_DELTA_SD_INTERNAL_STORAGE                  "/opt/media"
113 #define FOTA_DELTA_SD_EXTERNAL_STORAGE          "/opt/storage/sdcard"
114
115 typedef enum {
116         //INTERVAL_NONE =0,
117         INTERVAL_1HOUR = 1,
118         INTERVAL_3HOURS = 2,
119         INTERVAL_6HOURS = 3,
120         INTERVAL_12HOURS = 4,
121         INTERVAL_1DAY = 5,
122         //INTERVAL_7DAYS = 5,
123         INTERVAL_CANCEL = 6,
124         INTERVAL_1MONTH = 7
125 } Reminder_Interval;
126
127 typedef enum {
128         FUMO_INTERVAL_TYPE = 0, //alarm
129         FUMO_WIFI_ONLY_TYPE = 1,
130         FUMO_ACCOUNT_FLAG_TYPE = 2,
131         FUMO_ACCOUNT_ALARM_TYPE = 3,    //alarm
132         LAWMO_ACCOUNT_FLAG_TYPE = 4,
133         LAWMO_ACCOUNT_ALARM_TYPE = 5    //alarm
134 } CONFIG_TYPE;
135
136 /*
137  * ==============================================
138  *                      OMA DM ENGINE STATUS
139  * ==============================================
140 */
141
142 typedef enum {
143         DM_IDLE = 0,
144         DM_BEFORE_BOOTSTRAP = 1,
145         DM_COMMON_PROCESSING = 2,
146         DM_GENERIC_ALERT = 3,
147         DM_SERVICE_ENGINE_PROCESSING = 4,
148
149         /*todo */
150         /*DM_FUMO_ENGINE_PROCESSING = 4,
151            DM_LAWMO_ENGINE_PROCESSING = 5,
152            DM_COMPLETE_FIRMWARE_UPDATE_WITH_GENERICALERT, */
153
154         /*after 50 */
155         DM_UI_DISPLAY,
156         DM_UI_CONFIRMATION,
157         DM_UI_USER_INPUT,
158         DM_UI_USER_CHOISE,
159         DM_UI_PROGRESS_BAR,
160
161 } ENGINE_STATUS;
162
163 /*
164  * ==============================================
165  *                      SERVICE ENGINE STATUS
166  * ==============================================
167 */
168
169 typedef enum {
170         DM_SERVICE_UNKNOWN = 0,
171         DM_SERVICE_ING = 1,
172         DM_GENERICALERT_ING = 2
173 /*      DM_SERVICE_ALARM = 3,
174         DM_SERVICE_OTHER = 4*/
175 } SERVICE_ENGINE_STATUS;
176
177 /*
178  * ==============================================
179  *                      ENGINE ID
180  * ==============================================
181 */
182
183 typedef enum {
184         IDLE_ENGINE = 0,
185         BOOTSTRAP = 1,
186         COMMON_ENGINE = 2,
187         GENERICALERT = 3,
188         //SERVICE_ENGINE = 4,
189
190         //sync_agent_dm_mo_type_e MAPPING
191         FUMO_SERVICE_ENGINE = 4,
192         LAWMO_SERVICE_ENGINE = 8,
193         //SCOMO_SERVICE_ENGINE = 16,
194         NO_SERVICE_ENGINE = 32
195 } ENGINE_ID;
196
197 /*
198  * ==============================================
199  *                      ENGINE TYPE
200  * ==============================================
201 */
202
203 typedef enum {
204         SAMSUNG_FUMO_TYPE = 4,
205         SAMSUNG_FMM_TYPE = 8,
206         GCF_TYPE = 16,
207         NO_ENGINE_TYPE = 32
208 } SERVICE_SERVER_TYPE;
209
210 /*
211  * ==============================================
212  *                      DM OPERATION MODE
213  * ==============================================
214 */
215
216 typedef enum {
217         OPER_UNKNOWN,
218         OPER_SERVER_INITIATION_FROM_WAP,
219         OPER_SERVER_INITIATION_FROM_IP,
220         OPER_USER_INITIATION,
221         OPER_SCHEDULER
222 } OPER_MODE;
223
224 /*
225  * ==============================================
226  *                      MEMORY TYPE
227  * ==============================================
228 */
229 typedef enum {
230         MEMORY_INTERNAL,
231         MEMORY_SD_CARD
232 } MEMORY_TYPE;
233
234 /*
235  * ==============================================
236  *                      USER INTERACTION OPTION
237  * ==============================================
238 */
239
240 #define UI_OP_MINDT "MINDT="
241 #define UI_OP_MAXDT "MAXDT="
242 #define UI_OP_DR "DR="
243 #define UI_OP_MAXLEN "MAXLEN="
244 #define UI_OP_IT "IT="
245 #define UI_OP_ET "ET="
246 #define UI_OP_SEPARATOR "&"
247 #define UI_OP_EQUAL "="
248
249 /*
250  * ==============================================
251  *                      RESUME STATES DOWNLOAD, INSTALL, LATER
252  * ==============================================
253 */
254
255 typedef enum {
256         RESUME_STATUS_DONWLOAD_BEFORE = 0,
257         RESUME_STATUS_DOWNLOAD,
258         RESUME_STATUS_DOWNLOAD_LATER,
259         RESUME_STATUS_DOWNLOAD_IDLE,
260         RESUME_STATUS_INSTALL_BEFORE,
261         RESUME_STATUS_INSTALL,
262         RESUME_STATUS_INSTALL_LATER,
263         RESUME_STATUS_INSTALL_IDLE
264 } RESUME_STATUS;
265
266 #endif                          /* OMA_DM_COMMON_DEF_H_ */