3 * Copyright (c) 2000-2012 Samsung Electronics Co., Ltd. All Rights Reserved.
5 * This file is part of msg-service.
7 * Contact: Jaeyun Jeong <jyjeong@samsung.com>
8 * Sangkoo Kim <sangkoo.kim@samsung.com>
9 * Seunghwan Lee <sh.cat.lee@samsung.com>
10 * SoonMin Jung <sm0415.jung@samsung.com>
11 * Jae-Young Lee <jy4710.lee@samsung.com>
12 * KeeBum Kim <keebum.kim@samsung.com>
14 * PROPRIETARY/CONFIDENTIAL
16 * This software is the confidential and proprietary information of
17 * SAMSUNG ELECTRONICS ("Confidential Information"). You shall not
18 * disclose such Confidential Information and shall use it only in
19 * accordance with the terms of the license agreement you entered
20 * into with SAMSUNG ELECTRONICS.
22 * SAMSUNG make no representations or warranties about the suitability
23 * of the software, either express or implied, including but not limited
24 * to the implied warranties of merchantability, fitness for a particular
25 * purpose, or non-infringement. SAMSUNG shall not be liable for any
26 * damages suffered by licensee as a result of using, modifying or
27 * distributing this software or its derivatives.
31 #ifndef SMS_PLUGIN_EVENT_HANDLER_H
32 #define SMS_PLUGIN_EVENT_HANDLER_H
35 /*==================================================================================================
37 ==================================================================================================*/
39 #include "MsgPluginInterface.h"
40 #include "SmsPluginTypes.h"
43 /*==================================================================================================
45 ==================================================================================================*/
46 class SmsPluginEventHandler
49 static SmsPluginEventHandler* instance();
51 void registerListener(MSG_PLUGIN_LISTENER_S *pListener);
52 void handleSentStatus(int TapiReqId, MSG_NETWORK_STATUS_T NetStatus);
53 void handleMsgIncoming(SMS_TPDU_S *pTpdu);
54 void handleSyncMLMsgIncoming(MSG_SYNCML_MESSAGE_TYPE_T msgType, char* pPushBody, int PushBodyLen, char* pWspHeader, int WspHeaderLen);
55 void handleLBSMsgIncoming(char* pPushHeader, char* pPushBody, int pushBodyLen);
56 void handleDftSms(MSG_FOLDER_ID_T FolderId, char* pNumber, char* pData);
58 MSG_ERROR_T callbackMsgIncoming(MSG_MESSAGE_INFO_S *pMsgInfo);
59 MSG_ERROR_T callbackInitSimBySat();
60 MSG_ERROR_T callbackStorageChange(MSG_STORAGE_CHANGE_TYPE_T storageChangeType, MSG_MESSAGE_INFO_S *pMsgInfo);
62 void SetSentInfo(SMS_SENT_INFO_S *pSentInfo);
64 void setDeviceStatus();
65 bool getDeviceStatus();
67 void convertTpduToMsginfo(SMS_TPDU_S *pTpdu, MSG_MESSAGE_INFO_S *msgInfo); // temp
70 SmsPluginEventHandler();
71 virtual ~SmsPluginEventHandler();
73 void convertSubmitTpduToMsginfo(const SMS_SUBMIT_S *pTpdu, MSG_MESSAGE_INFO_S *msgInfo);
74 void convertDeliverTpduToMsginfo(const SMS_DELIVER_S *pTpdu, MSG_MESSAGE_INFO_S *msgInfo);
75 void convertStatusRepTpduToMsginfo(const SMS_STATUS_REPORT_S *pTpdu, MSG_MESSAGE_INFO_S *msgInfo);
76 MSG_SUB_TYPE_T convertMsgSubType(SMS_PID_T pid);
78 static SmsPluginEventHandler* pInstance;
80 MSG_PLUGIN_LISTENER_S listener;
81 MSG_SIM_COUNT_S* pSimCnt;
82 SMS_SENT_INFO_S sentInfo;
90 #endif //SMS_PLUGIN_EVENT_HANDLER_H