Fixed the build error using gcc 13
[platform/core/messaging/msg-service.git] / plugin / sms_plugin / include / SmsPluginStorage.h
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved
3  *
4  * Licensed under the Apache License, Version 2.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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15 */
16
17 #ifndef SMS_PLUGIN_STORAGE_H
18 #define SMS_PLUGIN_STORAGE_H
19
20 /*==================================================================================================
21                                                                                 INCLUDE FILES
22 ==================================================================================================*/
23 #include <list>
24
25 #include "MsgStorageTypes.h"
26 #include "MsgInternalTypes.h"
27 #include "MsgSqliteWrapper.h"
28
29
30 /*==================================================================================================
31                                                                                 CLASS DEFINITIONS
32 ==================================================================================================*/
33 class SmsPluginStorage
34 {
35 public:
36         static SmsPluginStorage* instance();
37
38         msg_error_t updateSentMsg(MSG_MESSAGE_INFO_S *pMsgInfo, msg_network_status_t Status);
39
40         msg_error_t addSmsMessage(MSG_MESSAGE_INFO_S *pMsgInfo);
41         msg_error_t updateSmsMessage(MSG_MESSAGE_INFO_S *pMsgInfo);
42         msg_error_t deleteSmsMessage(msg_message_id_t msgId);
43         msg_error_t addSmsSendOption(MSG_MESSAGE_INFO_S *pMsg, MSG_SENDINGOPT_INFO_S *pSendOptInfo);
44
45         msg_error_t checkMessage(MSG_MESSAGE_INFO_S *pMsgInfo);
46         msg_error_t checkStorageStatus(MSG_MESSAGE_INFO_S *pMsgInfo);
47
48         msg_error_t deleteFailedIndex(MsgDbHandler *pDbHandle, msg_message_id_t msgId);
49         msg_error_t setFailedIndex(MsgDbHandler *pDbHandle, msg_message_id_t msgId, int failedIndex);
50         int getFailedIndex(MsgDbHandler *pDbHandle, msg_message_id_t msgId);
51         bool isDuplicatedCBMsg(MSG_MESSAGE_INFO_S *pMsgInfo);
52
53         msg_error_t getRegisteredPushEvent(char* pPushHeader, int *count, char *app_id, int app_id_len, char *content_type, int content_type_len);
54         msg_error_t getnthPushEvent(int index, int *appcode);
55         msg_error_t releasePushEvent();
56
57 private:
58         SmsPluginStorage() = default;
59         ~SmsPluginStorage() = default;
60
61         static SmsPluginStorage* pInstance;
62         std::list<PUSH_APPLICATION_INFO_S> pushAppInfoList;
63 };
64
65 #endif /* SMS_PLUGIN_STORAGE_H */