realtimenetprots/sipfw/ProfileAgent/Server/Src/sipprofilestateunregisteringoldiap.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        : sipprofilestateunregisteringoldiap.h
       
    16 * Part of     : Sip Profile Server
       
    17 * Interface   : private
       
    18 * Class provides functionality for registration state automaton
       
    19 * Version     : 1.0
       
    20 *
       
    21 */
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 /**
       
    27  @internalComponent
       
    28 */
       
    29 
       
    30 #ifndef CSIPPROFILERESTATEUNREGISTERINGOLDIAP_H
       
    31 #define CSIPPROFILERESTATEUNREGISTERINGOLDIAP_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 automaton
       
    45 *  "Unregistering old IAP" state.
       
    46 *  @lib 
       
    47 */
       
    48 class CSIPProfileStateUnregisteringOldIAP: public CSIPProfileState
       
    49 	{
       
    50    	public:  // Constructors and destructor
       
    51 
       
    52         /**
       
    53         * Two-phased constructor.
       
    54         */
       
    55         static CSIPProfileStateUnregisteringOldIAP*
       
    56         	NewL(CSIPPluginDirector& aDirector);
       
    57 
       
    58         /**
       
    59         * Destructor.
       
    60         */
       
    61         virtual ~CSIPProfileStateUnregisteringOldIAP();
       
    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 		TBool IsAlrState() const;
       
    84 
       
    85 		void ShutdownInitiated(CSIPProfileCacheItem& aItem);
       
    86 
       
    87     public: // New functions
       
    88 	
       
    89         /**
       
    90         * Sets next automaton states, ownership is not transferred
       
    91         * @param aRegistered Registered state
       
    92         * @param aUnregInProg Unregister in progress state
       
    93         */
       
    94 		void SetNeighbourStates(CSIPProfileState& aRegistered,
       
    95 								CSIPProfileState& aUnregInProg);
       
    96 
       
    97    private:
       
    98 
       
    99         /**
       
   100         * Constructor
       
   101         */
       
   102         CSIPProfileStateUnregisteringOldIAP(CSIPPluginDirector& aDirector);
       
   103 
       
   104 	private: // Data
       
   105 
       
   106 		// Neighbour states, not owned
       
   107 		CSIPProfileState* iRegistered;
       
   108 		CSIPProfileState* iUnregInProg;
       
   109 	};
       
   110 
       
   111 #endif // CSIPPROFILERESTATEUNREGISTERINGOLDIAP_H