2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://floralicense.org/license/
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 * @file CallSettingsManager.h
19 * @brief This is the header file for the %SettingsManager class.
21 * This header file contains the declarations for %SettingsManager class.
23 #ifndef _PHN_SETTINGS_MANAGER_H_
24 #define _PHN_SETTINGS_MANAGER_H_
29 #include <FSysSettingInfo.h>
30 #include "ITapiCall.h"
32 #include "tapi_common.h"
33 #include "TapiUtility.h"
37 #include "CallRejectInfo.h"
38 #include "CallISettingsEventListener.h"
39 #include "CallSettingsConstants.h"
40 #include "CallSettingDataService.h"
43 * @class SettingsManager
44 * @brief This class provides functionality to set and fetch settings related to voice call, e.g. Call barring,
45 * call forwarding, etc.
48 : public Tizen::System::ISettingEventListener
51 //create a singleton instance
52 static SettingsManager* GetInstance(void);
56 SettingsManager(void);
57 SettingsManager(SettingsManager& manager);
58 SettingsManager& operator =(const SettingsManager& manager);
60 result Construct(void);
61 static void CreateInstance(void);
62 static void DestroyInstance(void);
65 // Add the observer for setting events
66 void AddSettingEventListener(ISettingsEventListener* pSettingsEventListener);
67 //remove the observer for setting events
68 void RemoveSettingEventListener(ISettingsEventListener* pSettingsEventListener);
69 // Get the reject message list
70 Tizen::Base::Collection::IMapT<int,Tizen::Base::String>* GetRejectMessageListN(void);
71 // Get the reject "unknown" status
72 bool GetUnknownRejectStatus(void);
73 // checks if the call is to be rejected
74 bool IsCallToBeRejected(Tizen::Base::String& phoneNumber);
76 result SetCallState(CallState callState);
78 void AddSystemEventListener(void);
80 void RemoveSystemEventListener(void);
82 virtual void OnSettingChanged(Tizen::Base::String& key);
84 bool GetFlightModeStatus(void);
88 enum ForwardResponseType
90 SET_CALLFORWARD_RESPONSE,
91 GET_CALLFORWARD_RESPONSE,
93 enum BarringResponseType
95 SET_CALLBARRING_RESPONSE,
96 GET_CALLBARRING_RESPONSE,
98 enum WaitingResponseType
100 SET_CALLWAITING_RESPONSE,
101 GET_CALLWAITING_RESPONSE,
104 virtual ~SettingsManager(void);
105 //notify event listeners for Setting or Getting Call Forwarding status events.
106 void NotifyForwardingEventListeners(ForwardResponseType responseType, bool isCallSuccessful, CallForwardCondition callFwdCondition, const Tizen::Base::String& callFwdNumber, bool isCallForwardActivated, int noReplyWaitTime);
107 //notify event listeners for Setting or Getting Call Barring status events.
108 void NotifyBarringEventListeners(BarringResponseType responseType, bool isCallSuccessful, CallBarringType callBarringType, bool isBarringActivated);
109 //notify event listeners for Setting or Getting Call Waiting status events.
110 void NotifyWaitingEventListeners(WaitingResponseType responseType, bool isCallSuccessful, bool isCallWaitingActivated);
113 static SettingsManager* __pInstance;
114 //handle to Telephony API
115 TapiHandle* __pTapiHandle;
116 Tizen::Base::Collection::ArrayListT<ISettingsEventListener*>* __pSettingsEventListener;
117 CallSettingDataService* __pCallSettingDataService;
120 #endif // _PHN_SETTINGS_MANAGER_H_