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_CBMSG_HANDLER_H
32 #define SMS_PLUGIN_CBMSG_HANDLER_H
35 /*==================================================================================================
37 ==================================================================================================*/
43 #include "SmsPluginTypes.h"
47 #ifndef _TAPI_NETTEXT_H_
48 #include "ITapiNetText.h"
49 // #include "ITapi_common.h"
54 /*==================================================================================================
56 ==================================================================================================*/
57 typedef map<unsigned char, string> cbPageMap;
60 typedef struct _CB_PAGE_INFO_S
62 unsigned char geoScope;
63 unsigned char updateNum;
64 unsigned short msgCode;
66 unsigned char totalPages;
68 unsigned char pageCnt;
69 unsigned int totalSize;
74 /*==================================================================================================
76 ==================================================================================================*/
77 class SmsPluginCbMsgHandler
80 static SmsPluginCbMsgHandler* instance();
82 void handleCbMsg(TelSmsCbMsg_t *pCbMsg);
85 SmsPluginCbMsgHandler();
86 virtual ~SmsPluginCbMsgHandler();
88 static SmsPluginCbMsgHandler* pInstance;
90 void Decode2gCbMsg(TelSmsCbMsg_t *pCbMsg, SMS_CBMSG_PAGE_S *pCbPage);
91 void Decode3gCbMsg(TelSmsCbMsg_t *pCbMsg, SMS_CBMSG_PAGE_S *pCbPage);
93 bool checkCbOpt(SMS_CBMSG_PAGE_S CbPage, bool *pJavaMsg);
94 unsigned char checkCbPage(SMS_CBMSG_PAGE_S CbPage);
95 void MakeCbMsg(SMS_CBMSG_PAGE_S CbPage, SMS_CBMSG_S *pCbMsg);
96 void convertCbMsgToMsginfo(SMS_CBMSG_S cbMsg, MSG_MESSAGE_INFO_S *pMsgInfo);
97 void addToPageLiat(SMS_CBMSG_PAGE_S CbPage);
98 void removeFromPageList(SMS_CBMSG_PAGE_S CbPage);
100 void decodeCbMsgDCS(unsigned char dcsData, const unsigned char *pMsgData, SMS_CBMSG_DCS_S* pDcs);
101 void convertLangType(SMS_CBMSG_LANG_TYPE_T InType , MSG_CB_LANGUAGE_TYPE_T *pOutType);
102 unsigned long getRecvTime();
103 void getDisplayName(unsigned short MsgId, char *pDisplayName);
105 vector<CB_PAGE_INFO_S> pageList;
108 #endif //SMS_PLUGIN_CBMSG_HANDLER_H