blob: f4a157b27314bbdc929f0194f82e7ad4957268a1 (
plain)
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
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
|
/*
* Copyright 2012 Samsung Electronics Co., Ltd
*
* Licensed under the Flora License, Version 1.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.tizenopensource.org/license
*
* 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.
*/
#include "MsgDebug.h"
#include <sys/syscall.h>
/*==================================================================================================
FUNCTION IMPLEMENTATION
==================================================================================================*/
const char * MsgDbgCmdStr(MSG_CMD_TYPE_T cmdType)
{
switch ( cmdType )
{
// 0
case MSG_CMD_OPEN_HANDLE:
return "MSG_CMD_OPEN_HANDLE";
case MSG_CMD_CLOSE_HANDLE:
return "MSG_CMD_CLOSE_HANDLE";
case MSG_CMD_GET_STORAGELIST:
return "MSG_CMD_GET_STORAGELIST";
case MSG_CMD_ADD_MSG:
return "MSG_CMD_ADD_MSG";
case MSG_CMD_ADD_SYNCML_MSG:
return "MSG_CMD_ADD_SYNCML_MSG";
// 5
case MSG_CMD_UPDATE_MSG:
return "MSG_CMD_UPDATE_MSG";
case MSG_CMD_UPDATE_READ:
return "MSG_CMD_UPDATE_READ";
case MSG_CMD_UPDATE_PROTECTED:
return "MSG_CMD_UPDATE_PROTECTED";
case MSG_CMD_DELETE_MSG:
return "MSG_CMD_DELETE_MSG";
case MSG_CMD_DELALL_MSGINFOLDER:
return "MSG_CMD_DELALL_MSGINFOLDER";
// 10
case MSG_CMD_MOVE_MSGTOFOLDER:
return "MSG_CMD_MOVE_MSGTOFOLDER";
case MSG_CMD_MOVE_MSGTOSTORAGE:
return "MSG_CMD_MOVE_MSGTOSTORAGE";
case MSG_CMD_COUNT_MSG:
return "MSG_CMD_COUNT_MSG";
case MSG_CMD_GET_MSG:
return "MSG_CMD_GET_MSG";
case MSG_CMD_GET_FOLDERVIEWLIST:
return "MSG_CMD_GET_FOLDERVIEWLIST";
// 15
case MSG_CMD_ADD_FOLDER:
return "MSG_CMD_ADD_FOLDER";
case MSG_CMD_UPDATE_FOLDER:
return "MSG_CMD_UPDATE_FOLDER";
case MSG_CMD_DELETE_FOLDER:
return "MSG_CMD_DELETE_FOLDER";
case MSG_CMD_GET_FOLDERLIST:
return "MSG_CMD_GET_FOLDERLIST";
case MSG_CMD_ADD_FILTER:
return "MSG_CMD_ADD_FILTER";
// 20
case MSG_CMD_UPDATE_FILTER:
return "MSG_CMD_UPDATE_FILTER";
case MSG_CMD_DELETE_FILTER:
return "MSG_CMD_DELETE_FILTER";
case MSG_CMD_GET_FILTERLIST:
return "MSG_CMD_GET_FILTERLIST";
case MSG_CMD_SET_FILTER_OPERATION:
return "MSG_CMD_SET_FILTER_OPERATION";
case MSG_CMD_GET_FILTER_OPERATION:
return "MSG_CMD_GET_FILTER_OPERATION";
// 25
case MSG_CMD_GET_MSG_TYPE:
return "MSG_CMD_GET_MSG_TYPE";
case MSG_CMD_SUBMIT_REQ:
return "MSG_CMD_SUBMIT_REQ";
case MSG_CMD_CANCEL_REQ:
return "MSG_CMD_CANCEL_REQ";
case MSG_CMD_REG_SENT_STATUS_CB:
return "MSG_CMD_REG_SENT_STATUS_CB";
case MSG_CMD_REG_STORAGE_CHANGE_CB:
return "MSG_CMD_REG_STORAGE_CHANGE_CB";
// 30
case MSG_CMD_REG_INCOMING_MSG_CB:
return "MSG_CMD_REG_INCOMING_MSG_CB";
case MSG_CMD_REG_INCOMING_MMS_CONF_MSG_CB:
return "MSG_CMD_REG_INCOMING_MMS_CONF_MSG_CB";
case MSG_CMD_REG_INCOMING_SYNCML_MSG_CB:
return "MSG_CMD_REG_INCOMING_SYNCML_MSG_CB";
case MSG_CMD_REG_INCOMING_LBS_MSG_CB:
return "MSG_CMD_REG_INCOMING_LBS_MSG_CB";
case MSG_CMD_PLG_SENT_STATUS_CNF:
return "MSG_CMD_PLG_SENT_STATUS_CNF";
// 35
case MSG_CMD_PLG_STORAGE_CHANGE_IND:
return "MSG_CMD_PLG_STORAGE_CHANGE_IND";
case MSG_CMD_PLG_INCOMING_MSG_IND:
return "MSG_CMD_PLG_INCOMING_MSG_IND";
case MSG_CMD_PLG_INCOMING_MMS_CONF:
return "MSG_CMD_PLG_INCOMING_MMS_CONF";
case MSG_CMD_PLG_INCOMING_SYNCML_IND:
return "MSG_CMD_PLG_INCOMING_SYNCML_IND";
case MSG_CMD_PLG_INCOMING_LBS_IND:
return "MSG_CMD_PLG_INCOMING_LBS_IND";
// 40
case MSG_CMD_PLG_INIT_SIM_BY_SAT:
return "MSG_CMD_PLG_INIT_SIM_BY_SAT";
case MSG_CMD_GET_THREADVIEWLIST:
return "MSG_CMD_GET_THREADVIEWLIST";
case MSG_CMD_GET_CONVERSATIONVIEWLIST:
return "MSG_CMD_GET_CONVERSATIONVIEWLIST";
case MSG_CMD_DELETE_THREADMESSAGELIST:
return "MSG_CMD_DELETE_THREADMESSAGELIST";
case MSG_CMD_GET_CONTACT_COUNT:
return "MSG_CMD_GET_CONTACT_COUNT";
// 45
case MSG_CMD_GET_QUICKPANEL_DATA:
return "MSG_CMD_GET_QUICKPANEL_DATA";
case MSG_CMD_COUNT_BY_MSGTYPE:
return "MSG_CMD_COUNT_BY_MSGTYPE";
case MSG_CMD_RESET_DB:
return "MSG_CMD_RESET_DB";
case MSG_CMD_GET_MEMSIZE:
return "MSG_CMD_GET_MEMSIZE";
case MSG_CMD_BACKUP_MESSAGE:
return "MSG_CMD_BACKUP_MESSAGE";
// 50
case MSG_CMD_RESTORE_MESSAGE:
return "MSG_CMD_RESTORE_MESSAGE";
case MSG_CMD_UPDATE_THREAD_READ:
return "MSG_CMD_UPDATE_THREAD_READ";
case MSG_CMD_REG_SYNCML_MSG_OPERATION_CB:
return "MSG_CMD_REG_SYNCML_MSG_OPERATION_CB";
case MSG_CMD_SYNCML_OPERATION:
return "MSG_CMD_SYNCML_OPERATION";
case MSG_CMD_GET_REPORT_STATUS:
return "MSG_CMD_GET_REPORT_STATUS";
// 55
case MSG_CMD_GET_THREAD_ID_BY_ADDRESS:
return "MSG_CMD_GET_THREAD_ID_BY_ADDRESS";
case MSG_CMD_GET_THREAD_INFO:
return "MSG_CMD_GET_THREAD_INFO";
case MSG_CMD_GET_SMSC_OPT:
return "MSG_CMD_GET_SMSC_OPT";
case MSG_CMD_GET_CB_OPT:
return "MSG_CMD_GET_CB_OPT";
case MSG_CMD_GET_SMS_SEND_OPT:
return "MSG_CMD_GET_SMS_SEND_OPT";
// 60
case MSG_CMD_GET_MMS_SEND_OPT:
return "MSG_CMD_GET_MMS_SEND_OPT";
case MSG_CMD_GET_MMS_RECV_OPT:
return "MSG_CMD_GET_MMS_RECV_OPT";
case MSG_CMD_GET_PUSH_MSG_OPT:
return "MSG_CMD_GET_PUSH_MSG_OPT";
case MSG_CMD_GET_VOICE_MSG_OPT:
return "MSG_CMD_GET_VOICE_MSG_OPT";
case MSG_CMD_GET_GENERAL_MSG_OPT:
return "MSG_CMD_GET_GENERAL_MSG_OPT";
// 65
case MSG_CMD_SET_SMSC_OPT:
return "MSG_CMD_SET_SMSC_OPT";
case MSG_CMD_SET_CB_OPT:
return "MSG_CMD_SET_CB_OPT";
case MSG_CMD_SET_SMS_SEND_OPT:
return "MSG_CMD_SET_SMS_SEND_OPT";
case MSG_CMD_SET_MMS_SEND_OPT:
return "MSG_CMD_SET_MMS_SEND_OPT";
case MSG_CMD_SET_MMS_RECV_OPT:
return "MSG_CMD_SET_MMS_RECV_OPT";
// 70
case MSG_CMD_SET_PUSH_MSG_OPT:
return "MSG_CMD_SET_PUSH_MSG_OPT";
case MSG_CMD_SET_VOICE_MSG_OPT:
return "MSG_CMD_SET_VOICE_MSG_OPT";
case MSG_CMD_SET_GENERAL_MSG_OPT:
return "MSG_CMD_SET_GENERAL_MSG_OPT";
default:
return "Unknown Command Type!!!";
}
return NULL;
}
const char * MsgDbgEvtStr(MSG_EVENT_TYPE_T evtType)
{
switch ( evtType )
{
// 0
case MSG_EVENT_OPEN_HANDLE:
return "MSG_EVENT_OPEN_HANDLE";
case MSG_EVENT_CLOSE_HANDLE:
return "MSG_EVENT_CLOSE_HANDLE";
case MSG_EVENT_GET_STORAGELIST:
return "MSG_EVENT_GET_STORAGELIST";
case MSG_EVENT_ADD_MSG:
return "MSG_EVENT_ADD_MSG";
case MSG_EVENT_ADD_SYNCML_MSG:
return "MSG_EVENT_ADD_SYNCML_MSG";
// 5
case MSG_EVENT_UPDATE_MSG:
return "MSG_EVENT_UPDATE_MSG";
case MSG_EVENT_UPDATE_READ:
return "MSG_EVENT_UPDATE_READ";
case MSG_EVENT_UPDATE_PROTECTED:
return "MSG_EVENT_UPDATE_PROTECTED";
case MSG_EVENT_DELETE_MSG:
return "MSG_EVENT_DELETE_MSG";
case MSG_EVENT_DELALL_MSGINFOLDER:
return "MSG_EVENT_DELALL_MSGINFOLDER";
// 10
case MSG_EVENT_MOVE_MSGTOFOLDER:
return "MSG_EVENT_MOVE_MSGTOFOLDER";
case MSG_EVENT_MOVE_MSGTOSTORAGE:
return "MSG_EVENT_MOVE_MSGTOSTORAGE";
case MSG_EVENT_COUNT_MSG:
return "MSG_EVENT_COUNT_MSG";
case MSG_EVENT_GET_MSG:
return "MSG_EVENT_GET_MSG";
case MSG_EVENT_GET_FOLDERVIEWLIST:
return "MSG_EVENT_GET_FOLDERVIEWLIST";
// 15
case MSG_EVENT_ADD_FOLDER:
return "MSG_EVENT_ADD_FOLDER";
case MSG_EVENT_UPDATE_FOLDER:
return "MSG_EVENT_UPDATE_FOLDER";
case MSG_EVENT_DELETE_FOLDER:
return "MSG_EVENT_DELETE_FOLDER";
case MSG_EVENT_GET_FOLDERLIST:
return "MSG_EVENT_GET_FOLDERLIST";
case MSG_EVENT_ADD_FILTER:
return "MSG_EVENT_ADD_FILTER";
//20
case MSG_EVENT_UPDATE_FILTER:
return "MSG_EVENT_UPDATE_FILTER";
case MSG_EVENT_DELETE_FILTER:
return "MSG_EVENT_DELETE_FILTER";
case MSG_EVENT_GET_FILTERLIST:
return "MSG_EVENT_GET_FILTERLIST";
case MSG_EVENT_SET_FILTER_OPERATION:
return "MSG_EVENT_SET_FILTER_OPERATION";
case MSG_EVENT_GET_FILTER_OPERATION:
return "MSG_EVENT_GET_FILTER_OPERATION";
//25
case MSG_EVENT_GET_MSG_TYPE:
return "MSG_EVENT_GET_MSG_TYPE";
case MSG_EVENT_SUBMIT_REQ:
return "MSG_EVENT_SUBMIT_REQ";
case MSG_EVENT_CANCEL_REQ:
return "MSG_EVENT_CANCEL_REQ";
case MSG_EVENT_REG_SENT_STATUS_CB:
return "MSG_EVENT_REG_SENT_STATUS_CB";
case MSG_EVENT_REG_STORAGE_CHANGE_CB:
return "MSG_EVENT_REG_STORAGE_CHANGE_CB";
// 30
case MSG_EVENT_REG_INCOMING_MSG_CB:
return "MSG_EVENT_REG_INCOMING_MSG_CB";
case MSG_EVENT_REG_INCOMING_MMS_CONF_MSG_CB:
return "MSG_EVENT_REG_INCOMING_MMS_CONF_MSG_CB";
case MSG_EVENT_REG_INCOMING_SYNCML_MSG_CB:
return "MSG_EVENT_REG_INCOMING_SYNCML_MSG_CB";
case MSG_EVENT_REG_INCOMING_LBS_MSG_CB:
return "MSG_EVENT_REG_INCOMING_LBS_MSG_CB";
case MSG_EVENT_PLG_SENT_STATUS_CNF:
return "MSG_EVENT_PLG_SENT_STATUS_CNF";
// 35
case MSG_EVENT_PLG_STORAGE_CHANGE_IND:
return "MSG_EVENT_STORAGE_CHANGE_CB";
case MSG_EVENT_PLG_INCOMING_MSG_IND:
return "MSG_EVENT_PLG_INCOMING_MSG_IND";
case MSG_EVENT_PLG_INCOMING_MMS_CONF:
return "MSG_EVENT_PLG_INCOMING_MMS_CONF";
case MSG_EVENT_PLG_INCOMING_SYNCML_MSG_IND:
return "MSG_EVENT_PLG_INCOMING_SYNCML_MSG_IND";
case MSG_EVENT_PLG_INCOMING_LBS_MSG_IND:
return "MSG_EVENT_PLG_INCOMING_LBS_MSG_IND";
// 40
case MSG_EVENT_PLG_INIT_SIM_BY_SAT:
return "MSG_EVENT_PLG_INIT_SIM_BY_SAT";
case MSG_EVENT_GET_THREADVIEWLIST:
return "MSG_EVENT_GET_THREADVIEWLIST";
case MSG_EVENT_GET_CONVERSATIONVIEWLIST:
return "MSG_EVENT_GET_CONVERSATIONVIEWLIST";
case MSG_EVENT_DELETE_THREADMESSAGELIST:
return "MSG_EVENT_DELETE_THREADMESSAGELIST";
case MSG_EVENT_GET_CONTACT_COUNT:
return "MSG_EVENT_GET_CONTACT_COUNT";
// 45
case MSG_EVENT_GET_QUICKPANEL_DATA:
return "MSG_EVENT_GET_QUICKPANEL_DATA";
case MSG_EVENT_COUNT_BY_MSGTYPE:
return "MSG_EVENT_COUNT_BY_MSGTYPE";
case MSG_EVENT_RESET_DB:
return "MSG_EVENT_RESET_DB";
case MSG_EVENT_GET_MEMSIZE:
return "MSG_EVENT_GET_MEMSIZE";
case MSG_EVENT_BACKUP_MESSAGE:
return "MSG_EVENT_BACKUP_MESSAGE";
// 50
case MSG_EVENT_RESTORE_MESSAGE:
return "MSG_EVENT_RESTORE_MESSAGE";
case MSG_EVENT_UPDATE_THREAD_READ:
return "MSG_EVENT_UPDATE_THREAD_READ";
case MSG_EVENT_REG_SYNCML_MSG_OPERATION_CB:
return "MSG_EVENT_REG_SYNCML_MSG_OPERATION_CB";
case MSG_EVENT_SYNCML_OPERATION:
return "MSG_EVENT_SYNCML_OPERATION";
case MSG_EVENT_GET_REPORT_STATUS:
return "MSG_EVENT_GET_REPORT_STATUS";
// 55
case MSG_CMD_GET_THREAD_ID_BY_ADDRESS:
return "MSG_CMD_GET_THREAD_ID_BY_ADDRESS";
case MSG_CMD_GET_THREAD_INFO:
return "MSG_CMD_GET_THREAD_INFO";
case MSG_EVENT_GET_SMSC_OPT:
return "MSG_EVENT_GET_SMSC_OPT";
case MSG_EVENT_GET_CB_OPT:
return "MSG_EVENT_GET_CB_OPT";
case MSG_EVENT_GET_SMS_SEND_OPT:
return "MSG_EVENT_GET_SMS_SEND_OPT";
// 60
case MSG_EVENT_GET_MMS_SEND_OPT:
return "MSG_EVENT_GET_MMS_SEND_OPT";
case MSG_EVENT_GET_MMS_RECV_OPT:
return "MSG_EVENT_GET_MMS_RECV_OPT";
case MSG_EVENT_GET_PUSH_MSG_OPT:
return "MSG_EVENT_GET_PUSH_MSG_OPT";
case MSG_EVENT_GET_VOICE_MSG_OPT:
return "MSG_EVENT_GET_VOICE_MSG_OPT";
case MSG_EVENT_GET_GENERAL_MSG_OPT:
return "MSG_EVENT_GET_GENERAL_MSG_OPT";
// 65
case MSG_EVENT_SET_SMSC_OPT:
return "MSG_EVENT_SET_SMSC_OPT";
case MSG_EVENT_SET_CB_OPT:
return "MSG_EVENT_SET_CB_OPT";
case MSG_EVENT_SET_SMS_SEND_OPT:
return "MSG_EVENT_SET_SMS_SEND_OPT";
case MSG_EVENT_SET_MMS_SEND_OPT:
return "MSG_EVENT_SET_MMS_SEND_OPT";
case MSG_EVENT_SET_MMS_RECV_OPT:
return "MSG_EVENT_SET_MMS_RECV_OPT";
// 70
case MSG_EVENT_SET_PUSH_MSG_OPT:
return "MSG_EVENT_SET_PUSH_MSG_OPT";
case MSG_EVENT_SET_VOICE_MSG_OPT:
return "MSG_EVENT_SET_VOICE_MSG_OPT";
case MSG_EVENT_SET_GENERAL_MSG_OPT:
return "MSG_EVENT_SET_GENERAL_MSG_OPT";
default:
return "Unknown Event Type!!!";
}
return NULL;
}
int get_tid()
{
return syscall(__NR_gettid);
}
|