update tizen source
[framework/messaging/msg-service.git] / plugin / sms_plugin / include / SmsPluginStorage.h
1 /*
2 *
3 * Copyright (c) 2000-2012 Samsung Electronics Co., Ltd. All Rights Reserved.
4 *
5 * This file is part of msg-service.
6 *
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>
13 *
14 * PROPRIETARY/CONFIDENTIAL
15 *
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.
21 *
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.
28 *
29 */
30
31 #ifndef SMS_PLUGIN_STORAGE_H
32 #define SMS_PLUGIN_STORAGE_H
33
34
35 /*==================================================================================================
36                                          INCLUDE FILES
37 ==================================================================================================*/
38 #include "MsgMutex.h"
39
40 #include "MsgStorageTypes.h"
41 #include "SmsPluginTypes.h"
42 #include "MsgInternalTypes.h"
43 #include "MsgSqliteWrapper.h"
44
45 extern "C"
46 {
47 #ifndef _TAPI_NETTEXT_H_
48         #include "ITapiNetText.h"
49         #include "ITapiSim.h"
50 #endif
51 }
52
53 /*==================================================================================================
54                                      CLASS DEFINITIONS
55 ==================================================================================================*/
56 class SmsPluginStorage
57 {
58 public:
59         static SmsPluginStorage* instance();
60
61         MSG_ERROR_T updateSentMsg(MSG_MESSAGE_INFO_S *pMsgInfo, MSG_NETWORK_STATUS_T Status);
62
63         MSG_ERROR_T addSimMessage(MSG_MESSAGE_INFO_S *pSimMsgInfo);
64
65         MSG_ERROR_T addMessage(MSG_MESSAGE_INFO_S *pMsgInfo);
66         MSG_ERROR_T addSmsMessage(MSG_MESSAGE_INFO_S *pMsgInfo);
67
68         MSG_ERROR_T deleteSmsMessage(MSG_MESSAGE_ID_T MsgId);
69
70 private:
71         SmsPluginStorage();
72         ~SmsPluginStorage();
73
74         MSG_ERROR_T updateSmsMessage(MSG_MESSAGE_INFO_S *pMsgInfo);
75
76         MSG_ERROR_T addCbMessage(MSG_MESSAGE_INFO_S *pMsgInfo);
77         MSG_ERROR_T addReplaceTypeMsg(MSG_MESSAGE_INFO_S *pMsgInfo);
78         MSG_ERROR_T addWAPMessage(MSG_MESSAGE_INFO_S *pMsgInfo);
79         MSG_ERROR_T handleCOWAPMessage(MSG_MESSAGE_INFO_S *pMsgInfo);
80         MSG_ERROR_T checkPushMsgValidation(MSG_PUSH_MESSAGE_S *pPushMsg, bool *pbProceed);
81
82         MSG_ERROR_T checkStorageStatus(MSG_MESSAGE_INFO_S *pMsgInfo);
83         MSG_ERROR_T updateAllAddress();
84
85         static SmsPluginStorage* pInstance;
86
87         MsgDbHandler dbHandle;
88
89 };
90
91 #endif //SMS_PLUGIN_STORAGE_H
92