multimediacommsengine/tsrc/MCETestUI/MCETestUIPlugin/inc/MCETestUIPlugin.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2002-2004 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:    MCETestUIPlugin interface
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef CMCETestUIPLUGIN_H
       
    22 #define CMCETestUIPLUGIN_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include <apgcli.h>
       
    26 #include <e32base.h>
       
    27 #include <ECom/ImplementationProxy.h>
       
    28 #include "SIPResolvedClient.h"
       
    29 #include "SIPContentTypeHeader.h"
       
    30 
       
    31 /**
       
    32 *  Implementation API for SIP Client Resolver.
       
    33 *  Routes incoming MCETestUI calls to MMCE
       
    34 *
       
    35 *  @lib
       
    36 *  @since Series
       
    37 */
       
    38 class CMCETestUIPlugin : CSIPResolvedClient
       
    39     {
       
    40     public:  // Constructors and destructor
       
    41         
       
    42         /**
       
    43         * Two-phased constructor.
       
    44         */
       
    45         static CMCETestUIPlugin* NewL();
       
    46         
       
    47         /**
       
    48         * Destructor.
       
    49         */
       
    50         virtual ~CMCETestUIPlugin();
       
    51 
       
    52     public: // Functions from base classes
       
    53 
       
    54        	/**
       
    55 		* Returns the SIP client's channel UID that indicates client's
       
    56 		* channel UID for connection with SIP e.g. CSIP::NewL()
       
    57 		* @param aMethod the method of the SIP request
       
    58         * @param aRequestUri the request-URI of the SIP request
       
    59         * @param aHeaders all the headers in the SIP request
       
    60         * @param aContent SIP request body; zero-length descriptor if not present
       
    61         * @param aContentType the content-type of the SIP request. 
       
    62         *        Zero-pointer if body is not present.
       
    63 		* @return SIP client's communication channel's UID
       
    64 		*/
       
    65 		virtual TUid ChannelL(RStringF aMethod,
       
    66                               const TDesC8& aRequestUri,
       
    67                               const RPointerArray<CSIPHeaderBase>& aHeaders,
       
    68                               const TDesC8& aContent,
       
    69                               const CSIPContentTypeHeader* aContentType=0);
       
    70 
       
    71 		/**
       
    72 		* Requests the client to connect to SIP with resolved
       
    73 		* UID in case there's no connection with resolved channel UID.
       
    74 		* @param aUid previously resolved channel UID
       
    75 		* @leave KErrNoMemory if out of memory
       
    76 		* @leave KErrNotFound in case non-existing channel UID was provided
       
    77 		*/
       
    78 		virtual void ConnectL(TUid aUid);
       
    79 
       
    80 		/**
       
    81 		* Requests the implementation to provide capabilities in XML format
       
    82 		* in case they were not defined in the ECOM resource file. The cabablities
       
    83 		* to be returned must be defined according to the same DTD.
       
    84 		* This function will be invoked only if the capabilities are not
       
    85 		* defined in the ECOM resource file.
       
    86 		*/
       
    87 		virtual const TDesC8& Capabilities();
       
    88 
       
    89 
       
    90     private:
       
    91 
       
    92         /**
       
    93         * C++ default constructor.
       
    94         */
       
    95         CMCETestUIPlugin();
       
    96 
       
    97         /**
       
    98         * By default Symbian 2nd phase constructor is private.
       
    99         */
       
   100         void ConstructL();
       
   101         
       
   102 		// Needed for cleanup of a RImplInfoPtrArray:
       
   103 		static void ResetAndDestroy( TAny* anArray );
       
   104 
       
   105 		void RefreshCapabilitiesL();
       
   106 
       
   107     private:    // Data
       
   108 
       
   109 	    // MCETestUIPlugin's application UID        
       
   110     	TUid iApplicationUID;
       
   111     	
       
   112     	HBufC8* iCapabilitiesFromFile;
       
   113     };
       
   114 
       
   115 #endif      // CMCETestUIPlugin_H   
       
   116             
       
   117 // End of File
       
   118