1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
|
/*
* oma-dm-agent
* Copyright (c) 2012 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the License);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @DM_Common_Def.h
* @version 0.1
* @brief This file is the header file of defined common define and common enum type for using oma-dm-serice
*/
#ifndef OMA_DM_COMMON_DEF_H_
#define OMA_DM_COMMON_DEF_H_
/*#define _OMA_DM_V11_*/
#define _OMA_DM_V12_
#define _OMA_DM_DEBUG_
#ifdef _OMA_DM_DEBUG_
#define _OMA_DM_TEST_DEBUG
#endif
/*log tag define*/
/*
#define OMA_DM_LOG
#ifdef OMA_DM_LOG
#define LOG_TAG "OMA_DM"
#endif
*/
//#define _DM_SCORE_TEST
#ifdef _DM_SCORE_TEST
#define _DM_BUNDANG_TEST
#endif
#define _SLP_SAMSUNG_DM_MO
/*
* ==============================================
* OMA DM APP ID
* ==============================================
*/
/*for bada*/
/*#define OMA_DM_FUMO_APPID "3b74c3e0075a630e"*/
/*for slp fota*/
/*
#define OMA_DM_FUMO_APPID "xxxxxxxxxx"
#define OMA_DM_FUMO_APPSECRETID "xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
#define OMA_DM_LAWMO_APPID "xxxxxxxxxxxxxxxx"
#define OMA_DM_LAWMO_APPSECRETID "xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
*/
/*
* ==============================================
* OMA DM PKG DEFINE
* ==============================================
*/
#define OMA_DM_AGENT_PKG "oma-dm-agent"
#define OMA_DM_FUMO_UI_PKG "com.samsung.oma-dm"
#define OMA_DM_FUMO_NOTI_UI_PKG "com.samsung.oma-dm-noti"
#define OMA_DM_ADMIN_UI_PKG "com.samsung.oma-dm-admin"
#define OMA_DM_ALERT_UI_PKG "com.samsung.oma-dm-alert"
#define OMA_DM_CP_UI_PKG "com.samsung.oma-dm-cp"
/*
* ==============================================
* OMA DM MSG
* ==============================================
*/
#define OMA_DM_MSG_PATH "/tmp/dm.txt"
/*
* ==============================================
* FUMO ENGINE DEFINE
* ==============================================
*/
#define FUMO "fumo"
#define OMADM_FUMO_UI_TYPE "omadm_fota_ui"
#define OMADM_FUMO_NOTI_UI_TYPE "omadm_noti_ui"
#define OMADM_FUMO_BACKGROUND_UI_TYPE "omadm_background_ui"
#define OMADM_ADMIN_UI_TYPE "omadm_admin_ui"
#define OMADM_ALERT_UI_TYPE "omadm_alert_ui"
#define OMADM_CP_UI_TYPE "omadm_cp_ui"
#define FUMO_ACCOUNT_FLAG "fumo_account_flag"
#define FUMO_ACCOUNT_ALARM "fumo_account_alarm"
#define FUMO_ENGINE "fumo_engine"
#define FUMO_INTERVAL "fumo_interval"
#define FUMO_WIFI_ONLY_CONFIG "fumo_wifi_only_config"
#define LAWMO_ENGINE "lawmo_engine"
#define LAWMO_ACCOUNT_FLAG "lawmo_account_flag"
#define LAWMO_ACCOUNT_ALARM "lawmo_account_alarm"
#define FOTA_POLLING_ALARM "fumo_polling_alarm"
#define LAWMO_TRACKING_START_ALARM "lawmo_tracking_start_alarm"
#define IPC_DS "/tmp/agent_fw_event_omads"
#define FOTA_DELTA_INTERNAL_STORAGE "/opt/usr/data/fota"
#define FOTA_DELTA_SD_INTERNAL_STORAGE "/opt/media"
#define FOTA_DELTA_SD_EXTERNAL_STORAGE "/opt/storage/sdcard"
#define VCONF_FOTA_DOWNLOADCONTYPE "db/SyncML/oma-dm-service/DownloadConType"
#define VCONF_FOTA_POLLING_TRIGER_TEST "db/SyncML/oma-dm-service/polling-triger"
typedef enum {
//INTERVAL_NONE =0,
INTERVAL_30MINUTES = 0,
INTERVAL_1HOUR = 1,
INTERVAL_3HOURS = 2,
INTERVAL_6HOURS = 3,
INTERVAL_12HOURS = 4,
INTERVAL_1DAY = 5,
//INTERVAL_7DAYS = 5,
INTERVAL_CANCEL = 6,
INTERVAL_1MONTH = 7
} Reminder_Interval;
typedef enum {
FUMO_INTERVAL_TYPE = 0, //alarm
FUMO_WIFI_ONLY_TYPE = 1,
FUMO_ACCOUNT_FLAG_TYPE = 2,
FUMO_ACCOUNT_ALARM_TYPE = 3, //alarm
LAWMO_ACCOUNT_FLAG_TYPE = 4,
LAWMO_ACCOUNT_ALARM_TYPE = 5, //alarm
FOTA_POLLING_ALARM_TYPE = 6,
LAWMO_TRACKING_START_ALARM_TYPE = 7
} CONFIG_TYPE;
/*
* ==============================================
* OMA DM ENGINE STATUS
* ==============================================
*/
typedef enum {
DM_IDLE = 0,
DM_BEFORE_BOOTSTRAP = 1,
DM_COMMON_PROCESSING = 2,
DM_GENERIC_ALERT = 3,
DM_SERVICE_ENGINE_PROCESSING = 4,
/*todo */
/*DM_FUMO_ENGINE_PROCESSING = 4,
DM_LAWMO_ENGINE_PROCESSING = 5,
DM_COMPLETE_FIRMWARE_UPDATE_WITH_GENERICALERT, */
/*after 50 */
DM_UI_DISPLAY,
DM_UI_CONFIRMATION,
DM_UI_USER_INPUT,
DM_UI_USER_CHOISE,
DM_UI_PROGRESS_BAR,
} ENGINE_STATUS;
/*
* ==============================================
* SERVICE ENGINE STATUS
* ==============================================
*/
typedef enum {
DM_SERVICE_UNKNOWN = 0,
DM_SERVICE_ING = 1,
DM_GENERICALERT_ING = 2
/* DM_SERVICE_ALARM = 3,
DM_SERVICE_OTHER = 4*/
} SERVICE_ENGINE_STATUS;
/*
* ==============================================
* ENGINE ID
* ==============================================
*/
typedef enum {
IDLE_ENGINE = 0,
BOOTSTRAP = 1,
COMMON_ENGINE = 2,
GENERICALERT = 3,
//SERVICE_ENGINE = 4,
//sync_agent_dm_mo_type_e MAPPING
FUMO_SERVICE_ENGINE = 4,
LAWMO_SERVICE_ENGINE = 8,
//SCOMO_SERVICE_ENGINE = 16,
NO_SERVICE_ENGINE = 32
} ENGINE_ID;
/*
* ==============================================
* ENGINE TYPE
* ==============================================
*/
typedef enum {
SAMSUNG_FUMO_TYPE = 4,
SAMSUNG_FMM_TYPE = 8,
GCF_TYPE = 16,
NO_ENGINE_TYPE = 32
} SERVICE_SERVER_TYPE;
/*
* ==============================================
* DM OPERATION MODE
* ==============================================
*/
typedef enum {
OPER_UNKNOWN,
OPER_SERVER_INITIATION_FROM_WAP,
OPER_SERVER_INITIATION_FROM_IP,
OPER_USER_INITIATION,
OPER_SCHEDULER
} OPER_MODE;
/*
* ==============================================
* MEMORY TYPE
* ==============================================
*/
typedef enum {
MEMORY_INTERNAL,
MEMORY_SD_CARD
} MEMORY_TYPE;
/*
* ==============================================
* USER INTERACTION OPTION
* ==============================================
*/
#define UI_OP_MINDT "MINDT="
#define UI_OP_MAXDT "MAXDT="
#define UI_OP_DR "DR="
#define UI_OP_MAXLEN "MAXLEN="
#define UI_OP_IT "IT="
#define UI_OP_ET "ET="
#define UI_OP_SEPARATOR "&"
#define UI_OP_EQUAL "="
/*
* ==============================================
* RESUME STATES DOWNLOAD, INSTALL, LATER
* ==============================================
*/
typedef enum {
RESUME_STATUS_DONWLOAD_BEFORE = 0,
RESUME_STATUS_DOWNLOAD,
RESUME_STATUS_DOWNLOAD_LATER,
RESUME_STATUS_DOWNLOAD_IDLE,
RESUME_STATUS_INSTALL_BEFORE,
RESUME_STATUS_INSTALL,
RESUME_STATUS_INSTALL_LATER,
RESUME_STATUS_INSTALL_IDLE
} RESUME_STATUS;
#endif /* OMA_DM_COMMON_DEF_H_ */
|