realtimenetprots/sipfw/ProfileAgent/Server/Src/sipalrmigrationcontroller.h
branchRCL_3
changeset 41 f54bfd820e04
parent 0 307788aac0a8
child 56 2c7192069824
equal deleted inserted replaced
40:654ed625511d 41:f54bfd820e04
    56             EMostRecentIap = 0
    56             EMostRecentIap = 0
    57             };
    57             };
    58 
    58 
    59 	public:
    59 	public:
    60     	static CSipAlrMigrationController* NewLC(CSipAlrMonitor& aAlrMonitor,
    60     	static CSipAlrMigrationController* NewLC(CSipAlrMonitor& aAlrMonitor,
    61     											 TUint32 aSnapId);
    61                              TSipSNAPConfigurationData aSnapData);
    62 
    62 
    63     	~CSipAlrMigrationController();
    63     	~CSipAlrMigrationController();
    64 
    64 
    65 	public: // From MSipAlrObserver
    65 	public: // From MSipAlrObserver
    66 
    66 
    69 					  TUint32 aIapId);
    69 					  TUint32 aIapId);
    70 
    70 
    71     public: // New functions
    71     public: // New functions
    72 
    72 
    73 		TUint32 SnapId() const;
    73 		TUint32 SnapId() const;
       
    74 		
       
    75 		TUint32 BearerId() const;
    74 
    76 
    75 		/**
    77 		/**
    76         * Check if any profile is using this instance.
    78         * Check if any profile is using this instance.
    77         * @return ETrue At least one profile is using this migration controller
    79         * @return ETrue At least one profile is using this migration controller
    78         *		  EFalse otherwise
    80         *		  EFalse otherwise
   114 
   116 
   115 		TInt SetIapAcceptance(MSipAlrMigrationObserver& aObserver,
   117 		TInt SetIapAcceptance(MSipAlrMigrationObserver& aObserver,
   116 							  TBool aIapWorks);
   118 							  TBool aIapWorks);
   117 							  
   119 							  
   118 		void ResetFlags();
   120 		void ResetFlags();
       
   121 		
       
   122 		
   119 
   123 
   120 	private: // Constructors
   124 	private: // Constructors
   121 
   125 
   122 	    CSipAlrMigrationController(CSipAlrMonitor& aAlrMonitor,
   126 	    CSipAlrMigrationController(CSipAlrMonitor& aAlrMonitor,
   123 	    						   TUint32 aSnapId);
   127                                     TSipSNAPConfigurationData aSnapData);
   124 
   128 
   125     private: // New functions
   129     private: // New functions
   126 
   130 
   127 		void SendMigrationResult(TUint32 aIapId, TBool aAllowed);
   131 		void SendMigrationResult(TUint32 aIapId, TBool aAllowed);
   128 
   132 
   141 		// Not owned
   145 		// Not owned
   142     	CSipAlrMonitor& iAlrMonitor;
   146     	CSipAlrMonitor& iAlrMonitor;
   143 
   147 
   144 		RArray<TSipAlrMigrationObserverInfo> iObservers;
   148 		RArray<TSipAlrMigrationObserverInfo> iObservers;
   145 
   149 
   146 		// SNAP id that is monitored. Does not change.
       
   147 		const TUint32 iSnapId;
       
   148 
       
   149 		// The IAP id, that was most recently offered to observers with
   150 		// The IAP id, that was most recently offered to observers with
   150 		// MSipAlrMigrationObserver::IapAvailableL.
   151 		// MSipAlrMigrationObserver::IapAvailableL.
   151 		TUint32 iOfferedIapId;
   152 		TUint32 iOfferedIapId;
   152 
   153 
   153 		// Most recent IAP id, where the migration was allowed.
   154 		// Most recent IAP id, where the migration was allowed.
   161 		// ETrue if CSipAlrMonitor has been requested to refresh the IAP
   162 		// ETrue if CSipAlrMonitor has been requested to refresh the IAP
   162 		// availability.
   163 		// availability.
   163 		// Will be set to EFalse, when ALR monitor notifies about IAP, using
   164 		// Will be set to EFalse, when ALR monitor notifies about IAP, using
   164 		// MSipAlrObserver::IapAvailable.
   165 		// MSipAlrObserver::IapAvailable.
   165 		TBool iRefreshIssued;
   166 		TBool iRefreshIssued;
       
   167 		
       
   168 		// This contains the SNAP ID and the Bearer ID configured for the SNAP.
       
   169 		TSipSNAPConfigurationData iSnapData;
   166 
   170 
   167     private: // For testing purposes		
   171     private: // For testing purposes		
   168 #ifdef CPPUNIT_TEST
   172 #ifdef CPPUNIT_TEST
   169 		friend class CSipAlrMigrationControllerTest;    
   173 		friend class CSipAlrMigrationControllerTest;    
   170         friend class CSIPProfileAlrTest;
   174         friend class CSIPProfileAlrTest;