realtimenetprots/sipfw/ProfileAgent/Server/Src/sipprofilestatemigratingtonewiap.h
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 /*
       
     2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 * Name        : sipprofilestatemigratingtonewiap.h
       
    16 * Part of     : Sip Profile Server
       
    17 * Interface   : private
       
    18 * Class provides functionality for registration state automation
       
    19 * Version     : 1.0
       
    20 *
       
    21 */
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 /**
       
    27  @internalComponent
       
    28 */
       
    29 
       
    30 #ifndef CSIPPROFILERESTATEMIGRATINGTONEWIAP_H
       
    31 #define CSIPPROFILERESTATEMIGRATINGTONEWIAP_H
       
    32 
       
    33 //  INCLUDES
       
    34 #include "sip.h"
       
    35 #include "SipProfileState.h"
       
    36 #include "sipconcreteprofile.h"
       
    37 #include <e32base.h>
       
    38 
       
    39 // FORWARD DECLARATIONS
       
    40 
       
    41 // CLASS DECLARATION
       
    42 
       
    43 /**
       
    44 *  Class provides functionality for profile state automation
       
    45 *  "Migrating to new IAP" state.
       
    46 *  @lib 
       
    47 */
       
    48 class CSIPProfileStateMigratingToNewIAP: public CSIPProfileState
       
    49 	{
       
    50    	public:  // Constructors and destructor
       
    51 
       
    52         /**
       
    53         * Two-phased constructor.
       
    54         */
       
    55         static CSIPProfileStateMigratingToNewIAP*
       
    56         	NewL(CSIPPluginDirector& aDirector);
       
    57 
       
    58         /**
       
    59         * Destructor.
       
    60         */
       
    61         virtual ~CSIPProfileStateMigratingToNewIAP();
       
    62 
       
    63 	public: // From CSIPProfileState
       
    64 
       
    65 		CSIPConcreteProfile::TStatus Name() const;
       
    66 
       
    67 		void EnableL(CSIPProfileCacheItem& aItem,
       
    68 					 const MSIPExtendedConcreteProfileObserver& aObserver);
       
    69 
       
    70 		void EnableSnapInUseL(CSIPProfileCacheItem& aItem,
       
    71 			const MSIPExtendedConcreteProfileObserver& aObserver,
       
    72 			TUint32 aSnapId);
       
    73 
       
    74 		void DisableL(CSIPProfileCacheItem& aItem,
       
    75 					  const MSIPExtendedConcreteProfileObserver& aObserver);
       
    76 
       
    77 		void RegistrationStatusEventL(
       
    78 			CSIPProfileCacheItem& aItem,
       
    79 			CSIPConcreteProfile::TStatus aStatus);
       
    80 
       
    81 		TBool ErrorOccurred(CSIPProfileCacheItem& aItem, TInt aError);
       
    82 
       
    83 		void IapAvailableL(CSIPProfileCacheItem& aItem,
       
    84 					       TUint32 aSnapId,
       
    85 						   TUint32 aNewIapId);
       
    86 
       
    87 		TBool IsAlrState() const;
       
    88 
       
    89 		void ShutdownInitiated(CSIPProfileCacheItem& aItem);
       
    90 
       
    91     public: // New functions
       
    92 	
       
    93         /**
       
    94         * Sets next automaton states, ownership is not transferred
       
    95         * @param aUnregisteringOldIAP Unregistering old IAP state
       
    96         * @param aWaitForIAP Wait for IAP state
       
    97         * @param aRegistered Registered state
       
    98         * @param aUnregInProg Unregistration in progress state
       
    99         * @param aUnregistered Unregistered state
       
   100         */
       
   101 		void SetNeighbourStates(CSIPProfileState& aUnregisteringOldIAP,
       
   102 								CSIPProfileState& aWaitForIAP,
       
   103 							    CSIPProfileState& aRegistered,
       
   104 							    CSIPProfileState& aUnregInProg,
       
   105 							    CSIPProfileState& aUnregistered); 		
       
   106 
       
   107    private:
       
   108 
       
   109         /**
       
   110         * Constructor
       
   111         */
       
   112         CSIPProfileStateMigratingToNewIAP(CSIPPluginDirector& aDirector);
       
   113 
       
   114 	private: // Data
       
   115 
       
   116 		// Neighbour states, not owned
       
   117 		CSIPProfileState* iUnregisteringOldIAP;
       
   118 		CSIPProfileState* iWaitForIAP;
       
   119 		CSIPProfileState* iRegistered;
       
   120 		CSIPProfileState* iUnregInProg;
       
   121 		CSIPProfileState* iUnregistered;
       
   122 	};
       
   123 
       
   124 #endif // CSIPPROFILERESTATEMIGRATINGTONEWIAP_H