remotecontrol/remotecontrolfw/reference/converters/Core_Serial/inc/coreserialconverter.h
changeset 51 20ac952a623c
equal deleted inserted replaced
48:22de2e391156 51:20ac952a623c
       
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @internalComponent
       
    19 */
       
    20 
       
    21 #ifndef CORESERIALCONVERTER_H
       
    22 #define CORESERIALCONVERTER_H
       
    23 
       
    24 #include <e32base.h>
       
    25 #include <remcon/remconconverterplugin.h>
       
    26 #include <remcon/remconconverterinterface.h>
       
    27 
       
    28 /**
       
    29 Converter for the Core API and the serial bearer.
       
    30 */
       
    31 NONSHARABLE_CLASS(CCoreSerialConverter) : public CRemConConverterPlugin, 
       
    32 										public MRemConConverterInterface
       
    33 	{
       
    34 public:
       
    35 	static CCoreSerialConverter* NewL();
       
    36 	~CCoreSerialConverter();
       
    37 
       
    38 private: // from CRemConConverterPlugin
       
    39 	TAny* GetInterface(TUid aUid);
       
    40 
       
    41 private: // from MRemConConverterInterface
       
    42 	TInt InterfaceToBearer(TUid aInterfaceUid, 
       
    43 		TUint aOperationId,
       
    44 		const TDesC8& aData,
       
    45 		TRemConMessageType aMsgType, 
       
    46 		TDes8& aBearerData) const;
       
    47 	
       
    48 	TInt BearerToInterface(const TDesC8& aBearerData,
       
    49 		TUid& aInterfaceUid, 
       
    50 		TUint& aOperationId,
       
    51 		TRemConMessageType& aMsgType, 
       
    52 		TDes8& aData) const;
       
    53 
       
    54 	TBool SupportedUids(const TUid& aInterfaceUid, const TUid& aBearerUid) const;
       
    55 	TBool SupportedInterface(const TDesC8& aInterfaceData, const TUid& aBearerUid) const;
       
    56 
       
    57 private:
       
    58 	CCoreSerialConverter();
       
    59 
       
    60 private: // owned
       
    61 	static const TUint KRemConSerialBearerMessageLength = 30;
       
    62 	};
       
    63 
       
    64 #endif // CORESERIALCONVERTER_H