Add '-D_SECURE_LOG'
[platform/framework/native/telephony.git] / src / FTel_TelephonyUtility.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
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.
16 //
17
18 /**
19  * @file    FTel_TelephonyUtility.h
20  * @brief   This is the header file for the %_TelephonyUtility class.
21  *
22  * This header file contains the declarations of the %_TelephonyUtility class.
23  */
24
25 #ifndef _FTEL_INTERNAL_TELEPHONY_UTILITY_H_
26 #define _FTEL_INTERNAL_TELEPHONY_UTILITY_H_
27
28 #include <net_connection.h>
29 #include <TelNetwork.h>
30 #include "FTel_NetworkInfoImpl.h"
31
32 namespace Tizen { namespace Base
33 {
34 class String;
35 }}
36
37 namespace Tizen { namespace Telephony
38 {
39
40 static const int _HASH_CODE_INITIAL_VALUE = 17;
41 static const int _HASH_CODE_COEFFICIENT_VALUE = 37;
42
43 struct _ConnectionDeleter
44 {
45     void operator()(void* pConnection)
46     {
47         connection_destroy(pConnection);
48     }
49 };
50
51 struct _CharDeleter
52 {
53     void operator()(char* pChar)
54     {
55         free(pChar);
56     }
57 };
58
59 class _TelephonyUtility
60 {
61 public:
62     /**
63      * Converts TelNetworkSystemType_t to _NetworkType Type
64      *
65      * @return      The network type
66      * @param[in]   networkSystem   network system type
67      */
68     static _NetworkType ConvertNetworkType(TelNetworkSystemType_t networkSystemType);
69
70     /**
71      * Converts _NetworkType to TelNetworkSystemType_t Type
72      *
73      * @return      The network type
74      * @param[in]   networkSystem   network type
75      */
76     static TelNetworkSystemType_t ConvertNetworkType(_NetworkType networkType);
77
78     static result ConvertErrorType(int error);
79
80     static void GetMccMncFromPlmn(const Tizen::Base::String& plmn, int& mcc, int& mnc);
81
82
83 private:
84     /**
85      * This default constructor is intentionally declared as private because this class cannot be constructed.
86      */
87     _TelephonyUtility(void);
88
89     /**
90      * This destructor is intentionally declared as private because this class cannot be constructed.
91      */
92     virtual ~_TelephonyUtility(void);
93
94 }; // _TelephonyUtility
95
96 } }  // Tizen::Telephony
97 #endif // _FTEL_INTERNAL_TELEPHONY_UTILITY_H_
98