telephonyserverplugins/simtsy/inc/CSimPhone.h
branchRCL_3
changeset 14 7ef16719d8cb
parent 0 3553901f7fa8
child 24 6638e7f4bd8f
--- a/telephonyserverplugins/simtsy/inc/CSimPhone.h	Fri Feb 19 23:59:33 2010 +0200
+++ b/telephonyserverplugins/simtsy/inc/CSimPhone.h	Fri Mar 12 15:49:38 2010 +0200
@@ -197,7 +197,7 @@
 	inline RPhone::TMode Mode() const {return iMode; }
 
 	RMobilePhone::TMobilePhoneNetworkMode NetworkMode();
-	void ResetTestNumber();
+	void SetTestNumberAndReadConfigurationFileL();
 
 	// Methods added to allow indicator object to retrieve information
 	// from other objects owned by the phone
@@ -217,6 +217,10 @@
 	TInt CheckSimTsyVersion(RMobilePhone::CImsAuthorizationInfoV5& aDataStruct);
 	TInt CheckSimTsyVersion(RPacketContext::CTFTMediaAuthorizationV3& aDataStruct);
 	
+	// Callback function invoked by the observer object
+	void HandleTestNumberChangedL();
+	TInt CheckConfigFile();
+	
 protected:
 	void ConstructL();
 
@@ -253,6 +257,7 @@
 	TInt CopyServiceTable(RMobilePhone::TMobilePhoneServiceTableV1* aFrom, RMobilePhone::TMobilePhoneServiceTableV1* aTo);
 	TInt CopyServiceTableV8(RMobilePhone::TMobilePhoneServiceTableV8* aFrom, RMobilePhone::TMobilePhoneServiceTableV8* aTo);
 
+	void ReadConfigurationFileL();
 	TInt NotifyModeChange(const TTsyReqHandle aTsyReqHandle, RMobilePhone::TMobilePhoneNetworkMode* aCaps);
 	TInt NotifyModeChangeCancel(const TTsyReqHandle aTsyReqHandle);
 
@@ -296,6 +301,7 @@
 	CSimONStore*								iONStore;
 	
 	CTestConfig*             					iConfigFile;        //< Pointer to the Configuration file reader
+	CTestConfigSection*                         iConfigSection;     //< Pointer to the Configuration section for current test. 
 	TBuf8<KMaxName>          					iSectionName;
 	CSimSat*                 					iSat;               //< Pointer to the Sat object
 	CSimPacketService*       					iPacketService;     //< Pointer to the Packet object
@@ -365,7 +371,31 @@
 		CSimPhone *iPhone;
 		TTsyReqHandle iHandle;
 		};
-	CSetCallProcessingSuspendStateTimerCallBack iTimerCallBackSetCallProcessingSuspendState;
+	
+	// Observer class monitoring test number property
+	NONSHARABLE_CLASS(CSimTestNumberObserver) : public CActive
+	    {
+	public:
+	    static CSimTestNumberObserver* NewL(CSimPhone& aSimPhone);
+	    virtual ~CSimTestNumberObserver();
+	        
+	private:    // methods from CActive
+	    virtual void RunL();
+	    virtual void DoCancel();
+	        
+	private:
+	    CSimTestNumberObserver(CSimPhone& aSimPhone);
+	    void ConstructL();
+	    void Start();
+	    
+	private:
+	    CSimPhone& iSimPhone;   // Reference to sim phone object (owner object)
+	    RProperty iProperty;   // Property describing the event we require notification of
+	    };
+	
+private:
+    CSetCallProcessingSuspendStateTimerCallBack iTimerCallBackSetCallProcessingSuspendState;
+    CSimTestNumberObserver* iTestNumberObserver; 
 	};
 
 #endif