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 setSimEvent(msg_sim_id_t SimId, bool bResult);
62 void getSimMsgCount(MSG_SIM_COUNT_S *pSimMsgCnt);
63 bool getSimMsg(msg_sim_id_t SimMsgId, MSG_MESSAGE_INFO_S* pMsgInfo);
65 void setSmsOptions(SMS_DELIVER_S *pDeliver);
66 void convertTimeStamp(const MSG_MESSAGE_INFO_S* pMsgInfo, SMS_DELIVER_S *pDeliver);
68 bool getSimMsgCntEvent(MSG_SIM_COUNT_S *pSimMsgCnt);
69 bool getSimMsgEvent(MSG_MESSAGE_INFO_S *pMsgInfo);
70 bool getSimEvent(msg_sim_id_t *pSimId);
72 static SmsPluginSimMsg* pInstance;
74 msg_sim_id_t simMsgId;
76 MSG_SIM_COUNT_S simMsgCnt;
78 MSG_MESSAGE_INFO_S simMsgInfo;
81 unsigned int totalCnt;
90 #endif //SMS_PLUGIN_SIMMSG_H