Initialize Tizen 2.3
[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 "xxxxxxxxxx"
61 #define OMA_DM_FUMO_APPSECRETID "xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
62
63 #define OMA_DM_LAWMO_APPID "xxxxxxxxxxxxxxxx"
64 #define OMA_DM_LAWMO_APPSECRETID "xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
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 FOTA_POLLING_ALARM "fumo_polling_alarm"
111 #define LAWMO_TRACKING_START_ALARM "lawmo_tracking_start_alarm"
112
113 #define IPC_DS                                                                                                          "/tmp/agent_fw_event_omads"
114 #define FOTA_DELTA_INTERNAL_STORAGE                             "/opt/usr/data/fota"
115 #define FOTA_DELTA_SD_INTERNAL_STORAGE                  "/opt/media"
116 #define FOTA_DELTA_SD_EXTERNAL_STORAGE          "/opt/storage/sdcard"
117
118
119 #define VCONF_FOTA_DOWNLOADCONTYPE                                      "db/SyncML/oma-dm-service/DownloadConType"
120 #define VCONF_FOTA_POLLING_TRIGER_TEST                          "db/SyncML/oma-dm-service/polling-triger"
121
122
123 typedef enum {
124         //INTERVAL_NONE =0,
125         INTERVAL_30MINUTES = 0,
126         INTERVAL_1HOUR = 1,
127         INTERVAL_3HOURS = 2,
128         INTERVAL_6HOURS = 3,
129         INTERVAL_12HOURS = 4,
130         INTERVAL_1DAY = 5,
131         //INTERVAL_7DAYS = 5,
132         INTERVAL_CANCEL = 6,
133         INTERVAL_1MONTH = 7
134 } Reminder_Interval;
135
136 typedef enum {
137         FUMO_INTERVAL_TYPE = 0, //alarm
138         FUMO_WIFI_ONLY_TYPE = 1,
139         FUMO_ACCOUNT_FLAG_TYPE = 2,
140         FUMO_ACCOUNT_ALARM_TYPE = 3,    //alarm
141         LAWMO_ACCOUNT_FLAG_TYPE = 4,
142         LAWMO_ACCOUNT_ALARM_TYPE = 5,   //alarm
143         FOTA_POLLING_ALARM_TYPE = 6,
144         LAWMO_TRACKING_START_ALARM_TYPE = 7
145 } CONFIG_TYPE;
146
147 /*
148  * ==============================================
149  *                      OMA DM ENGINE STATUS
150  * ==============================================
151 */
152
153 typedef enum {
154         DM_IDLE = 0,
155         DM_BEFORE_BOOTSTRAP = 1,
156         DM_COMMON_PROCESSING = 2,
157         DM_GENERIC_ALERT = 3,
158         DM_SERVICE_ENGINE_PROCESSING = 4,
159
160         /*todo */
161         /*DM_FUMO_ENGINE_PROCESSING = 4,
162            DM_LAWMO_ENGINE_PROCESSING = 5,
163            DM_COMPLETE_FIRMWARE_UPDATE_WITH_GENERICALERT, */
164
165         /*after 50 */
166         DM_UI_DISPLAY,
167         DM_UI_CONFIRMATION,
168         DM_UI_USER_INPUT,
169         DM_UI_USER_CHOISE,
170         DM_UI_PROGRESS_BAR,
171
172 } ENGINE_STATUS;
173
174 /*
175  * ==============================================
176  *                      SERVICE ENGINE STATUS
177  * ==============================================
178 */
179
180 typedef enum {
181         DM_SERVICE_UNKNOWN = 0,
182         DM_SERVICE_ING = 1,
183         DM_GENERICALERT_ING = 2
184 /*      DM_SERVICE_ALARM = 3,
185         DM_SERVICE_OTHER = 4*/
186 } SERVICE_ENGINE_STATUS;
187
188 /*
189  * ==============================================
190  *                      ENGINE ID
191  * ==============================================
192 */
193
194 typedef enum {
195         IDLE_ENGINE = 0,
196         BOOTSTRAP = 1,
197         COMMON_ENGINE = 2,
198         GENERICALERT = 3,
199         //SERVICE_ENGINE = 4,
200
201         //sync_agent_dm_mo_type_e MAPPING
202         FUMO_SERVICE_ENGINE = 4,
203         LAWMO_SERVICE_ENGINE = 8,
204         //SCOMO_SERVICE_ENGINE = 16,
205         NO_SERVICE_ENGINE = 32
206 } ENGINE_ID;
207
208 /*
209  * ==============================================
210  *                      ENGINE TYPE
211  * ==============================================
212 */
213
214 typedef enum {
215         SAMSUNG_FUMO_TYPE = 4,
216         SAMSUNG_FMM_TYPE = 8,
217         GCF_TYPE = 16,
218         NO_ENGINE_TYPE = 32
219 } SERVICE_SERVER_TYPE;
220
221 /*
222  * ==============================================
223  *                      DM OPERATION MODE
224  * ==============================================
225 */
226
227 typedef enum {
228         OPER_UNKNOWN,
229         OPER_SERVER_INITIATION_FROM_WAP,
230         OPER_SERVER_INITIATION_FROM_IP,
231         OPER_USER_INITIATION,
232         OPER_SCHEDULER
233 } OPER_MODE;
234
235 /*
236  * ==============================================
237  *                      MEMORY TYPE
238  * ==============================================
239 */
240 typedef enum {
241         MEMORY_INTERNAL,
242         MEMORY_SD_CARD
243 } MEMORY_TYPE;
244
245 /*
246  * ==============================================
247  *                      USER INTERACTION OPTION
248  * ==============================================
249 */
250
251 #define UI_OP_MINDT "MINDT="
252 #define UI_OP_MAXDT "MAXDT="
253 #define UI_OP_DR "DR="
254 #define UI_OP_MAXLEN "MAXLEN="
255 #define UI_OP_IT "IT="
256 #define UI_OP_ET "ET="
257 #define UI_OP_SEPARATOR "&"
258 #define UI_OP_EQUAL "="
259
260 /*
261  * ==============================================
262  *                      RESUME STATES DOWNLOAD, INSTALL, LATER
263  * ==============================================
264 */
265
266 typedef enum {
267         RESUME_STATUS_DONWLOAD_BEFORE = 0,
268         RESUME_STATUS_DOWNLOAD,
269         RESUME_STATUS_DOWNLOAD_LATER,
270         RESUME_STATUS_DOWNLOAD_IDLE,
271         RESUME_STATUS_INSTALL_BEFORE,
272         RESUME_STATUS_INSTALL,
273         RESUME_STATUS_INSTALL_LATER,
274         RESUME_STATUS_INSTALL_IDLE
275 } RESUME_STATUS;
276
277 #endif                          /* OMA_DM_COMMON_DEF_H_ */