realtimenetprots/sipfw/ClientResolver/Client/api/sipclientdiscoveryobserver.h
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     1 /*
       
     2 * Copyright (c) 2004-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        : sipclientdiscoveryobserver.h
       
    16 * Part of     : SIP Client Discovery API
       
    17 * Interface   : 
       
    18 * Version     : 1.0
       
    19 *
       
    20 */
       
    21 
       
    22 
       
    23 
       
    24 #ifndef MSIPCLIENTDISCOVERYOBSERVER_H
       
    25 #define MSIPCLIENTDISCOVERYOBSERVER_H
       
    26 
       
    27 #include <e32base.h>
       
    28 #include <stringpool.h>
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class CSIPHeaderBase;
       
    32 
       
    33 // CLASS DECLARATION
       
    34 /**
       
    35 * @publishedPartner
       
    36 * @released
       
    37 *
       
    38 * An observer that must be realized by the user in order to
       
    39 * receive events about resolved clients' communication channels
       
    40 * or occurred errors.
       
    41 * @lib n/a
       
    42 */
       
    43 class MSIPClientDiscoveryObserver
       
    44 	{
       
    45      public: // New functions
       
    46      
       
    47 		/**
       
    48 		* Channel UID was resolved for the SIP request
       
    49 		*
       
    50 		* @param aChannel a channel UID to which the SIP request
       
    51 		*		 must be routed
       
    52 		* @param aRequestId a request ID
       
    53         */
       
    54 		virtual void ChannelResolvedL(TUid aChannel,
       
    55 		                              TUint32 aRequestId) = 0;
       
    56 
       
    57 		/**
       
    58 		* The client channel UID was not found.
       
    59         * The implementation of this callback should generate 
       
    60         * a SIP response with the provided elements and send it to network.
       
    61 		*
       
    62 		* @param aRequestId a request ID
       
    63 		* @param aStatusCode contains a SIP response status code
       
    64         *        for the SIP response that should be generated.
       
    65 		* @param aReasonPhrase contains a SIP response reason phrase
       
    66         *        for the SIP response that should be generated.
       
    67 		* @param aHeaders contains well-formed optional SIP headers 
       
    68         *        that include additional information why the client 
       
    69         *        could not be found. For example Accept-headers that describe
       
    70         *        the content-types currently supported. 
       
    71         *        The ownership is transferred.
       
    72         * @param aContent the body of the response. NULL if not present.
       
    73         *          The ownership is transferred.
       
    74 		*/
       
    75 		virtual void ClientNotFoundL(TUint32 aRequestId,
       
    76 								     TUint aStatusCode, 
       
    77 								     RStringF aReasonPhrase, 
       
    78 								     RPointerArray<CSIPHeaderBase> aHeaders,
       
    79 								     HBufC8* aContent) = 0;
       
    80 
       
    81 		/**
       
    82 		* Error occurred during resolution of the client's channel UID.
       
    83         * This callback will also be called if one of the callbacks 
       
    84         * ChannelResolvedL or ClientNotFoundL leaves using the leave code.
       
    85 		*
       
    86 		* @param aError error code.
       
    87 		* @param aRequestId a request ID 
       
    88 		*/
       
    89 		virtual void ErrorOccurred(TInt aError,
       
    90 								   TUint32 aRequestId) =0;		
       
    91 	};
       
    92 
       
    93 #endif // MSIPCLIENTDISCOVERYOBSERVER_H