realtimenetprots/sipfw/ProfileAgent/profile_fsm/inc/sipprofilecontext.h
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 /*
       
     2 * Copyright (c) 2006-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        : sipprofilecontext.h
       
    16 * Part of     : SIP / SIP Profile Agent / SIP Profile FSM 
       
    17 * Version     : %version: 2.1.1 %
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 /**
       
    25  @internalComponent
       
    26 */
       
    27 
       
    28 
       
    29 #ifndef MSIPPROFILECONTEXT_H
       
    30 #define MSIPPROFILECONTEXT_H
       
    31 
       
    32 //  INCLUDES
       
    33 #include <e32base.h>
       
    34 #include "sipconnection.h"
       
    35 
       
    36 // FORWARD DECLARATIONS
       
    37 class CSIPConcreteProfile;
       
    38 class CSIPRegistrationBinding;
       
    39 class CSIPClientTransaction;
       
    40 class CSIPPrflStateBase;
       
    41 class CSIPMessageElements;
       
    42 class MSIPProfileAgentObserver;
       
    43 
       
    44 
       
    45 // CLASS DECLARATION
       
    46 /**
       
    47 * The interfaces to be implemented for SIP Profile FSM
       
    48 * client. The interface provides functions for requesting
       
    49 * needed information and setting information in the particular state.
       
    50 */
       
    51 class MSIPProfileContext
       
    52 	{
       
    53     public: // Enumerations
       
    54         
       
    55         /** Profile states */
       
    56         enum TSIPProfileState
       
    57             {
       
    58             /** profile is in init state*/
       
    59             EInit=1,
       
    60             /** registration was requested for this profile*/
       
    61             ERegisterRequested,
       
    62             /** registration is in progress for the profile*/
       
    63             ERegistrationInProgress,
       
    64             /** profile is registered */
       
    65             ERegistered,
       
    66             /** deregistration was requested for this profile*/
       
    67             EDeregisterRequested,
       
    68             /** deregistration is in progress for this profile*/
       
    69             EDeregistrationInProgress,
       
    70             /** resolving of proxy address is in progress for this profile*/
       
    71             EProxyResolvingInProgress,
       
    72             /** the profile is waiting for registration retry timer to expire*/
       
    73             EDelayedRegisterRequested
       
    74             };	
       
    75 	
       
    76 	public:
       
    77 	
       
    78 		/**
       
    79 		* Gets the connection
       
    80 		* @return the connection
       
    81 		*/
       
    82 		virtual const CSIPConnection& Connection() const = 0;
       
    83 		
       
    84 		/**
       
    85 		* Gets the registration
       
    86 		* @return the registration; the ownership is not transfered
       
    87 		*/
       
    88 		virtual CSIPRegistrationBinding* Registration() = 0;
       
    89 
       
    90 		/**
       
    91 		* Sets next state
       
    92 		* @param aState a next state
       
    93 		*/
       
    94 		virtual void SetNextState(CSIPPrflStateBase& aState) = 0;
       
    95 
       
    96 		/**
       
    97 		* Removes http digest configuration, deletes
       
    98 		* the transaction and sets profile pointer to zero
       
    99 		*/
       
   100 		virtual void ForgetProfile() =0;
       
   101 
       
   102 		/**
       
   103 		* Sets the transaction; zero-pointer resets the transaction.
       
   104 		* @param aTransaction a transaction; the ownership is transfered
       
   105 		*/
       
   106 		virtual void SetTransaction(CSIPClientTransaction* aTransaction) = 0;
       
   107 
       
   108 		/**
       
   109 		* Gets profile, the ownership is not transfered
       
   110 		* @return profile
       
   111 		*/
       
   112 		virtual CSIPConcreteProfile* Profile() = 0;
       
   113 
       
   114 		/**
       
   115 		* Gets profile agent observer
       
   116 		* @return profile agent observer
       
   117 		*/
       
   118 		virtual MSIPProfileAgentObserver& AgentObserver() const = 0;
       
   119 
       
   120 		/**
       
   121 		* Destroys registration object
       
   122 		*/
       
   123 		virtual void DestroyRegistration() = 0;
       
   124 
       
   125 		/**
       
   126 		* creates a registration object
       
   127 		*/
       
   128 		virtual void CreateRegistrationL() = 0;
       
   129 
       
   130 		/**
       
   131 		* creates Message Elements for initial REGISTER
       
   132 		*/
       
   133 		virtual CSIPMessageElements* CreateMsgElementsLC() = 0;
       
   134 		
       
   135 		/**
       
   136 		* creates Message Elements for de-REGISTER
       
   137 		*/
       
   138 		virtual CSIPMessageElements* CreateDeRegisterElementsL() = 0;
       
   139 
       
   140 		/**
       
   141 		* sets the profile 
       
   142 		*/
       
   143 		virtual void SetProfile(CSIPConcreteProfile* aProfile) = 0;
       
   144 		
       
   145 		/**
       
   146 		* updates SIP stack with new Contact header parameters
       
   147 		* @param aNewProfile a new profile
       
   148 		*/
       
   149 		virtual void UpdateContactHeaderParamsL(
       
   150 		    CSIPConcreteProfile& aNewProfile) = 0;
       
   151 		    
       
   152 		/**
       
   153 		* Sets the registered AORs for the profile
       
   154 		* @return KErrNone, if succesfully set, otherwise an error.
       
   155 		*/
       
   156 		virtual TInt SetRegisteredAORs() = 0;	
       
   157 		
       
   158 		virtual TBool RetryAfterTimer() = 0;
       
   159 		
       
   160 		virtual TBool RetryTimerInUse() = 0;
       
   161 		
       
   162 		virtual void RetryRegistration() = 0;
       
   163 		
       
   164 		virtual void RemoveDeltaTimerEntry() = 0;
       
   165 		
       
   166 		virtual TBool IsProxyResolvingEnabled() const = 0;
       
   167 		
       
   168 		virtual TBool ProxiesAlreadyResolved() = 0;
       
   169 		
       
   170 		virtual void ResolveProxyL() = 0;
       
   171 
       
   172         virtual void HandleProxyResolvingError(TInt aError) = 0;
       
   173         
       
   174         virtual void SetProxiesL(MDesC8Array& aProxies) = 0;
       
   175         
       
   176         virtual void CancelProxyResolving() = 0;
       
   177         
       
   178         virtual void SetNegotiatedSecurityMechanismL() = 0;
       
   179 		
       
   180 		virtual void ResetNegotiatedSecurityMechanismL() = 0;
       
   181 	};
       
   182 
       
   183 #endif // MSIPPROFILECONTEXT_H
       
   184