Add '-D_SECURE_LOG'
[platform/framework/native/telephony.git] / src / FTel_NetworkInfoImpl.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  * @file  FTel_NetworkInfoImpl.h
19  * @brief This is the header file for the _NetworkInfoImpl class.
20  *
21  * This header file contains the declarations of the _NetworkInfoImpl Class.
22  */
23 #ifndef _FTEL_INTERNAL_NETWORK_INFO_IMPL_H_
24 #define _FTEL_INTERNAL_NETWORK_INFO_IMPL_H_
25
26
27 #include <FBaseObject.h>
28 #include <FBaseString.h>
29
30
31 namespace Tizen { namespace Telephony
32 {
33
34 class NetworkInfo;
35
36     /**
37      * @enum    NetworkType
38      *
39      * Defines the network type.
40      *
41      */
42     enum _NetworkType
43     {
44         _NETWORK_TYPE_UNDEFINED = -1,        /**< No define type */
45         _NETWORK_TYPE_GSM,                   /**< Available service is GSM  */
46         _NETWORK_TYPE_GPRS,                  /**< Available service is GPRS */
47         _NETWORK_TYPE_EGPRS,                 /**< Available service is EGPRS  */
48         _NETWORK_TYPE_PCS1900,               /**< Available service is PCS1900 */
49         _NETWORK_TYPE_UMTS,                  /**< Available service is UMTS  */
50         _NETWORK_TYPE_GSM_AND_UMTS,          /**< Available service is GSM and UMTS */
51         _NETWORK_TYPE_HSDPA,                 /**< Available service is HSDPA */
52         _NETWORK_TYPE_IS95A,                 /**< Available service is IS95A */
53         _NETWORK_TYPE_IS95B,                 /**< Available service is IS95B */
54         _NETWORK_TYPE_CDMA_1X,               /**< Available service is CDMA 1X(IS-2000) */
55         _NETWORK_TYPE_EVDO_REV_0,            /**< Available service is CDMA EV-DO rev0 */
56         _NETWORK_TYPE_CDMA_1X_AND_EVDO_REV_0,/**< Available service is CDMA 1X(IS-2000) and EV-DO rev0 */
57         _NETWORK_TYPE_EVDO_REV_A,            /**< Available service is EV-DO revA */
58         _NETWORK_TYPE_CDMA_1X_AND_EVDO_REV_A,/**< Available service is CDMA 1X(IS-2000) and EV-DO revA */
59         _NETWORK_TYPE_EVDV,                  /**< Available service is EV-DV */
60     };
61
62 class _NetworkInfoImpl
63         : public Tizen::Base::Object
64 {
65
66 public:
67         /**
68      * This is the default constructor for this class.
69      *
70      * @since 2.1
71      */
72         _NetworkInfoImpl(void);
73
74         /**
75      * This is the copy constructor for the _NetworkInfoImpl class.
76      *
77      * @since 2.1
78      *
79      * @param[in]   rhs   An instance of %_NetworkInfoImpl
80      */
81         _NetworkInfoImpl(const _NetworkInfoImpl& rhs);
82
83         /**
84      * This is the destructor for this class.
85      *
86      * @since 2.1
87      */
88         virtual ~_NetworkInfoImpl(void);
89
90     /**
91      * @see NetWorkInfo::GetCellId()
92      */
93     int GetCellId(void) const;
94
95     /**
96      * @see NetWorkInfo::GetLac()
97      */
98     int GetLac(void) const;
99
100     /**
101      * @see NetWorkInfo::GetMnc()
102      */
103         int GetMnc(void) const;
104
105         /**
106      * @see NetWorkInfo::GetMcc()
107      */
108         int GetMcc(void) const;
109
110         /**
111      * @see NetWorkInfo::GetPlmn()
112      */
113         Tizen::Base::String GetPlmn(void) const;
114
115     /**
116      * @see NetWorkInfo::GetOperatorName()
117      */
118     Tizen::Base::String GetOperatorName(void) const;
119
120     /**
121      * Gets the network type.
122      *
123      * @return  The network
124      */
125     _NetworkType GetNetworkType(void) const;
126
127         /**
128      * Checks whether the the specified instance of %_NetworkInfoImpl equals the current instance.
129      *
130      * @return   @c true if the specified instance equals the current instance, @n
131      *           else @c false
132      * @param[in]    rhs An instance of %_NetworkInfoImpl
133      * @remarks  The method returns @c false if the specified object is not %_NetworkInfoImpl.
134      */
135         virtual bool Equals(const Tizen::Base::Object& rhs) const;
136
137         /**
138      * Gets the hash value of the current instance.
139      *
140      * @return   The hash value of the current instance
141      */
142         virtual int GetHashCode(void) const;
143
144         /**
145      * @see NetWorkInfo::GetRssi()
146      */
147         static int GetRssi(void);
148
149
150     /**
151      * Sets the current cell ID.
152      *
153      * @param[in]   cellId   The current cell ID
154      */
155     void SetCellId(int cellId);
156
157     /**
158      * Sets the current Location Area Code (LAC).
159      *
160      * @param[in]   lac   The current Location Area Code (LAC)
161      */
162     void SetLac(int lac);
163
164     /**
165      * Sets the Mobile Network Code (MNC) of the network.
166      *
167      * @param[in]   mnc   The Mobile Network Code (MNC) of the network
168      */
169         void SetMnc(int mnc);
170
171         /**
172      * Sets the Mobile Country Code (MCC) of the network.
173      *
174      * @param[in]   mcc   Mobile Country Code (MCC) of the network
175      */
176         void SetMcc(int mcc);
177
178         /**
179      * Sets the Public Land Mobile Network (PLMN) string.
180      *
181      * @param[in]   plmn   The Public Land Mobile Network (PLMN) string
182      */
183         void SetPlmn(const Tizen::Base::String& plmn);
184
185     /**
186      * Sets the operator name.
187      *
188      * @param[in]   operatorName The operator name
189      */
190     void SetOperatorName(const Tizen::Base::String& operatorName);
191
192     /**
193      * Sets the network type.
194      *
195      * @param[in]   networkType   The network type
196      */
197     void SetNetworkType(_NetworkType networkType);
198
199         /**
200      * Gets the Impl instance.
201      *
202      * @since 2.1
203      * @return The pointer to _NetworkInfoImpl
204      * @param[in] networkInfo   An instance of NetworkInfo
205      */
206         static _NetworkInfoImpl* GetInstance(NetworkInfo& networkInfo);
207
208         /**
209      * Gets the Impl instance.
210      *
211      * @since 2.1
212      * @return The pointer to _NetworkInfoImpl
213      * @param[in] networkInfo   An instance of NetworkInfo
214      */
215         static const _NetworkInfoImpl* GetInstance(const NetworkInfo& networkInfo);
216
217         /**
218      * This assignment operator copies the values from the specified instance of %_NetworkInfoImpl to the calling
219      * instance of %_NetworkInfoImpl.
220      *
221      * @since 2.1
222      *
223      * @return      The reference of this instance
224      * @param[in]   rhs   A reference to the %_NetworkInfoImpl instance to be copied
225      */
226         _NetworkInfoImpl& operator=(const _NetworkInfoImpl& rhs);
227
228
229 private:
230     int __cellId;
231     int __lac;
232     int __mcc;
233     int __mnc;
234     Tizen::Base::String __plmn;
235     Tizen::Base::String __operatorName;
236
237     _NetworkType __networkType;
238
239 }; // _NetworkInfoImpl
240
241 }} // Tizen::Telephony
242 #endif // _FTEL_INTERNAL_NETWORK_INFO_IMPL_H_