srsf/vcommandexecutorbearer/inc/nssvcexecutorbearerimpl.h
branchRCL_3
changeset 19 e36f3802f733
parent 0 bf1d17376201
equal deleted inserted replaced
18:cad71a31b7fc 19:e36f3802f733
       
     1 /*
       
     2 * Copyright (c) 2005 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 *       Declaration of class NssVCExecutorBearer.
       
    16 *       
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef __NSSVCEXECUTORBEARERIMPL_H__
       
    22 #define __NSSVCEXECUTORBEARERIMPL_H__
       
    23 
       
    24 // INCLUDE
       
    25 #include <e32base.h>
       
    26 #include <c32comm.h>
       
    27 #include <remcon/remconbearerplugin.h>
       
    28 #include <remcon/remconbearerinterface.h>
       
    29 #include <remcon/messagetype.h>
       
    30 
       
    31 //CONSTANTS
       
    32 const TInt KDataBufferSize = 10;
       
    33 
       
    34 /**
       
    35 *  NssVCExecutorBearer
       
    36 *     Implementation of the Rem Con Bearer Plugin
       
    37 *  @lib Nssvcexecutorbearer.dll
       
    38 *  @since 3.0
       
    39 */
       
    40 class NssVCExecutorBearer : public CRemConBearerPlugin,
       
    41                      public MRemConBearerInterface
       
    42     {
       
    43     public:
       
    44         /**
       
    45         * Creates instance of the NssVCExecutorBearer class.
       
    46         *
       
    47         * @param  TBearerParams: required for the CRemConBearerPlugin
       
    48         * @return : Instance of the NssVCExecutorBearer
       
    49         */
       
    50         static NssVCExecutorBearer* NewL(TBearerParams& aParams);
       
    51 
       
    52         /**
       
    53         * Destructor.
       
    54         */    
       
    55         virtual ~NssVCExecutorBearer();
       
    56 
       
    57     private:  // constructors
       
    58         /**
       
    59         * default constructor.
       
    60         * @param aParams: BearerPlugin Params
       
    61         */
       
    62         NssVCExecutorBearer(TBearerParams& aParams);
       
    63         
       
    64         /**
       
    65         * Two - phase construction.
       
    66         */
       
    67         void ConstructL();
       
    68 
       
    69     private: // from CRemConBearerPlugin
       
    70         /** @see CRemConBearerPlugin::GetInterface() */
       
    71     	TAny* GetInterface(TUid aUid);
       
    72 
       
    73     private: // from MRemConBearerInterface
       
    74     
       
    75         /** @see MRemConBearerInterface::GetResponse() */
       
    76         TInt GetResponse(TUid& aInterfaceUid, 
       
    77             TUint& aTransactionId, 
       
    78             TUint& aOperationId, 
       
    79             RBuf8& aData, 
       
    80             TRemConAddress& aAddr);
       
    81             
       
    82         /** @see MRemConBearerInterface::SendCommand() */            
       
    83         TInt SendCommand(TUid aInterfaceUid, 
       
    84             TUint aCommand, 
       
    85             TUint aTransactionId,  
       
    86             RBuf8& aData, 
       
    87             const TRemConAddress& aAddr);
       
    88             
       
    89         /** @see MRemConBearerInterface::GetCommand() */            
       
    90         TInt GetCommand(TUid& aInterfaceUid, 
       
    91             TUint& aTransactionId, 
       
    92             TUint& aCommand, 
       
    93             RBuf8& aData, 
       
    94             TRemConAddress& aAddr);
       
    95             
       
    96         /** @see MRemConBearerInterface::SendResponse() */
       
    97         TInt SendResponse(TUid aInterfaceUid, 
       
    98             TUint aOperationId, 
       
    99             TUint aTransactionId, 
       
   100             RBuf8& aData, 
       
   101             const TRemConAddress& aAddr);
       
   102 
       
   103         /** @see MRemConBearerInterface::ConnectRequest() */
       
   104         void ConnectRequest(const TRemConAddress& aAddr);
       
   105         
       
   106         /** @see MRemConBearerInterface::DisconnectRequest() */        
       
   107         void DisconnectRequest(const TRemConAddress& aAddr);
       
   108         
       
   109         /** @see MRemConBearerInterface::ClientStatus() */        
       
   110         void ClientStatus(TBool aControllerPresent, TBool aTargetPresent);
       
   111         
       
   112         /** @see MRemConBearerInterface::SecurityPolicy() */        
       
   113         TSecurityPolicy SecurityPolicy() const;
       
   114 
       
   115 
       
   116     private: // Data
       
   117 
       
   118         // Last received and corrected-decoded message.
       
   119         TUid iInterfaceUid;
       
   120         TUint iOperationId;
       
   121 
       
   122         TBuf8<KDataBufferSize> iData;
       
   123         
       
   124         TUint iTransactionId;
       
   125     };
       
   126 
       
   127 #endif // __NSSVCEXECUTORBEARERIMPL_H__