2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.1 (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 CallSettingsPresentationModel.h
19 * @brief This is the header file for the %SettingsPresentationModel class.
21 * This header file contains the declarations for %SettingsPresentationModel class.
23 #ifndef _PHN_SETTINGS_PRESENTATION_MODEL_H_
24 #define _PHN_SETTINGS_PRESENTATION_MODEL_H_
27 #include "CallISettingsEventListener.h"
29 class SettingsManager;
34 * @class SettingsPresentationModel
35 * @brief This class provides data to settings forms and provides functions
36 * to interact with Settings manager.
39 class SettingsPresentationModel: public ISettingsEventListener
42 //create a singleton instance
43 static SettingsPresentationModel* GetInstance(void);
46 SettingsPresentationModel(void);
47 SettingsPresentationModel(SettingsPresentationModel& presentor);
48 virtual ~SettingsPresentationModel(void);
49 SettingsPresentationModel& operator =(const SettingsPresentationModel& presentor);
51 //perform 2nd phase initialization
52 result Construct(void);
53 static void CreateInstance(void);
54 static void DestroyInstance(void);
57 // Add the observer for setting events
58 result AddSettingEventListener(ISettingsEventListener* pSettingsEventListener);
59 //remove the observer for setting events
60 void RemoveSettingEventListener(void);
61 // Get the reject message list
62 Tizen::Base::Collection::IMapT<int,Tizen::Base::String>* GetRejectMessageListN(void);
63 // checks if the call is to be rejected
64 bool IsCallToBeRejected(Tizen::Base::String& phoneNumber);
66 result SetCallState(CallState callState);
67 //Get Flight mode status
68 bool GetFlightModeStatus(void);
71 //From ISettingsEventListener
72 virtual void HandleGetCallWaitingResponse(bool isCallSuccessful, bool callWaitingActivated);
73 virtual void HandleSetCallWaitingResponse(bool isCallSuccessful, bool isCallWaitingEnabled);
74 virtual void HandleGetCallForwardResponse(bool isCallSuccessful, CallForwardCondition callFwdCondition, const Tizen::Base::String& callFwdNumber, bool callForwardActivated, int noReplyWaitTime);
75 virtual void HandleSetCallForwardResponse(bool isCallSuccessful, CallForwardCondition callFwdCondition, const Tizen::Base::String& callFwdNumber, bool isCallForwardActivated, int noReplyWaitTime);
76 virtual void HandleGetCallBarringResponse(bool isCallSuccessful, CallBarringType callBarringType, bool isBarringActivated);
77 virtual void HandleSetCallBarringResponse(bool isCallSuccessful, CallBarringType callBarringType, bool isBarringActivated);
78 virtual void HandleFlightMode(bool isFlightModeActivated);
81 static SettingsPresentationModel* __pInstance;
82 //Owned. Is responsible for destroying the instance
83 SettingsManager* __pSettingsMgr;
84 ISettingsEventListener* __pSettingsEventListener;
87 #endif // _PHN_SETTINGS_PRESENTATION_MODEL_H_