realtimenetprots/sipfw/SIP/TransactionUser/inc/UserAgentBase.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          : UserAgentBase.h
       
    16 * Part of       : TransactionUser
       
    17 * Version       : SIP/5.0
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 /**
       
    25  @internalComponent
       
    26 */
       
    27 
       
    28 
       
    29 #ifndef USERAGENTBASE_H
       
    30 #define USERAGENTBASE_H
       
    31 
       
    32 #include "SipStackServerDefs.h"
       
    33 
       
    34 #include "TransactionReceiver.h"
       
    35 
       
    36 
       
    37 
       
    38 /**
       
    39  * This class provides access to UserAgent objects, as needed by Transaction
       
    40  * subsystem.
       
    41  */
       
    42 class CUserAgentBase :
       
    43     public CBase,
       
    44 	public MTransactionReceiver	
       
    45 	{
       
    46 public: // Destructor
       
    47 
       
    48 	virtual ~CUserAgentBase() {}
       
    49 	
       
    50 public:	// From MTransactionReceiver
       
    51 
       
    52 	virtual void ReceiveL(CSIPRequest* aRequest) = 0;
       
    53 
       
    54 	virtual void ReceiveL(CSIPResponse* aResponse) = 0;
       
    55 
       
    56 	virtual void LeaveOccurred(TInt aReason) = 0;
       
    57 
       
    58 	virtual const TSIPTransportParams& TransportParams() const = 0;
       
    59 
       
    60 	virtual void IcmpErrorL(const TInetAddr& aAddress,
       
    61 							CSipConnectionMgr::TICMPError aError) = 0;
       
    62 
       
    63 public: // New functions
       
    64 
       
    65 	/**
       
    66 	 * The CTransaction owned by UA, has reached terminated state.
       
    67 	 *
       
    68 	 * @param aReason Reason why the transaction ends.
       
    69 	 */
       
    70 	virtual void TransactionEndsL(TInt aReason) = 0;
       
    71 
       
    72 	/**
       
    73 	 * The UA state machine is stopped and its information is removed from
       
    74 	 * CTransactionStore. No more events will be passed to the state machine.
       
    75 	 * CUserAgent and CTransaction will be deleted soon.
       
    76 	 *
       
    77 	 * @param aReason Reason why the UserAgent ends.
       
    78 	 */
       
    79 	virtual void Stop(TInt aReason) = 0;
       
    80 
       
    81 	/**
       
    82 	 * Obtains the TransactionId associated with the UA.
       
    83 	 *
       
    84 	 * @return value TransactionId
       
    85 	 */
       
    86 	virtual TTransactionId TransactionId() const = 0;
       
    87 	};
       
    88 
       
    89 #endif // end of USERAGENTBASE_H
       
    90 
       
    91 // End of File