Fix for 37448
[apps/osp/Call.git] / inc / CallPresentationModel.h
index da03c8e..6631416 100644 (file)
@@ -24,6 +24,7 @@
 #define _PHN_CALL_PRESENTATION_MODEL_H_
 
 #include <FApp.h>
+#include <FTelephony.h>
 #include "CallAppControlRequestMgr.h"
 #include "CallTypes.h"
 #include "CallITelephonyEventListener.h"
@@ -41,6 +42,8 @@ class SettingsPresentationModel;
  */
 class CallPresentationModel: public ITelephonyEventListener
                , public Tizen::App::IAppControlResponseListener
+               , public Tizen::Telephony::ITelephonyNetworkEventListener
+               , public Tizen::Telephony::ITelephonySimEventListener
 {
 public:
        //create a singleton instance
@@ -55,6 +58,11 @@ private:
        result Construct(void);
        static void CreateInstance(void);
        static void DestroyInstance(void);
+       //gets the sim info
+       result GetSimInfo(void);
+       //Used to check if sim is available
+       bool IsSimAvailable(void);
+       bool IfNumberEndsWithHash(Tizen::Base::String& contactNumber);
 
 public:
        //set the telephony event listener
@@ -159,6 +167,8 @@ public:
        //From IAppControlResponseListener
        virtual void OnAppControlCompleteResponseReceived(const Tizen::App::AppId& appId, const Tizen::Base::String& operationId, Tizen::App::AppCtrlResult appControlResult, const Tizen::Base::Collection::IMap* pExtraData);
        virtual void OnAppForeground(void);
+       virtual void OnTelephonyNetworkStatusChanged(const Tizen::Telephony::NetworkStatus& networkStatus);
+       virtual void OnTelephonySimStateChanged(Tizen::Telephony::SimState state);
 
 private:
        static CallPresentationModel* __pInstance;
@@ -172,6 +182,9 @@ private:
        bool __isDialAppControlRunning;
        //Used to manage AppControl requests.
        CallAppControlRequestMgr* __pAppControlMgr;
+       Tizen::Telephony::NetworkManager*       __pNetworkManager;
+       Tizen::Telephony::SimStateManager* __psimStateManager;
+       Tizen::Telephony::SimInfo*              __psimInfo;
 };
 
 #endif // _PHN_CALL_PRESENTATION_MODEL_H_