realtimenetprots/sipfw/ProfileAgent/profile_fsm/inc/sipprflregisterrequestedstate.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        : sipprflregisterrequestedstate.h
       
    16 * Part of     : sip profile fsm
       
    17 * Version     : %version: 2.1.1 %
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 /**
       
    25  @internalComponent
       
    26 */
       
    27 
       
    28 #ifndef CSIPPRFLREGISTERREQUESTEDSTATE_H
       
    29 #define CSIPPRFLREGISTERREQUESTEDSTATE_H
       
    30 
       
    31 //  INCLUDES
       
    32 #include "sipprflstatebase.h"
       
    33 
       
    34 
       
    35 // FORWARD DECLARATIONS
       
    36 class MSIPProfileContext;
       
    37 
       
    38 // CLASS DECLARATION
       
    39 /**
       
    40 * Reacts to events that are possible in 
       
    41 * "Register Requested" state. Profile is in this state 
       
    42 * when the registration is requested but connection state
       
    43 * is suspended.
       
    44 */
       
    45 class CSIPPrflRegisterRequestedState: public CSIPPrflStateBase
       
    46 	{
       
    47 	public:// Constructors and destructor
       
    48         /**
       
    49         * Two-phased constructor.
       
    50         * @param aUser user for the state machine
       
    51         */
       
    52 		IMPORT_C static CSIPPrflRegisterRequestedState* NewL(
       
    53 		    MSIPProfileFSMUser& aUser);
       
    54 
       
    55 		/**
       
    56 		* Destructor
       
    57 		*/
       
    58 		IMPORT_C ~CSIPPrflRegisterRequestedState();
       
    59 
       
    60 	public://new functions
       
    61 		/**
       
    62 		* Links states
       
    63 		* @param aInitState "Init"-state
       
    64 		* @param aResolvingProxiesState "Resolving Proxies"-state
       
    65 		* @param aRegistrationInProgressState "Registration In Progress"-state
       
    66 		*/
       
    67 
       
    68 		IMPORT_C void LinkStates(
       
    69 		    CSIPPrflStateBase& aInitState,
       
    70 		    CSIPPrflStateBase& aResolvingProxiesState,
       
    71 		    CSIPPrflStateBase& aRegistrationInProgressState);
       
    72 
       
    73 	public://functions from base class
       
    74 	
       
    75 	    CSIPConcreteProfile::TStatus ConcreteProfileState() const;
       
    76 	
       
    77 		/**
       
    78 		* Deregisters the profile. Moves profile to 
       
    79 		* "Init" state.
       
    80 		* @param aContext a profile context
       
    81 		*/
       
    82 		void DeregisterL(
       
    83 			MSIPProfileContext& aContext);
       
    84 
       
    85 		/**
       
    86 		* Connection state has changed. Moves profile
       
    87 		* to "Registration In Progress" or "Init" state according
       
    88 		* to the connection state Or
       
    89 		* In case of UnAvailable connection report error to client and move profile to "Init" state 
       
    90 		* @param aContext a profile context
       
    91 		* @param aState indicates the current connection state
       
    92 		*/
       
    93 		void ConnectionStateChanged(
       
    94 			MSIPProfileContext& aContext,
       
    95 			CSIPConnection::TState aState);	
       
    96 
       
    97 		/**
       
    98 		* Refreshes the connection.
       
    99 		* @param aContext a profile context
       
   100 		*/		
       
   101 		void RegisterL(
       
   102 					MSIPProfileContext& aContext);
       
   103 
       
   104 	private:
       
   105 
       
   106 		CSIPPrflRegisterRequestedState(MSIPProfileFSMUser& aUser);
       
   107 
       
   108 	private: // Data
       
   109 
       
   110 		CSIPPrflStateBase* iInit;
       
   111 		CSIPPrflStateBase* iResolvingProxies;
       
   112         CSIPPrflStateBase* iRegistrationInProgress;
       
   113 	};
       
   114 
       
   115 #endif // CSIPPRFLREGISTERREQUESTEDSTATE_H
       
   116