Change license to APLv2.0
[platform/core/messaging/msg-service.git] / proxy / MsgHandleControl.cpp
1 /*
2  * msg-service
3  *
4  * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd. All rights reserved
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *     http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18 */
19
20 #include <errno.h>
21 #include <stdlib.h>
22
23 #include <security-server.h>
24
25 #include "MsgDebug.h"
26 #include "MsgCppTypes.h"
27 #include "MsgException.h"
28 #include "MsgUtilFile.h"
29 #include "MsgGconfWrapper.h"
30 #include "MsgProxyListener.h"
31 #include "MsgHandle.h"
32
33 /*==================================================================================================
34                                      IMPLEMENTATION OF MsgHandle - Control Member Functions
35 ==================================================================================================*/
36 MsgHandle::MsgHandle() : mCounter(0), mClientSock()
37 {
38         memset(mConnectionId, 0x00, sizeof(mConnectionId));
39         memset(mCookie, 0x00, sizeof(mCookie));
40 }
41
42
43 MsgHandle::~MsgHandle()
44 {
45
46 }
47
48
49 void MsgHandle::openHandle()
50 {
51 //      int ret = 0;
52 //      size_t cookieSize;
53
54         bool bReady = false;
55
56         // server is currently booting and service is not available until the end of booting
57         MsgSettingGetBool(VCONFKEY_MSG_SERVER_READY, &bReady);
58
59         if (bReady == false) {
60                 THROW(MsgException::SERVER_READY_ERROR, "Msg Server is not ready !!!!!");
61         } else {
62                 MSG_DEBUG("Msg Server is ready !!!!!");
63         }
64
65         // Get Cookie Size
66 //      cookieSize = security_server_get_cookie_size();
67
68 //      MSG_DEBUG("cookie size : [%d]", cookieSize);
69
70         // Request Cookie
71 //      ret = security_server_request_cookie(mCookie, cookieSize);
72
73 //      if (ret < 0) {
74 //              MSG_DEBUG("security_server_request_cookie() error!! [%d]", ret);
75 //              return;
76 //      }
77
78         // Open Socket IPC
79         connectSocket();
80 }
81
82
83 void MsgHandle::closeHandle(MsgHandle* pHandle)
84 {
85         MSG_BEGIN();
86
87         //Remove CB List of closing Handle
88         MsgProxyListener* eventListener = MsgProxyListener::instance();
89
90         eventListener->clearListOfClosedHandle(pHandle);
91         //eventListener->stop();
92
93         // Close Socket IPC
94         disconnectSocket();
95
96         MSG_END();
97 }
98
99
100 void MsgHandle::connectSocket()
101 {
102         mClientSock.connect(MSG_SOCKET_PATH);
103 }
104
105
106 void MsgHandle::disconnectSocket()
107 {
108         mClientSock.close();
109 }
110
111
112 void MsgHandle::write(const char *pCmdData, int cmdSize, char **ppEvent)
113 {
114         if (pCmdData == NULL || ppEvent == NULL) {
115                 THROW(MsgException::INVALID_PARAM, "Param is NULL");
116         }
117
118         int ret = 0;
119
120         // Send Command to MSG FW
121         ret = mClientSock.write(pCmdData, cmdSize);
122         if (ret < 0)
123                 THROW(MsgException::IPC_ERROR, "IPC write error");
124
125         // Receive Result from MSG FW
126         read(ppEvent);
127
128         if (*ppEvent == NULL) {
129                 THROW(MsgException::INVALID_RESULT, "event is NULL");
130         }
131
132 }
133
134
135 void MsgHandle::read(char **ppEvent)
136 {
137         unsigned int dataSize = 0;
138
139         dataSize = mClientSock.read(ppEvent, &dataSize);
140
141         if (dataSize == 0) {
142                 THROW(MsgException::IPC_ERROR, "Server closed connection");
143         }
144 }
145
146
147 void MsgHandle::convertMsgStruct(const MSG_MESSAGE_HIDDEN_S *pSrc, MSG_MESSAGE_INFO_S *pDest)
148 {
149         MSG_BEGIN();
150
151         pDest->msgId = pSrc->msgId;
152         pDest->threadId = pSrc->threadId;
153         pDest->folderId = pSrc->folderId;
154         pDest->msgType.mainType = pSrc->mainType;
155         pDest->msgType.subType = pSrc->subType;
156         pDest->msgType.classType= pSrc->classType;
157         pDest->storageId = pSrc->storageId;
158
159         msg_struct_list_s *addr_info_s = pSrc->addr_list;
160
161         if (addr_info_s) {
162                 msg_struct_s *addr_info = NULL;
163                 MSG_ADDRESS_INFO_S *address = NULL;
164
165                 pDest->nAddressCnt = addr_info_s->nCount;
166
167                 for (int i = 0; i < addr_info_s->nCount; i++)
168                 {
169                         addr_info = (msg_struct_s *)addr_info_s->msg_struct_info[i];
170                         address = (MSG_ADDRESS_INFO_S *)addr_info->data;
171
172                         pDest->addressList[i].addressType = address->addressType;
173                         pDest->addressList[i].recipientType = address->recipientType;
174                         pDest->addressList[i].contactId = address->contactId;
175                         strncpy(pDest->addressList[i].addressVal, address->addressVal, MAX_ADDRESS_VAL_LEN);
176                         strncpy(pDest->addressList[i].displayName, address->displayName, MAX_DISPLAY_NAME_LEN);
177                         pDest->addressList[i].displayName[MAX_DISPLAY_NAME_LEN] = '\0';
178                 }
179         }
180
181         strncpy(pDest->replyAddress, pSrc->replyAddress, MAX_PHONE_NUMBER_LEN);
182         strncpy(pDest->subject, pSrc->subject, MAX_SUBJECT_LEN);
183
184         pDest->displayTime = pSrc->displayTime;
185         pDest->networkStatus = pSrc->networkStatus;
186         pDest->encodeType = pSrc->encodeType;
187         pDest->bRead = pSrc->bRead;
188         pDest->bProtected = pSrc->bProtected;
189         pDest->bBackup = pSrc->bBackup;
190         pDest->priority = pSrc->priority;
191         pDest->direction = pSrc->direction;
192
193         // Set Port Info.
194         pDest->msgPort.valid = pSrc->bPortValid;
195
196         if (pDest->msgPort.valid == true) {
197                 pDest->msgPort.dstPort = pSrc->dstPort;
198                 pDest->msgPort.srcPort = pSrc->srcPort;
199         }
200
201         MSG_DEBUG("nSize = %d",  pSrc->dataSize);
202
203         if (pSrc->mainType == MSG_SMS_TYPE){
204                 pDest->bTextSms = true;
205                 pDest->dataSize = pSrc->dataSize;
206
207                 memset(pDest->msgText, 0x00, sizeof(pDest->msgText));
208
209                 if (pSrc->dataSize > MAX_MSG_TEXT_LEN) {
210                         // Save Message Data into File
211                         char fileName[MSG_FILENAME_LEN_MAX+1];
212                         memset(fileName, 0x00, sizeof(fileName));
213
214                         if(MsgCreateFileName(fileName) == false)
215                                 THROW(MsgException::FILE_ERROR, "MsgCreateFileName error");
216
217                         MSG_DEBUG("Save pSrc->pData into file : size[%d] name[%s]", pDest->dataSize, fileName);
218
219                         if (MsgWriteIpcFile(fileName, (char*)pSrc->pData, pSrc->dataSize) == false)
220                                 THROW(MsgException::FILE_ERROR, "MsgWriteIpcFile error");
221
222                         memset(pDest->msgData, 0x00, sizeof(pDest->msgData));
223                         strncpy(pDest->msgData, fileName, MAX_MSG_DATA_LEN);
224
225                         pDest->bTextSms = false;
226
227                 } else {
228                         if (pDest->encodeType == MSG_ENCODE_8BIT)
229                                 memcpy(pDest->msgText, pSrc->pData, pSrc->dataSize);
230                         else
231                                 strncpy(pDest->msgText, (char*)pSrc->pData, pSrc->dataSize);
232                 }
233
234                 MSG_DEBUG("pData = %s",  pSrc->pData);
235                 MSG_DEBUG("msgText = %s",  pDest->msgText);
236         } else if (pSrc->mainType == MSG_MMS_TYPE) {
237
238                 pDest->bTextSms = false;
239                 pDest->dataSize = pSrc->dataSize;
240
241                 if(pSrc->subType == MSG_READREPLY_MMS) {
242                         memset(pDest->msgData, 0x00, sizeof(pDest->msgData));
243
244                         if (pSrc->mmsDataSize < MAX_MSG_DATA_LEN)
245                                 memcpy(pDest->msgData, pSrc->pMmsData, pSrc->mmsDataSize);
246                         else
247                                 memcpy(pDest->msgData, pSrc->pMmsData, MAX_MSG_DATA_LEN);
248
249                 } else {
250                         // Save Message Data into File
251                         char fileName[MSG_FILENAME_LEN_MAX+1];
252                         memset(fileName, 0x00, sizeof(fileName));
253
254                         if(MsgCreateFileName(fileName) == false)
255                                 THROW(MsgException::FILE_ERROR, "MsgCreateFileName error");
256
257                         // change file extension in case of java MMS msg
258                         if (pSrc->subType == MSG_SENDREQ_JAVA_MMS) {
259                                 char* pFileNameExt;
260                                 pFileNameExt = strstr(fileName,"DATA");
261                                 strncpy(pFileNameExt,"JAVA", MSG_FILENAME_LEN_MAX);
262                         }
263
264                         MSG_DEBUG("Save Message Data into file : size[%d] name[%s]", pSrc->mmsDataSize, fileName);
265                         if (MsgWriteIpcFile(fileName, (char*)pSrc->pMmsData, pSrc->mmsDataSize) == false)
266                                 THROW(MsgException::FILE_ERROR, "MsgWriteIpcFile error");
267
268                         memset(pDest->msgData, 0x00, sizeof(pDest->msgData));
269                         strncpy(pDest->msgData, fileName, MAX_MSG_DATA_LEN);
270                         if (pSrc->pData) {
271                                 strncpy(pDest->msgText, (char*)pSrc->pData, MAX_MSG_TEXT_LEN);
272                         }
273
274                         if (strlen(pSrc->thumbPath) > 0) {
275                                 memset(pDest->thumbPath, 0x00, sizeof(pDest->thumbPath));
276                                 memcpy(pDest->thumbPath, pSrc->thumbPath, sizeof(pDest->thumbPath));
277                         }
278                 }
279         }
280
281         MSG_END();
282 }
283
284
285 void MsgHandle::convertMsgStruct(const MSG_MESSAGE_INFO_S *pSrc, MSG_MESSAGE_HIDDEN_S *pDest)
286 {
287         MSG_BEGIN();
288
289         pDest->msgId = pSrc->msgId;
290         pDest->threadId = pSrc->threadId;
291         pDest->folderId = pSrc->folderId;
292         pDest->mainType = pSrc->msgType.mainType;
293         pDest->subType = pSrc->msgType.subType;
294         pDest->storageId = pSrc->storageId;
295
296         strncpy(pDest->replyAddress, pSrc->replyAddress, MAX_PHONE_NUMBER_LEN);
297         strncpy(pDest->subject, pSrc->subject, MAX_SUBJECT_LEN);
298
299         pDest->displayTime = pSrc->displayTime;
300         pDest->networkStatus = pSrc->networkStatus;
301         pDest->encodeType = pSrc->encodeType;
302         pDest->bRead = pSrc->bRead;
303         pDest->bProtected = pSrc->bProtected;
304         pDest->bBackup = pSrc->bBackup;
305         pDest->priority = pSrc->priority;
306         pDest->direction = pSrc->direction;
307
308         // Set Port Info.
309         pDest->bPortValid = pSrc->msgPort.valid;
310
311         if (pDest->bPortValid == true) {
312                 pDest->dstPort = pSrc->msgPort.dstPort;
313                 pDest->srcPort = pSrc->msgPort.srcPort;
314         }
315
316         if(pSrc->thumbPath[0] != '\0')
317                 strncpy(pDest->thumbPath, pSrc->thumbPath, MSG_FILEPATH_LEN_MAX);
318
319         pDest->addr_list->nCount = pSrc->nAddressCnt;
320
321         msg_struct_s *addr_info_s = NULL;
322         MSG_ADDRESS_INFO_S *addr_info = NULL;
323
324         for (int i = 0; i < pDest->addr_list->nCount; i++)
325         {
326                 addr_info_s = (msg_struct_s *)pDest->addr_list->msg_struct_info[i];
327                 addr_info = (MSG_ADDRESS_INFO_S *)addr_info_s->data;
328
329                 addr_info->addressType = pSrc->addressList[i].addressType;
330                 addr_info->recipientType = pSrc->addressList[i].recipientType;
331                 addr_info->contactId = pSrc->addressList[i].contactId;
332                 strncpy(addr_info->addressVal, pSrc->addressList[i].addressVal, MAX_ADDRESS_VAL_LEN);
333                 strncpy(addr_info->displayName, pSrc->addressList[i].displayName, MAX_DISPLAY_NAME_LEN);
334                 addr_info->displayName[MAX_DISPLAY_NAME_LEN] = '\0';
335         }
336
337
338         if (pSrc->bTextSms == false) {
339                 int fileSize = 0;
340
341                 char* pFileData = NULL;
342                 AutoPtr<char> buf(&pFileData);
343
344                 pDest->dataSize = pSrc->dataSize;
345
346                 // Get Message Data from File
347                 if (pSrc->networkStatus != MSG_NETWORK_RETRIEVE_FAIL) {
348
349                         if (MsgOpenAndReadFile(pSrc->msgData, &pFileData, &fileSize) == false)
350                                 THROW(MsgException::FILE_ERROR, "MsgOpenAndReadFile error");
351
352                         if (pSrc->msgType.mainType == MSG_SMS_TYPE) {
353                                 if (pDest->encodeType == MSG_ENCODE_8BIT) {
354                                         pDest->pData = (void*)new char[fileSize];
355                                         memset(pDest->pData, 0x00, fileSize);
356                                         memcpy(pDest->pData, pFileData, fileSize);
357                                 } else {
358                                         pDest->pData = (void*)new char[fileSize+1];
359                                         memset(pDest->pData, 0x00, fileSize+1);
360                                         strncpy((char*)pDest->pData, pFileData, fileSize);
361                                 }
362                         } else {
363                                 if (pSrc->msgText[0] != '\0') {
364                                         pDest->pData = (void*)new char[strlen(pSrc->msgText)+1];
365                                         memset(pDest->pData, 0x00, strlen(pSrc->msgText)+1);
366                                         strncpy((char*)pDest->pData, pSrc->msgText, strlen(pSrc->msgText));
367                                 }
368                                 pDest->mmsDataSize = fileSize;
369                                 pDest->pMmsData = (void*)new char[fileSize];
370                                 memset(pDest->pMmsData, 0x00, fileSize);
371                                 memcpy(pDest->pMmsData, pFileData, fileSize);
372                                 MSG_DEBUG("Get Message Data from file : size[%d] name[%s]", pDest->mmsDataSize, pSrc->msgData);
373                         }
374                 }
375         } else {
376                 pDest->dataSize = pSrc->dataSize;
377
378                 if (pSrc->msgType.mainType == MSG_SMS_TYPE) {
379                         if (pDest->encodeType == MSG_ENCODE_8BIT || pSrc->msgType.subType == MSG_ETWS_SMS) {
380                                 pDest->pData = (void*)new char[pDest->dataSize];
381                                 memset(pDest->pData, 0x00, pDest->dataSize);
382                                 memcpy(pDest->pData, pSrc->msgText, pDest->dataSize);
383                         } else {
384                                 pDest->pData = (void*)new char[pDest->dataSize+1];
385                                 memset(pDest->pData, 0x00, pDest->dataSize+1);
386                                 strncpy((char*)pDest->pData, pSrc->msgText, pDest->dataSize);
387                         }
388                 } else {
389                         if (pSrc->msgText[0] != '\0') {
390                                 pDest->pData = (void*)new char[strlen(pSrc->msgText)+1];
391                                 memset(pDest->pData, 0x00, strlen(pSrc->msgText)+1);
392                                 strncpy((char*)pDest->pData, pSrc->msgText, strlen(pSrc->msgText));
393                         }
394
395                         pDest->mmsDataSize = pDest->dataSize;
396                         pDest->pMmsData = (void*)new char[pDest->dataSize];
397                         memset(pDest->pMmsData, 0x00, pDest->dataSize);
398                         memcpy(pDest->pMmsData, pSrc->msgData, pDest->dataSize);
399                 }
400         }
401
402         MSG_END();
403 }
404
405
406 void MsgHandle::convertSendOptStruct(const MSG_SENDINGOPT_S* pSrc, MSG_SENDINGOPT_INFO_S* pDest, MSG_MESSAGE_TYPE_S msgType)
407 {
408         MSG_BEGIN();
409
410         pDest->bSetting = pSrc->bSetting;
411
412         if (pSrc->bSetting == false) {
413                 MSG_DEBUG("No Sending Option");
414                 return;
415         }
416
417         pDest->bDeliverReq = pSrc->bDeliverReq;
418         pDest->bKeepCopy = pSrc->bKeepCopy;
419
420         MSG_DEBUG("pDest->bSetting = %d", pDest->bSetting);
421         MSG_DEBUG("pDest->bDeliverReq = %d", pDest->bDeliverReq);
422         MSG_DEBUG("pDest->bKeepCopy = %d", pDest->bKeepCopy);
423
424         if (msgType.mainType == MSG_SMS_TYPE) {
425                 msg_struct_s *pStruct = (msg_struct_s *)pSrc->smsSendOpt;
426                 if(pStruct)
427                 {
428                         SMS_SENDINGOPT_S *pSms = (SMS_SENDINGOPT_S *)pStruct->data;
429                         if(pSms)
430                         {
431                                 pDest->option.smsSendOptInfo.bReplyPath = pSms->bReplyPath;
432                         }
433                 }
434         } else if (msgType.mainType == MSG_MMS_TYPE) {
435                 msg_struct_s *pStruct = (msg_struct_s *)pSrc->mmsSendOpt;
436                 if(pStruct)
437                 {
438                         MMS_SENDINGOPT_S *pMms = (MMS_SENDINGOPT_S *)pStruct->data;
439                         if(pMms)
440                         {
441                                 pDest->option.mmsSendOptInfo.priority = pMms->priority;
442                                 pDest->option.mmsSendOptInfo.bReadReq = pMms->bReadReq;
443
444                                 MSG_DEBUG("pDest->option.mmsSendOpt.priority = %d", pMms->priority);
445                                 MSG_DEBUG("pDest->option.mmsSendOpt.bReadReq = %d", pMms->bReadReq);
446
447                                 if (pMms->expiryTime == 0) {
448                                         pDest->option.mmsSendOptInfo.expiryTime.type = MMS_TIMETYPE_NONE;
449                                         pDest->option.mmsSendOptInfo.expiryTime.time = pMms->expiryTime;
450                                 } else {
451                                         pDest->option.mmsSendOptInfo.expiryTime.type = MMS_TIMETYPE_RELATIVE;
452                                         pDest->option.mmsSendOptInfo.expiryTime.time = pMms->expiryTime;
453                                 }
454
455                                 if (pMms->bUseDeliveryCustomTime == true) {
456                                         pDest->option.mmsSendOptInfo.bUseDeliveryCustomTime = true;
457                                 } else {
458                                         pDest->option.mmsSendOptInfo.bUseDeliveryCustomTime = false;
459                                 }
460                                 pDest->option.mmsSendOptInfo.deliveryTime.type = MMS_TIMETYPE_RELATIVE;
461                                 pDest->option.mmsSendOptInfo.deliveryTime.time = pMms->deliveryTime;
462
463                                 MSG_DEBUG("pDest->option.mmsSendOpt.expiryTime = %d", pDest->option.mmsSendOptInfo.expiryTime.time);
464                         }
465                 }
466         }
467
468         MSG_END();
469 }
470
471
472 void MsgHandle::convertSendOptStruct(const MSG_SENDINGOPT_INFO_S* pSrc, MSG_SENDINGOPT_S* pDest, MSG_MESSAGE_TYPE_S msgType)
473 {
474         MSG_BEGIN();
475
476         pDest->bDeliverReq = pSrc->bDeliverReq;
477         pDest->bKeepCopy = pSrc->bKeepCopy;
478
479         MSG_DEBUG("pDest->bDeliverReq = %d", pDest->bDeliverReq);
480         MSG_DEBUG("pDest->bKeepCopy = %d", pDest->bKeepCopy);
481
482         if (msgType.mainType == MSG_SMS_TYPE) {
483                 msg_struct_s *pStruct = (msg_struct_s *)pDest->smsSendOpt;
484                 SMS_SENDINGOPT_S *pSms = (SMS_SENDINGOPT_S *)pStruct->data;
485                 pSms->bReplyPath = pSrc->option.smsSendOptInfo.bReplyPath;
486         } else if (msgType.mainType == MSG_MMS_TYPE) {
487                 msg_struct_s *pStruct = (msg_struct_s *)pDest->mmsSendOpt;
488                 MMS_SENDINGOPT_S *pMms = (MMS_SENDINGOPT_S *)pStruct->data;
489                 pMms->priority = pSrc->option.mmsSendOptInfo.priority;
490                 pMms->bReadReq = pSrc->option.mmsSendOptInfo.bReadReq;
491                 pMms->expiryTime = pSrc->option.mmsSendOptInfo.expiryTime.time;
492                 pMms->deliveryTime = pSrc->option.mmsSendOptInfo.deliveryTime.time;
493
494                 MSG_DEBUG("pDest->option.mmsSendOpt.priority = %d", pMms->priority);
495                 MSG_DEBUG("pDest->option.mmsSendOpt.bReadReq = %d", pMms->bReadReq);
496                 MSG_DEBUG("pDest->option.mmsSendOpt.expiryTime = %d", pMms->expiryTime);
497         }
498
499         MSG_END();
500 }
501
502
503 int MsgHandle::getSettingCmdSize(MSG_OPTION_TYPE_T optionType)
504 {
505         int cmdSize = sizeof(MSG_CMD_S) + sizeof(MSG_OPTION_TYPE_T);
506
507         switch (optionType)
508         {
509                 case MSG_GENERAL_OPT :
510                         cmdSize += sizeof(MSG_GENERAL_OPT_S);
511                 break;
512                 case MSG_SMS_SENDOPT :
513                         cmdSize += sizeof(MSG_SMS_SENDOPT_S);
514                 break;
515                 case MSG_SMSC_LIST :
516                         cmdSize += sizeof(MSG_SMSC_LIST_S);
517                 break;
518                 case MSG_MMS_SENDOPT :
519                         cmdSize += sizeof(MSG_MMS_SENDOPT_S);
520                 break;
521                 case MSG_MMS_RECVOPT :
522                         cmdSize += sizeof(MSG_MMS_RECVOPT_S);
523                 break;
524                 case MSG_MMS_STYLEOPT :
525                         cmdSize += sizeof(MSG_MMS_STYLEOPT_S);
526                 break;
527                 case MSG_PUSHMSG_OPT :
528                         cmdSize += sizeof(MSG_PUSHMSG_OPT_S);
529                 break;
530                 case MSG_CBMSG_OPT :
531                         cmdSize += sizeof(MSG_CBMSG_OPT_S);
532                 break;
533                 case MSG_VOICEMAIL_OPT :
534                         cmdSize += sizeof(MSG_VOICEMAIL_OPT_S);
535                 break;
536                 case MSG_MSGSIZE_OPT :
537                         cmdSize += sizeof(MSG_MSGSIZE_OPT_S);
538                 break;
539         }
540
541         return cmdSize;
542 }
543
544
545 bool MsgHandle::CheckEventData(char *pEventData)
546 {
547         MSG_EVENT_S* pEvent = (MSG_EVENT_S*)pEventData;
548
549         switch (pEvent->eventType)
550         {
551         case MSG_EVENT_PLG_SENT_STATUS_CNF :
552         case MSG_EVENT_PLG_INCOMING_MSG_IND :
553         case MSG_EVENT_PLG_INCOMING_MMS_CONF :
554         case MSG_EVENT_PLG_INCOMING_SYNCML_MSG_IND :
555         case MSG_EVENT_PLG_INCOMING_LBS_MSG_IND :
556         case MSG_EVENT_SYNCML_OPERATION :
557         case MSG_EVENT_PLG_STORAGE_CHANGE_IND :
558         case MSG_EVENT_PLG_INCOMING_CB_MSG_IND :
559         case MSG_EVENT_PLG_INCOMING_PUSH_MSG_IND :
560                 return false;
561                 break;
562         default :
563                 return true;
564                 break;
565         }
566
567         return true;
568 }