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_SIMMSG_H
18 #define SMS_PLUGIN_SIMMSG_H
21 /*==================================================================================================
23 ==================================================================================================*/
26 #include "MsgStorageTypes.h"
27 #include "SmsPluginTypes.h"
28 #include "MsgInternalTypes.h"
32 #include <tapi_common.h>
34 #include <TapiUtility.h>
35 #include <ITapiNetText.h>
38 /*==================================================================================================
40 ==================================================================================================*/
44 static SmsPluginSimMsg* instance();
46 void initSimMessage();
47 msg_error_t saveSimMessage(const MSG_MESSAGE_INFO_S *pMsgInfo, SMS_SIM_ID_LIST_S *pSimIdList);
48 msg_error_t saveClass2Message(const MSG_MESSAGE_INFO_S *pMsgInfo);
49 void deleteSimMessage(msg_sim_id_t SimMsgId);
50 void getSimMessageList(MSG_SIM_MSG_INFO_LIST_S **ppSimMsgList);
51 void setReadStatus(msg_sim_id_t SimMsgId);
52 bool checkSimMsgFull(unsigned int SegCnt);
54 void setSimMsgCntEvent(const MSG_SIM_COUNT_S *pSimMsgCnt);
55 void setSimMsgEvent(const MSG_MESSAGE_INFO_S *pMsgInfo, bool bSuccess);
56 void setSaveSimMsgEvent(int simMsgId, int result);
57 void setSaveClass2MsgEvent(int simMsgId, int result);
58 void setSimEvent(msg_sim_id_t SimId, bool bResult);
60 void setSmsData(const char *sca, const char *szData, int msgLength);
66 void getSimMsgCount(MSG_SIM_COUNT_S *pSimMsgCnt);
67 bool getSimMsg(msg_sim_id_t SimMsgId, MSG_MESSAGE_INFO_S* pMsgInfo);
69 void setSmsOptions(SMS_DELIVER_S *pDeliver);
70 void convertTimeStamp(const MSG_MESSAGE_INFO_S* pMsgInfo, SMS_DELIVER_S *pDeliver);
72 bool getSimMsgCntEvent(MSG_SIM_COUNT_S *pSimMsgCnt);
73 bool getSimMsgEvent(MSG_MESSAGE_INFO_S *pMsgInfo);
74 bool getSimEvent(msg_sim_id_t *pSimId);
76 static SmsPluginSimMsg* pInstance;
78 msg_sim_id_t simMsgId;
80 MSG_SIM_COUNT_S simMsgCnt;
82 MSG_MESSAGE_INFO_S simMsgInfo;
85 unsigned int totalCnt;
89 SMS_DATA_INFO_S simMsgDataInfo;
95 #endif //SMS_PLUGIN_SIMMSG_H