bafb1b7b7ec393d213087d12df148ec1078f1fab
[platform/framework/native/telephony.git] / src / FTel_TelephonyIpcProxy.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_TelephonyIpcProxy.h
20  * @brief       This is the header file for the %_TelephonyIpcProxy class.
21  *
22  * This header file contains the declarations of the %_TelephonyIpcProxy class.
23  */
24
25 #ifndef _FNET_WIFI_INTERNAL_TELEPHONY_IPC_PROXY_H_
26 #define _FNET_WIFI_INTERNAL_TELEPHONY_IPC_PROXY_H_
27
28 #include <tapi_type.h>
29 #include <FBaseObject.h>
30 #include <FIo_IpcCommonDataTypes.h>
31 #include <FIo_IIpcClientEventListener.h>
32
33 namespace Tizen { namespace Base {
34 class String;
35 } }
36
37 namespace Tizen { namespace Io {
38 class _IpcClient;
39 } }
40
41 namespace Tizen { namespace Telephony
42 {
43
44 class _NetworkManagerImpl;
45 class _CallManagerImpl;
46
47 /**
48  * @class   _TelephonyIpcProxy
49  * @brief   This class represents an IPC proxy for %Telephony service.
50  *
51  * This class represents an IPC proxy for %Telephony service to communicate with OSP Connectivity daemon.
52  */
53 class _TelephonyIpcProxy
54         : public Tizen::Base::Object
55         , public Tizen::Io::_IIpcClientEventListener
56 {
57 public:
58
59     // from _IIpcClientEventListener
60     virtual void OnIpcResponseReceived(Tizen::Io::_IpcClient& client, const IPC::Message& message);
61
62         result Construct(void);
63         result GetImsi(Tizen::Base::String& imsi) const;
64         result HasSystemPrivilege(void);
65         result GetNetworkSelectionMode(_NetworkManagerImpl* pNetworkManagerImpl);
66         result SelectNetwork(_NetworkManagerImpl* pNetworkManagerImpl, const Tizen::Base::String& plmn, const int netwokrType);
67     result SelectNetwork(_NetworkManagerImpl* pNetworkManagerImpl);
68     result SearchNetwork(_NetworkManagerImpl* pNetworkManagerImpl);
69
70         result HasCallForwardPrivilege(void);
71     result RequestCallForward(_CallManagerImpl* pCallManagerImpl, const Tizen::Base::String& phoneNumber);
72     result StopCallForward(_CallManagerImpl* pCallManagerImpl);
73     result GetCallForwardNumber(_CallManagerImpl* pCallManagerImpl);
74
75     static _TelephonyIpcProxy* GetInstance(void);
76
77 private:
78         _TelephonyIpcProxy(void);
79         virtual ~_TelephonyIpcProxy(void);
80
81
82         _TelephonyIpcProxy(const _TelephonyIpcProxy& value);
83         _TelephonyIpcProxy& operator =(const _TelephonyIpcProxy& rhs);
84
85         void OnNetworkSelectionModeReceived(bool isManual, unsigned long res);
86         void OnNetworkSelectionCompleted(unsigned long res);
87         void OnNetworkSearchCompleted(Tizen::Base::String message, unsigned long res);
88
89         void OnTelephonyCallForwardNumberReceived(Tizen::Base::String phoneNumber, unsigned long res);
90         void OnTelephonyCallForwardResponseReceived(Tizen::Base::String phoneNumber, unsigned long res);
91         void OnTelephonyCallForwardStopped(Tizen::Base::String phoneNumber, unsigned long res);
92
93         static void InitSingleton(void);
94         
95 private:
96         Tizen::Io::_IpcClient* __pIpcClient;
97         _NetworkManagerImpl* __pNetworkManagerImplForGet;
98         _NetworkManagerImpl* __pNetworkManagerImplForSelect;
99         _NetworkManagerImpl* __pNetworkManagerImplForSearch;
100         _CallManagerImpl* __pCallManagerImplForGet;
101         _CallManagerImpl* __pCallManagerImplForStart;
102         _CallManagerImpl* __pCallManagerImplForStop;
103         static _TelephonyIpcProxy* __pInstance;
104
105 }; // _TelephonyIpcProxy
106
107 }}
108 #endif // _FNET_WIFI_INTERNAL_TELEPHONY_IPC_PROXY_H_