imsrv_plat/ximp_core_feature_plugin_api/inc/protocoldatahost.h
changeset 0 e6b17d312c8b
equal deleted inserted replaced
-1:000000000000 0:e6b17d312c8b
       
     1 /*
       
     2 * Copyright (c) 2006 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:  interface for protocol hosts
       
    15  *
       
    16 */
       
    17 
       
    18 #ifndef MPROTOCOLDATAHOST_H
       
    19 #define MPROTOCOLDATAHOST_H
       
    20 
       
    21 #include <ximpbase.h>
       
    22 #include <ximpfeaturepluginifids.hrh>
       
    23 #include <e32std.h>
       
    24 #include <ecom/ecom.h>
       
    25 
       
    26 class MXIMPHost;
       
    27 
       
    28 /**
       
    29  * protocol host.
       
    30  *
       
    31  * @lib ximpprocessor.lib
       
    32  * @since S60 v3.2
       
    33  */
       
    34 class MProtocolDataHost 
       
    35 
       
    36     {
       
    37 public:
       
    38 
       
    39     enum { KInterfaceId = XIMP_ECOM_IF_UID_PROTOCOL_DATA_HOST_INTERFACE };
       
    40 
       
    41     
       
    42 public:
       
    43 
       
    44     /**
       
    45      * Factory method to instantiate MImFeatures.
       
    46      *
       
    47      * Factory method to instantiate platform default
       
    48      * MXIMPClient implementation through the ECom.
       
    49      * If the default Feature isn't supported
       
    50      * in the platform, leaves with errorcode signalled
       
    51      * from ECom.
       
    52      *
       
    53      * @return The new protocol client object. Object
       
    54      *         ownership is returned to caller.
       
    55      */
       
    56     static inline MProtocolDataHost* NewL( MXIMPHost& aHost );
       
    57     
       
    58     static inline MProtocolDataHost* NewL(TUid aImpid, MXIMPHost& aHost );
       
    59 
       
    60     /**
       
    61      * Public destructor.
       
    62      * Objects can be deleted through this interface.
       
    63      */
       
    64     virtual inline ~MProtocolDataHost();
       
    65     
       
    66     /**
       
    67      * To get list of all plugins which implements this interface
       
    68      */
       
    69     inline static void ListAllImplementationsL(RImplInfoPtrArray& aImplInfoArray) ;
       
    70     
       
    71     /**
       
    72      * This allows hosts to set themselves to protocol plugins 
       
    73      */
       
    74     virtual void SetHostToProtocol() = 0 ;
       
    75 
       
    76     /**
       
    77      * To get the host object pointer of this interface id
       
    78      */
       
    79     virtual TAny* GetInterface(TInt aInterfaceId) = 0;
       
    80     
       
    81     /**
       
    82      * Hosts can return the clean up id, to create cleanup operation
       
    83      */
       
    84     virtual TInt GetCleanupOperation() = 0;
       
    85     
       
    86 protected:
       
    87 
       
    88     /**
       
    89      * Default constructor to zero initialize
       
    90      * the iEcomDtorID member.
       
    91      */
       
    92     inline MProtocolDataHost();
       
    93  
       
    94 private: // Data
       
    95 
       
    96     //OWN: ECom destructor ID
       
    97     TUid iEcomDtorID;
       
    98     };
       
    99 
       
   100 #include <protocoldatahost.inl> 
       
   101     
       
   102 
       
   103 #endif // MPROTOCOLDATAHOST_H
       
   104