simpledatamodeladapter/inc/presenceplugin.h
branchRCL_3
changeset 35 fbd2e7cec7ef
parent 0 c8caa15ef882
equal deleted inserted replaced
34:2669f8761a99 35:fbd2e7cec7ef
       
     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:  IETF SIMPLE Protocol implementation for XIMP Framework
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPRESENCEPLUGIN_H
       
    20 #define CPRESENCEPLUGIN_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <ximpprotocolpluginbase.h>
       
    24 
       
    25 #include "presencelogger.h"
       
    26 
       
    27 class CPresencePluginConnection;
       
    28 class MXIMPProtocolConnection;
       
    29 class MXIMPServiceInfo;
       
    30 class CPresenceConnectionInfo;
       
    31 
       
    32 /**
       
    33  * CPresencePlugin
       
    34  *
       
    35  * Implementation of CXIMPProtocolPluginBase
       
    36  *
       
    37  * @lib presenceplugin.dll
       
    38  * @since S60 v3.2
       
    39  */
       
    40 NONSHARABLE_CLASS( CPresencePlugin ) : public CXIMPProtocolPluginBase
       
    41     {
       
    42     public:
       
    43     
       
    44          /**
       
    45          * Two-phased constructor.
       
    46          *
       
    47          * @param none
       
    48          */
       
    49         static CPresencePlugin* NewL();
       
    50         
       
    51         /**
       
    52          * Two-phased constructor.
       
    53          *
       
    54 		 * @param none
       
    55          */
       
    56         static CPresencePlugin* NewLC();
       
    57 
       
    58         /**
       
    59          * Standard C++ destructor
       
    60          */
       
    61         ~CPresencePlugin();
       
    62     
       
    63     private:
       
    64     
       
    65         /**
       
    66          * Standard C++ constructor
       
    67          */   
       
    68         CPresencePlugin();
       
    69         
       
    70         /**
       
    71          * Delete connection from arrays
       
    72          * @param TInt aIndex, array index
       
    73          * @return none
       
    74          */  
       
    75         void DeleteConnection( TInt aIndex );
       
    76                 
       
    77     public: // from base class MXIMPProtocolPlugin
       
    78 
       
    79         /**
       
    80          * Defined in a base class
       
    81          */ 
       
    82         void PrimeHost( MXIMPProtocolPluginHost& aHost );
       
    83         
       
    84         /**
       
    85          * Defined in a base class
       
    86          */ 
       
    87         MXIMPProtocolConnection& AcquireConnectionL(
       
    88             const MXIMPServiceInfo& aService,
       
    89             const MXIMPContextClientInfo& aContextClient );
       
    90                      
       
    91         /**
       
    92          * Defined in a base class
       
    93          */                 
       
    94         void ReleaseConnection( MXIMPProtocolConnection& aConnection );
       
    95         
       
    96     public: // from base class MXIMPBase
       
    97 
       
    98         /**
       
    99          * Defined in a base class
       
   100          */ 
       
   101         TAny* GetInterface(
       
   102             TInt32 aInterfaceId,
       
   103             TIfGetOps aOps );
       
   104 
       
   105         /**
       
   106          * Defined in a base class
       
   107          */ 
       
   108         const TAny* GetInterface(
       
   109             TInt32 aInterfaceId,
       
   110             TIfGetOps aOps ) const;
       
   111 
       
   112         /**
       
   113          * Defined in a base class
       
   114          */ 
       
   115         TInt32 GetInterfaceId() const;
       
   116         
       
   117     private: // Data
       
   118         
       
   119         /**
       
   120          * Prime host
       
   121          * Own.
       
   122          */
       
   123         MXIMPProtocolPluginHost* iHost;
       
   124         
       
   125         /**
       
   126          * connection array
       
   127          * Own.
       
   128          */
       
   129         RPointerArray< CPresencePluginConnection > iConnections;
       
   130         
       
   131         /**
       
   132          * connection data array
       
   133          * Own.
       
   134          */
       
   135         RPointerArray< CPresenceConnectionInfo > iConnectionArray;
       
   136         
       
   137         SIMPLE_UNIT_TEST( T_CPresencePlugin )
       
   138         
       
   139     };
       
   140 #endif // CPRESENCEPLUGIN_H