2 * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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_DS_HANDLER_H
18 #define SMS_PLUGIN_DS_HANDLER_H
20 /*==================================================================================================
22 ==================================================================================================*/
25 #include <tapi_common.h>
27 #include "SmsPluginTypes.h"
29 /*==================================================================================================
31 ==================================================================================================*/
32 class SmsPluginDSHandler
40 static SmsPluginDSHandler* instance();
43 void deinitTelHandle();
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);
53 int getSmsFormat(TapiHandle *handle);
54 void setSmsFormat(TapiHandle *handle, int smsFormat);
56 bool getNeedToInitializeSim(TapiHandle *handle);
57 void setNeedToInitializeSim(TapiHandle *handle, bool needToInitialize);
59 HandleType getHandleType(TapiHandle *handle);
62 SmsPluginDSHandler() = default;
63 ~SmsPluginDSHandler() = default;
65 static SmsPluginDSHandler* pInstance;
66 std::vector<std::pair<TapiHandle *, HandleType>> tapiHandles;
67 std::map<TapiHandle *, int> smsFormatInfo;
68 std::map<TapiHandle *, bool> _needToInitializeSim;
71 #endif /* SMS_PLUGIN_DS_HANDLER_H */