realtimenetprots/sipfw/ProfileAgent/profile_fsm/inc/sipprflregisterdelayrequestedstate.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        : sipprflregisterdelayrequestedstate.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 CSIPPRFLREGISTERDELAYREQUESTEDSTATE_H
       
    29 #define CSIPPRFLREGISTERDELAYREQUESTEDSTATE_H
       
    30 
       
    31 //  INCLUDES
       
    32 #include "sipprflstatebase.h"
       
    33 
       
    34 // FORWARD DECLARATIONS
       
    35 class MSIPProfileContext;
       
    36 
       
    37 // CLASS DECLARATION
       
    38 /**
       
    39 * Reacts to events that are possible in "Register Delay Requested" state. 
       
    40 * Profile is in this state when the registration is requested, 
       
    41 * but after a delay.
       
    42 */
       
    43 class CSIPPrflRegisterDelayRequestedState: public CSIPPrflStateBase
       
    44 	{
       
    45 	public:// Constructors and destructor
       
    46         /**
       
    47         * Two-phased constructor.
       
    48         * @param aUser user for the state machine
       
    49         */
       
    50 		IMPORT_C static CSIPPrflRegisterDelayRequestedState* NewL(
       
    51 		    MSIPProfileFSMUser& aUser);
       
    52 
       
    53 		/**
       
    54 		* Destructor
       
    55 		*/
       
    56 		IMPORT_C ~CSIPPrflRegisterDelayRequestedState();
       
    57 
       
    58 	public://new functions
       
    59 		/**
       
    60 		* Links states
       
    61 		* @param aInitState "Init" state
       
    62 		*/
       
    63 
       
    64 		IMPORT_C void LinkStates(CSIPPrflStateBase& aInitState);
       
    65 
       
    66 	public://functions from base class
       
    67 	
       
    68 	    CSIPConcreteProfile::TStatus ConcreteProfileState() const;
       
    69 	
       
    70 		/**
       
    71 		* Deregisters the profile. Moves profile to 
       
    72 		* "Init" state.
       
    73 		* @param aContext a profile context
       
    74 		*/
       
    75 		void DeregisterL(MSIPProfileContext& aContext);
       
    76 
       
    77 		/**
       
    78 		* Retry registration timer has expired. Moves profile
       
    79 		* to "Init"state.
       
    80 		* @param aContext a profile context
       
    81 		*/
       
    82 		void ChangeRegistrationStateL(MSIPProfileContext& aContext);
       
    83 		
       
    84 		/**
       
    85 		* Refreshes the connection.
       
    86 		* @param aContext a profile context
       
    87 		*/		
       
    88 		void RegisterL(MSIPProfileContext& aContext);
       
    89 		
       
    90 		/**
       
    91 		* Connection state has changed. Moves profile
       
    92 		* to "Init"state. Or
       
    93 		* In case of UnAvailable connection report error to client and move profile to "Init" state 
       
    94 		* @param aContext a profile context
       
    95 		* @param aState indicates the current connection state
       
    96 		*/
       
    97 		void ConnectionStateChanged(MSIPProfileContext& aContext,
       
    98 					CSIPConnection::TState aState);	
       
    99 
       
   100 
       
   101 
       
   102 	private:
       
   103 
       
   104 		CSIPPrflRegisterDelayRequestedState(MSIPProfileFSMUser& aUser);
       
   105 
       
   106 	private: // Data
       
   107 
       
   108 		CSIPPrflStateBase* iInitState;
       
   109 	};
       
   110 
       
   111 #endif // CSIPPRFLREGISTERDELAYREQUESTEDSTATE_H