2 // Tizen Web Device API
3 // Copyright (c) 2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
18 #ifndef __TIZEN_SYSTEMINFO_SYSTEMINFO_SIM_H__
19 #define __TIZEN_SYSTEMINFO_SYSTEMINFO_SIM_H__
25 #include "SystemInfoProperty.h"
28 namespace SystemInfo {
31 typedef std::shared_ptr<SystemInfoSIM> SystemInfoSIMPtr;
33 class SystemInfoSIM : public SystemInfoProperty {
35 SystemInfoSIM(TapiHandle *tapi_handle);
36 virtual ~SystemInfoSIM();
37 virtual bool isReady() const;
39 std::string getState() const;
40 std::string getOperatorName() const;
41 std::string getMsisdn() const;
42 std::string getIccid() const;
43 unsigned short getMcc() const;
44 unsigned short getMnc() const;
45 std::string getMsin() const;
46 std::string getSpn() const;
48 std::atomic_bool m_ready;
49 std::atomic<unsigned short> m_properties_to_process;
52 std::string m_operator_name;
60 * Decrement m_properties_to_process and if all properties are set,
61 * notify Systeminfo (in order to call js callback)
65 static void cphsValueCallback(TapiHandle *handle, int result, void *data, void *user_data);
66 static void msisdnValueCallback(TapiHandle *handle, int result, void *data, void *user_data);
67 static void iccidValueCallback(TapiHandle *handle, int result, void *data, void *user_data);
68 static void spnValueCallback(TapiHandle *handle, int result, void *data, void *user_data);
74 #endif //__TIZEN_SYSTEMINFO_SYSTEMINFO_SIM_H__