2 * Copyright 2012 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.0 (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://www.tizenopensource.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.
17 #ifndef SMS_PLUGIN_EVENT_HANDLER_H
18 #define SMS_PLUGIN_EVENT_HANDLER_H
21 /*==================================================================================================
23 ==================================================================================================*/
25 #include "MsgTextConvert.h"
26 #include "MsgPluginInterface.h"
27 #include "SmsPluginTypes.h"
30 /*==================================================================================================
32 ==================================================================================================*/
33 class SmsPluginEventHandler
36 static SmsPluginEventHandler* instance();
38 void registerListener(MSG_PLUGIN_LISTENER_S *pListener);
39 void handleSentStatus(msg_network_status_t NetStatus);
40 void handleMsgIncoming(SMS_TPDU_S *pTpdu);
41 void handleSyncMLMsgIncoming(msg_syncml_message_type_t msgType, char* pPushBody, int PushBodyLen, char* pWspHeader, int WspHeaderLen);
42 void handleLBSMsgIncoming(char* pPushHeader, char* pPushBody, int pushBodyLen);
43 void handlePushMsgIncoming(char* pPushHeader, char* pPushBody, int pushBodyLen, char *app_id);
45 msg_error_t callbackMsgIncoming(MSG_MESSAGE_INFO_S *pMsgInfo);
46 msg_error_t callbackCBMsgIncoming(MSG_CB_MSG_S *pCbMsg);
47 msg_error_t callbackInitSimBySat();
48 msg_error_t callbackStorageChange(msg_storage_change_type_t storageChangeType, MSG_MESSAGE_INFO_S *pMsgInfo);
50 void SetSentInfo(SMS_SENT_INFO_S *pSentInfo);
52 void setDeviceStatus();
53 bool getDeviceStatus();
55 void convertTpduToMsginfo(SMS_TPDU_S *pTpdu, MSG_MESSAGE_INFO_S *msgInfo); // temp
58 SmsPluginEventHandler();
59 virtual ~SmsPluginEventHandler();
61 void convertSubmitTpduToMsginfo(const SMS_SUBMIT_S *pTpdu, MSG_MESSAGE_INFO_S *msgInfo);
62 void convertDeliverTpduToMsginfo(const SMS_DELIVER_S *pTpdu, MSG_MESSAGE_INFO_S *msgInfo);
63 void convertStatusRepTpduToMsginfo(const SMS_STATUS_REPORT_S *pTpdu, MSG_MESSAGE_INFO_S *msgInfo);
64 MSG_SUB_TYPE_T convertMsgSubType(SMS_PID_T pid);
66 static SmsPluginEventHandler* pInstance;
68 MSG_PLUGIN_LISTENER_S listener;
69 MSG_SIM_COUNT_S* pSimCnt;
70 SMS_SENT_INFO_S sentInfo;
77 MsgTextConvert textCvt;
80 #endif //SMS_PLUGIN_EVENT_HANDLER_H