Add signed-off-by signature for submit request.
[platform/framework/native/telephony.git] / src / FTel_NetworkStatusImpl.cpp
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_NetworkStatusImpl.cpp
19  * @brief       This is the implementation file for _NetworkStatusImpl class.
20  */
21
22 #include <FTelNetworkStatus.h>
23 #include "FTel_NetworkStatusImpl.h"
24
25 namespace Tizen { namespace Telephony
26 {
27
28
29 _NetworkStatusImpl::_NetworkStatusImpl(void)
30         : __isRoaming(false)
31         , __isCallServiceAvailable(false)
32         , __isDataServiceAvailable(false)
33 {
34 }
35
36 _NetworkStatusImpl::~_NetworkStatusImpl(void)
37 {
38 }
39
40 _NetworkStatusImpl::_NetworkStatusImpl(const _NetworkStatusImpl& rhs)
41     : __isRoaming(rhs.__isRoaming)
42     , __isCallServiceAvailable(rhs.__isCallServiceAvailable)
43     , __isDataServiceAvailable(rhs.__isDataServiceAvailable)
44 {
45
46 }
47
48 bool
49 _NetworkStatusImpl::IsRoaming(void) const
50 {
51         return __isRoaming;
52 }
53
54 bool
55 _NetworkStatusImpl::IsCallServiceAvailable(void) const
56 {
57         return __isCallServiceAvailable;
58 }
59
60 bool
61 _NetworkStatusImpl::IsDataServiceAvailable(void) const
62 {
63         return __isDataServiceAvailable;
64 }
65
66 void
67 _NetworkStatusImpl::SetIsRoaming(bool isRoaming)
68 {
69         __isRoaming = isRoaming;
70 }
71
72 void
73 _NetworkStatusImpl::SetIsCallServiceAvailable(bool isCallServiceAvailable)
74 {
75         __isCallServiceAvailable = isCallServiceAvailable;
76 }
77
78 void
79 _NetworkStatusImpl::SetIsDataServiceAvailable(bool isDataServiceAvailable)
80 {
81         __isDataServiceAvailable = isDataServiceAvailable;
82 }
83
84 _NetworkStatusImpl*
85 _NetworkStatusImpl::GetInstance(NetworkStatus& networkStatus)
86 {
87         return networkStatus.__pNetworkStatusImpl;
88 }
89
90 const _NetworkStatusImpl*
91 _NetworkStatusImpl::GetInstance(const NetworkStatus& networkStatus)
92 {
93         return networkStatus.__pNetworkStatusImpl;
94 }
95
96 _NetworkStatusImpl&
97 _NetworkStatusImpl::operator =(const _NetworkStatusImpl& rhs)
98 {
99
100     if (this != &rhs)
101     {
102         __isRoaming = rhs.__isRoaming;
103         __isCallServiceAvailable = rhs.__isCallServiceAvailable;
104         __isDataServiceAvailable = rhs.__isDataServiceAvailable;
105     }
106
107    return *this;
108
109 }
110
111 }} // Tizen::Telephony