Fixed the build error using gcc 13
[platform/core/messaging/msg-service.git] / plugin / sms_plugin / include / SmsPluginDSHandler.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_DS_HANDLER_H
18 #define SMS_PLUGIN_DS_HANDLER_H
19
20 /*==================================================================================================
21                                                                                         INCLUDE FILES
22 ==================================================================================================*/
23 #include <map>
24 #include <vector>
25 #include <tapi_common.h>
26
27 #include "SmsPluginTypes.h"
28
29 /*==================================================================================================
30                                                                                         CLASS DEFINITIONS
31 ==================================================================================================*/
32 class SmsPluginDSHandler
33 {
34 public:
35         enum HandleType {
36                 H_3GPP,
37                 H_3GPP2
38         };
39
40         static SmsPluginDSHandler* instance();
41
42         int initTelHandle();
43         void deinitTelHandle();
44
45         TapiHandle *getTelHandle(int simIndex);
46         int getSimIndex(TapiHandle *handle);
47         int getTelHandleCount();
48         int getActiveSimCount();
49         void getDefaultNetworkSimId(int *simIndex);
50         msg_error_t getSubscriberId(int simIndex, char **subscriber_id);
51
52
53         int getSmsFormat(TapiHandle *handle);
54         void setSmsFormat(TapiHandle *handle, int smsFormat);
55
56         bool getNeedToInitializeSim(TapiHandle *handle);
57         void setNeedToInitializeSim(TapiHandle *handle, bool needToInitialize);
58
59         HandleType getHandleType(TapiHandle *handle);
60
61 private:
62         SmsPluginDSHandler() = default;
63         ~SmsPluginDSHandler() = default;
64
65         static SmsPluginDSHandler* pInstance;
66         std::vector<std::pair<TapiHandle *, HandleType>> tapiHandles;
67         std::map<TapiHandle *, int> smsFormatInfo;
68         std::map<TapiHandle *, bool> _needToInitializeSim;
69 };
70
71 #endif /* SMS_PLUGIN_DS_HANDLER_H */