2 * Copyright 2012-2013 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.1 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://floralicense.org/license/
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #include <sys/syscall.h>
21 /*==================================================================================================
22 FUNCTION IMPLEMENTATION
23 ==================================================================================================*/
24 const char * MsgDbgCmdStr(MSG_CMD_TYPE_T cmdType)
29 case MSG_CMD_OPEN_HANDLE:
30 return "MSG_CMD_OPEN_HANDLE";
31 case MSG_CMD_CLOSE_HANDLE:
32 return "MSG_CMD_CLOSE_HANDLE";
33 case MSG_CMD_GET_STORAGELIST:
34 return "MSG_CMD_GET_STORAGELIST";
36 return "MSG_CMD_ADD_MSG";
37 case MSG_CMD_ADD_SYNCML_MSG:
38 return "MSG_CMD_ADD_SYNCML_MSG";
41 case MSG_CMD_UPDATE_MSG:
42 return "MSG_CMD_UPDATE_MSG";
43 case MSG_CMD_UPDATE_READ:
44 return "MSG_CMD_UPDATE_READ";
45 case MSG_CMD_UPDATE_PROTECTED:
46 return "MSG_CMD_UPDATE_PROTECTED";
47 case MSG_CMD_DELETE_MSG:
48 return "MSG_CMD_DELETE_MSG";
49 case MSG_CMD_DELALL_MSGINFOLDER:
50 return "MSG_CMD_DELALL_MSGINFOLDER";
53 case MSG_CMD_MOVE_MSGTOFOLDER:
54 return "MSG_CMD_MOVE_MSGTOFOLDER";
55 case MSG_CMD_MOVE_MSGTOSTORAGE:
56 return "MSG_CMD_MOVE_MSGTOSTORAGE";
57 case MSG_CMD_COUNT_MSG:
58 return "MSG_CMD_COUNT_MSG";
60 return "MSG_CMD_GET_MSG";
61 case MSG_CMD_GET_FOLDERVIEWLIST:
62 return "MSG_CMD_GET_FOLDERVIEWLIST";
65 case MSG_CMD_ADD_FOLDER:
66 return "MSG_CMD_ADD_FOLDER";
67 case MSG_CMD_UPDATE_FOLDER:
68 return "MSG_CMD_UPDATE_FOLDER";
69 case MSG_CMD_DELETE_FOLDER:
70 return "MSG_CMD_DELETE_FOLDER";
71 case MSG_CMD_GET_FOLDERLIST:
72 return "MSG_CMD_GET_FOLDERLIST";
73 case MSG_CMD_ADD_FILTER:
74 return "MSG_CMD_ADD_FILTER";
77 case MSG_CMD_UPDATE_FILTER:
78 return "MSG_CMD_UPDATE_FILTER";
79 case MSG_CMD_DELETE_FILTER:
80 return "MSG_CMD_DELETE_FILTER";
81 case MSG_CMD_GET_FILTERLIST:
82 return "MSG_CMD_GET_FILTERLIST";
83 case MSG_CMD_SET_FILTER_OPERATION:
84 return "MSG_CMD_SET_FILTER_OPERATION";
85 case MSG_CMD_GET_FILTER_OPERATION:
86 return "MSG_CMD_GET_FILTER_OPERATION";
89 case MSG_CMD_GET_MSG_TYPE:
90 return "MSG_CMD_GET_MSG_TYPE";
91 case MSG_CMD_SUBMIT_REQ:
92 return "MSG_CMD_SUBMIT_REQ";
93 case MSG_CMD_CANCEL_REQ:
94 return "MSG_CMD_CANCEL_REQ";
95 case MSG_CMD_REG_SENT_STATUS_CB:
96 return "MSG_CMD_REG_SENT_STATUS_CB";
97 case MSG_CMD_REG_STORAGE_CHANGE_CB:
98 return "MSG_CMD_REG_STORAGE_CHANGE_CB";
101 case MSG_CMD_REG_INCOMING_MSG_CB:
102 return "MSG_CMD_REG_INCOMING_MSG_CB";
103 case MSG_CMD_REG_INCOMING_MMS_CONF_MSG_CB:
104 return "MSG_CMD_REG_INCOMING_MMS_CONF_MSG_CB";
105 case MSG_CMD_REG_INCOMING_SYNCML_MSG_CB:
106 return "MSG_CMD_REG_INCOMING_SYNCML_MSG_CB";
107 case MSG_CMD_REG_INCOMING_LBS_MSG_CB:
108 return "MSG_CMD_REG_INCOMING_LBS_MSG_CB";
109 case MSG_CMD_PLG_SENT_STATUS_CNF:
110 return "MSG_CMD_PLG_SENT_STATUS_CNF";
113 case MSG_CMD_PLG_STORAGE_CHANGE_IND:
114 return "MSG_CMD_PLG_STORAGE_CHANGE_IND";
115 case MSG_CMD_PLG_INCOMING_MSG_IND:
116 return "MSG_CMD_PLG_INCOMING_MSG_IND";
117 case MSG_CMD_PLG_INCOMING_MMS_CONF:
118 return "MSG_CMD_PLG_INCOMING_MMS_CONF";
119 case MSG_CMD_PLG_INCOMING_SYNCML_IND:
120 return "MSG_CMD_PLG_INCOMING_SYNCML_IND";
121 case MSG_CMD_PLG_INCOMING_LBS_IND:
122 return "MSG_CMD_PLG_INCOMING_LBS_IND";
125 case MSG_CMD_PLG_INIT_SIM_BY_SAT:
126 return "MSG_CMD_PLG_INIT_SIM_BY_SAT";
127 case MSG_CMD_GET_THREADVIEWLIST:
128 return "MSG_CMD_GET_THREADVIEWLIST";
129 case MSG_CMD_GET_CONVERSATIONVIEWLIST:
130 return "MSG_CMD_GET_CONVERSATIONVIEWLIST";
131 case MSG_CMD_DELETE_THREADMESSAGELIST:
132 return "MSG_CMD_DELETE_THREADMESSAGELIST";
133 case MSG_CMD_GET_CONTACT_COUNT:
134 return "MSG_CMD_GET_CONTACT_COUNT";
137 case MSG_CMD_GET_QUICKPANEL_DATA:
138 return "MSG_CMD_GET_QUICKPANEL_DATA";
139 case MSG_CMD_COUNT_BY_MSGTYPE:
140 return "MSG_CMD_COUNT_BY_MSGTYPE";
141 case MSG_CMD_RESET_DB:
142 return "MSG_CMD_RESET_DB";
143 case MSG_CMD_GET_MEMSIZE:
144 return "MSG_CMD_GET_MEMSIZE";
145 case MSG_CMD_BACKUP_MESSAGE:
146 return "MSG_CMD_BACKUP_MESSAGE";
149 case MSG_CMD_RESTORE_MESSAGE:
150 return "MSG_CMD_RESTORE_MESSAGE";
151 case MSG_CMD_UPDATE_THREAD_READ:
152 return "MSG_CMD_UPDATE_THREAD_READ";
153 case MSG_CMD_REG_SYNCML_MSG_OPERATION_CB:
154 return "MSG_CMD_REG_SYNCML_MSG_OPERATION_CB";
155 case MSG_CMD_SYNCML_OPERATION:
156 return "MSG_CMD_SYNCML_OPERATION";
157 case MSG_CMD_GET_REPORT_STATUS:
158 return "MSG_CMD_GET_REPORT_STATUS";
161 case MSG_CMD_GET_THREAD_ID_BY_ADDRESS:
162 return "MSG_CMD_GET_THREAD_ID_BY_ADDRESS";
163 case MSG_CMD_GET_THREAD_INFO:
164 return "MSG_CMD_GET_THREAD_INFO";
165 case MSG_CMD_GET_SMSC_OPT:
166 return "MSG_CMD_GET_SMSC_OPT";
167 case MSG_CMD_GET_CB_OPT:
168 return "MSG_CMD_GET_CB_OPT";
171 case MSG_CMD_GET_SMS_SEND_OPT:
172 return "MSG_CMD_GET_SMS_SEND_OPT";
173 case MSG_CMD_GET_MMS_SEND_OPT:
174 return "MSG_CMD_GET_MMS_SEND_OPT";
175 case MSG_CMD_GET_MMS_RECV_OPT:
176 return "MSG_CMD_GET_MMS_RECV_OPT";
177 case MSG_CMD_GET_PUSH_MSG_OPT:
178 return "MSG_CMD_GET_PUSH_MSG_OPT";
179 case MSG_CMD_GET_VOICE_MSG_OPT:
180 return "MSG_CMD_GET_VOICE_MSG_OPT";
183 case MSG_CMD_GET_GENERAL_MSG_OPT:
184 return "MSG_CMD_GET_GENERAL_MSG_OPT";
186 case MSG_CMD_GET_MSG_SIZE_OPT:
187 return "MSG_CMD_GET_MSG_SIZE_OPT";
188 case MSG_CMD_SET_SMSC_OPT:
189 return "MSG_CMD_SET_SMSC_OPT";
193 case MSG_CMD_SET_CB_OPT:
194 return "MSG_CMD_SET_CB_OPT";
195 case MSG_CMD_SET_SMS_SEND_OPT:
196 return "MSG_CMD_SET_SMS_SEND_OPT";
197 case MSG_CMD_SET_MMS_SEND_OPT:
198 return "MSG_CMD_SET_MMS_SEND_OPT";
199 case MSG_CMD_SET_MMS_RECV_OPT:
200 return "MSG_CMD_SET_MMS_RECV_OPT";
201 case MSG_CMD_SET_PUSH_MSG_OPT:
202 return "MSG_CMD_SET_PUSH_MSG_OPT";
205 case MSG_CMD_SET_VOICE_MSG_OPT:
206 return "MSG_CMD_SET_VOICE_MSG_OPT";
207 case MSG_CMD_SET_GENERAL_MSG_OPT:
208 return "MSG_CMD_SET_GENERAL_MSG_OPT";
209 case MSG_CMD_SET_MSG_SIZE_OPT:
210 return "MSG_CMD_SET_MSG_SIZE_OPT";
212 case MSG_CMD_REG_INCOMING_PUSH_MSG_CB:
213 return "MSG_CMD_REG_INCOMING_PUSH_MSG_CB";
214 case MSG_CMD_PLG_INCOMING_PUSH_IND:
215 return "MSG_CMD_PLG_INCOMING_PUSH_IND";
216 case MSG_CMD_REG_INCOMING_CB_MSG_CB:
217 return "MSG_CMD_REG_INCOMING_CB_MSG_CB";
218 case MSG_CMD_PLG_INCOMING_CB_IND:
219 return "MSG_CMD_PLG_INCOMING_CB_IND";
220 case MSG_CMD_ADD_PUSH_EVENT:
221 return "MSG_CMD_ADD_PUSH_EVENT";
223 case MSG_CMD_DELETE_PUSH_EVENT:
224 return "MSG_CMD_DELETE_PUSH_EVENT";
225 case MSG_CMD_UPDATE_PUSH_EVENT:
226 return "MSG_CMD_UPDATE_PUSH_EVENT";
229 return "Unknown Command Type!!!";
235 const char * MsgDbgEvtStr(MSG_EVENT_TYPE_T evtType)
240 case MSG_EVENT_OPEN_HANDLE:
241 return "MSG_EVENT_OPEN_HANDLE";
242 case MSG_EVENT_CLOSE_HANDLE:
243 return "MSG_EVENT_CLOSE_HANDLE";
244 case MSG_EVENT_GET_STORAGELIST:
245 return "MSG_EVENT_GET_STORAGELIST";
246 case MSG_EVENT_ADD_MSG:
247 return "MSG_EVENT_ADD_MSG";
248 case MSG_EVENT_ADD_SYNCML_MSG:
249 return "MSG_EVENT_ADD_SYNCML_MSG";
251 case MSG_EVENT_UPDATE_MSG:
252 return "MSG_EVENT_UPDATE_MSG";
253 case MSG_EVENT_UPDATE_READ:
254 return "MSG_EVENT_UPDATE_READ";
255 case MSG_EVENT_UPDATE_PROTECTED:
256 return "MSG_EVENT_UPDATE_PROTECTED";
257 case MSG_EVENT_DELETE_MSG:
258 return "MSG_EVENT_DELETE_MSG";
259 case MSG_EVENT_DELALL_MSGINFOLDER:
260 return "MSG_EVENT_DELALL_MSGINFOLDER";
262 case MSG_EVENT_MOVE_MSGTOFOLDER:
263 return "MSG_EVENT_MOVE_MSGTOFOLDER";
264 case MSG_EVENT_MOVE_MSGTOSTORAGE:
265 return "MSG_EVENT_MOVE_MSGTOSTORAGE";
266 case MSG_EVENT_COUNT_MSG:
267 return "MSG_EVENT_COUNT_MSG";
268 case MSG_EVENT_GET_MSG:
269 return "MSG_EVENT_GET_MSG";
270 case MSG_EVENT_GET_FOLDERVIEWLIST:
271 return "MSG_EVENT_GET_FOLDERVIEWLIST";
273 case MSG_EVENT_ADD_FOLDER:
274 return "MSG_EVENT_ADD_FOLDER";
275 case MSG_EVENT_UPDATE_FOLDER:
276 return "MSG_EVENT_UPDATE_FOLDER";
277 case MSG_EVENT_DELETE_FOLDER:
278 return "MSG_EVENT_DELETE_FOLDER";
279 case MSG_EVENT_GET_FOLDERLIST:
280 return "MSG_EVENT_GET_FOLDERLIST";
281 case MSG_EVENT_ADD_FILTER:
282 return "MSG_EVENT_ADD_FILTER";
284 case MSG_EVENT_UPDATE_FILTER:
285 return "MSG_EVENT_UPDATE_FILTER";
286 case MSG_EVENT_DELETE_FILTER:
287 return "MSG_EVENT_DELETE_FILTER";
288 case MSG_EVENT_GET_FILTERLIST:
289 return "MSG_EVENT_GET_FILTERLIST";
290 case MSG_EVENT_SET_FILTER_OPERATION:
291 return "MSG_EVENT_SET_FILTER_OPERATION";
292 case MSG_EVENT_GET_FILTER_OPERATION:
293 return "MSG_EVENT_GET_FILTER_OPERATION";
295 case MSG_EVENT_GET_MSG_TYPE:
296 return "MSG_EVENT_GET_MSG_TYPE";
297 case MSG_EVENT_SUBMIT_REQ:
298 return "MSG_EVENT_SUBMIT_REQ";
299 case MSG_EVENT_CANCEL_REQ:
300 return "MSG_EVENT_CANCEL_REQ";
301 case MSG_EVENT_REG_SENT_STATUS_CB:
302 return "MSG_EVENT_REG_SENT_STATUS_CB";
303 case MSG_EVENT_REG_STORAGE_CHANGE_CB:
304 return "MSG_EVENT_REG_STORAGE_CHANGE_CB";
307 case MSG_EVENT_REG_INCOMING_MSG_CB:
308 return "MSG_EVENT_REG_INCOMING_MSG_CB";
309 case MSG_EVENT_REG_INCOMING_MMS_CONF_MSG_CB:
310 return "MSG_EVENT_REG_INCOMING_MMS_CONF_MSG_CB";
311 case MSG_EVENT_REG_INCOMING_SYNCML_MSG_CB:
312 return "MSG_EVENT_REG_INCOMING_SYNCML_MSG_CB";
313 case MSG_EVENT_REG_INCOMING_LBS_MSG_CB:
314 return "MSG_EVENT_REG_INCOMING_LBS_MSG_CB";
315 case MSG_EVENT_PLG_SENT_STATUS_CNF:
316 return "MSG_EVENT_PLG_SENT_STATUS_CNF";
319 case MSG_EVENT_PLG_STORAGE_CHANGE_IND:
320 return "MSG_EVENT_STORAGE_CHANGE_CB";
321 case MSG_EVENT_PLG_INCOMING_MSG_IND:
322 return "MSG_EVENT_PLG_INCOMING_MSG_IND";
323 case MSG_EVENT_PLG_INCOMING_MMS_CONF:
324 return "MSG_EVENT_PLG_INCOMING_MMS_CONF";
325 case MSG_EVENT_PLG_INCOMING_SYNCML_MSG_IND:
326 return "MSG_EVENT_PLG_INCOMING_SYNCML_MSG_IND";
327 case MSG_EVENT_PLG_INCOMING_LBS_MSG_IND:
328 return "MSG_EVENT_PLG_INCOMING_LBS_MSG_IND";
331 case MSG_EVENT_PLG_INIT_SIM_BY_SAT:
332 return "MSG_EVENT_PLG_INIT_SIM_BY_SAT";
333 case MSG_EVENT_GET_THREADVIEWLIST:
334 return "MSG_EVENT_GET_THREADVIEWLIST";
335 case MSG_EVENT_GET_CONVERSATIONVIEWLIST:
336 return "MSG_EVENT_GET_CONVERSATIONVIEWLIST";
337 case MSG_EVENT_DELETE_THREADMESSAGELIST:
338 return "MSG_EVENT_DELETE_THREADMESSAGELIST";
339 case MSG_EVENT_GET_CONTACT_COUNT:
340 return "MSG_EVENT_GET_CONTACT_COUNT";
343 case MSG_EVENT_GET_QUICKPANEL_DATA:
344 return "MSG_EVENT_GET_QUICKPANEL_DATA";
345 case MSG_EVENT_COUNT_BY_MSGTYPE:
346 return "MSG_EVENT_COUNT_BY_MSGTYPE";
347 case MSG_EVENT_RESET_DB:
348 return "MSG_EVENT_RESET_DB";
349 case MSG_EVENT_GET_MEMSIZE:
350 return "MSG_EVENT_GET_MEMSIZE";
351 case MSG_EVENT_BACKUP_MESSAGE:
352 return "MSG_EVENT_BACKUP_MESSAGE";
355 case MSG_EVENT_RESTORE_MESSAGE:
356 return "MSG_EVENT_RESTORE_MESSAGE";
357 case MSG_EVENT_UPDATE_THREAD_READ:
358 return "MSG_EVENT_UPDATE_THREAD_READ";
359 case MSG_EVENT_REG_SYNCML_MSG_OPERATION_CB:
360 return "MSG_EVENT_REG_SYNCML_MSG_OPERATION_CB";
361 case MSG_EVENT_SYNCML_OPERATION:
362 return "MSG_EVENT_SYNCML_OPERATION";
363 case MSG_EVENT_GET_REPORT_STATUS:
364 return "MSG_EVENT_GET_REPORT_STATUS";
367 case MSG_CMD_GET_THREAD_ID_BY_ADDRESS:
368 return "MSG_CMD_GET_THREAD_ID_BY_ADDRESS";
369 case MSG_CMD_GET_THREAD_INFO:
370 return "MSG_CMD_GET_THREAD_INFO";
371 case MSG_EVENT_GET_SMSC_OPT:
372 return "MSG_EVENT_GET_SMSC_OPT";
373 case MSG_EVENT_GET_CB_OPT:
374 return "MSG_EVENT_GET_CB_OPT";
377 case MSG_EVENT_GET_SMS_SEND_OPT:
378 return "MSG_EVENT_GET_SMS_SEND_OPT";
379 case MSG_EVENT_GET_MMS_SEND_OPT:
380 return "MSG_EVENT_GET_MMS_SEND_OPT";
381 case MSG_EVENT_GET_MMS_RECV_OPT:
382 return "MSG_EVENT_GET_MMS_RECV_OPT";
383 case MSG_EVENT_GET_PUSH_MSG_OPT:
384 return "MSG_EVENT_GET_PUSH_MSG_OPT";
385 case MSG_EVENT_GET_VOICE_MSG_OPT:
386 return "MSG_EVENT_GET_VOICE_MSG_OPT";
389 case MSG_EVENT_GET_GENERAL_MSG_OPT:
390 return "MSG_EVENT_GET_GENERAL_MSG_OPT";
393 case MSG_EVENT_GET_MSG_SIZE_OPT:
394 return "MSG_EVENT_GET_MSG_SIZE_OPT";
395 case MSG_EVENT_SET_SMSC_OPT:
396 return "MSG_EVENT_SET_SMSC_OPT";
397 case MSG_EVENT_SET_CB_OPT:
398 return "MSG_EVENT_SET_CB_OPT";
399 case MSG_EVENT_SET_SMS_SEND_OPT:
400 return "MSG_EVENT_SET_SMS_SEND_OPT";
401 case MSG_EVENT_SET_MMS_SEND_OPT:
402 return "MSG_EVENT_SET_MMS_SEND_OPT";
403 case MSG_EVENT_SET_MMS_RECV_OPT:
404 return "MSG_EVENT_SET_MMS_RECV_OPT";
407 case MSG_EVENT_SET_PUSH_MSG_OPT:
408 return "MSG_EVENT_SET_PUSH_MSG_OPT";
409 case MSG_EVENT_SET_VOICE_MSG_OPT:
410 return "MSG_EVENT_SET_VOICE_MSG_OPT";
411 case MSG_EVENT_SET_GENERAL_MSG_OPT:
412 return "MSG_EVENT_SET_GENERAL_MSG_OPT";
413 case MSG_EVENT_SET_MSG_SIZE_OPT:
414 return "MSG_EVENT_SET_MSG_SIZE_OPT";
415 case MSG_EVENT_REG_INCOMING_PUSH_MSG_CB:
416 return "MSG_EVENT_REG_INCOMING_PUSH_MSG_CB";
417 case MSG_EVENT_PLG_INCOMING_PUSH_MSG_IND:
418 return "MSG_EVENT_PLG_INCOMING_PUSH_MSG_IND";
419 case MSG_EVENT_REG_INCOMING_CB_MSG_CB:
420 return "MSG_EVENT_REG_INCOMING_CB_MSG_CB";
421 case MSG_EVENT_PLG_INCOMING_CB_MSG_IND:
422 return "MSG_EVENT_PLG_INCOMING_CB_MSG_IND";
423 case MSG_EVENT_ADD_PUSH_EVENT:
424 return "MSG_EVENT_ADD_PUSH_EVENT";
426 case MSG_EVENT_DELETE_PUSH_EVENT:
427 return "MSG_EVENT_DELETE_PUSH_EVENT";
428 case MSG_EVENT_UPDATE_PUSH_EVENT:
429 return "MSG_EVENT_UPDATE_PUSH_EVENT";
432 return "Unknown Event Type!!!";
441 return syscall(__NR_gettid);