btservices_plat/obex_service_plugin_api/inc/SrcsInterface.h
branchRCL_3
changeset 56 9386f31cc85b
parent 55 613943a21004
child 61 269724087bed
equal deleted inserted replaced
55:613943a21004 56:9386f31cc85b
     1 /*
       
     2 * Copyright (c) 2002-2007 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:  Define obexserviceman's service controller ECom interface.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef _SRCSINTERFACE_
       
    21 #define _SRCSINTERFACE_
       
    22 
       
    23 
       
    24 //INCLUDES
       
    25 #include <e32base.h>
       
    26 #include <ecom/ecom.h>
       
    27 #include <badesca.h>
       
    28 
       
    29 // CONSTANTS
       
    30 const TUid KCSrcsInterfaceUid = {0x101F7C8C}; // UID of this interface
       
    31 
       
    32 
       
    33 enum TSrcsMediaType //transport media types
       
    34     {
       
    35         ESrcsMediaBT = 1,
       
    36         ESrcsMediaIrDA,
       
    37         ESrcsMediaUSB
       
    38     };
       
    39 
       
    40 /**
       
    41 *   An abstract class being representative of the
       
    42 *   concrete class which the client wishes to use.
       
    43 *
       
    44 *   It acts as a base, for a real class to provide all the
       
    45 *   functionality that a client requires.
       
    46 *   It supplies instantiation & destruction by using
       
    47 *   the ECom framework, and functional services
       
    48 *   by using the methods of the actual class.
       
    49 */
       
    50 class CSrcsInterface : public CBase
       
    51     {
       
    52 public:
       
    53 
       
    54     /**
       
    55     * Two-phased constructor.
       
    56     * @param aImplUid Implementation UId.
       
    57     * @return newly created CSrcsInterface.
       
    58     */
       
    59     static CSrcsInterface* NewL(TUid aImplUid);
       
    60 
       
    61     /**
       
    62     * Destructor
       
    63     */
       
    64     virtual ~CSrcsInterface();
       
    65 
       
    66     /** 
       
    67 	* Request a list of all available implementations which satisfies this given interface.
       
    68     * @param aImplInfoArray Implementation instance array.
       
    69     * @return none.
       
    70 	*/
       
    71     static void ListAllImplementationsL(RImplInfoPtrArray& aImplInfoArray);
       
    72 
       
    73     /** 
       
    74 	* Request a list of matching implementations which satisfies this given interface.
       
    75     * @param aMatchString	String to be matched by the implemention.
       
    76     * @param aImplInfoArray Implementation instance array.
       
    77     * @return none.
       
    78 	*/
       
    79     static void ListImplementationsL(const TDesC8& aMatchString, RImplInfoPtrArray& aImplInfoArray);
       
    80     
       
    81 
       
    82 	/** 
       
    83 	* Check if OBEX service is still active.
       
    84     * @return ETrue: OBEX service is still active.
       
    85 	*		  EFalse: OBEX service is inactive.
       
    86 	*/
       
    87 	virtual TBool IsOBEXActive() = 0;
       
    88 
       
    89 	/** 
       
    90 	* Provide transport media information to service controller.
       
    91 	* @param aMediaType	enum value specifying transport media type.
       
    92 	* @return none.
       
    93 	*/
       
    94 	virtual void SetMediaType( TSrcsMediaType aMediaType ) ;
       
    95 
       
    96 	/** 
       
    97 	* SetObexServer
       
    98 	* @param aObexServer pass obex server pointer to sevice controller
       
    99 	* @return none.
       
   100 	*/
       
   101 	virtual TInt SetObexServer( CObexServer* aObexServer );
       
   102 
       
   103 protected:
       
   104     /**
       
   105     * C++ default Constructor
       
   106     */
       
   107     inline CSrcsInterface();
       
   108 
       
   109 private:
       
   110     // Unique instance identifier key
       
   111     TUid iDtor_ID_Key;
       
   112     };
       
   113 
       
   114 #include "SrcsInterface.inl"
       
   115 
       
   116 #endif
       
   117