1.1 --- a/epoc32/include/remcon/remconinterfacebase.h Wed Mar 31 12:27:01 2010 +0100
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,119 +0,0 @@
1.4 -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 -// All rights reserved.
1.6 -// This component and the accompanying materials are made available
1.7 -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.8 -// which accompanies this distribution, and is available
1.9 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 -//
1.11 -// Initial Contributors:
1.12 -// Nokia Corporation - initial contribution.
1.13 -//
1.14 -// Contributors:
1.15 -//
1.16 -// Description:
1.17 -//
1.18 -
1.19 -
1.20 -
1.21 -/**
1.22 - @file
1.23 - @publishedPartner
1.24 - @released
1.25 -*/
1.26 -
1.27 -#ifndef REMCONINTERFACEBASE_H
1.28 -#define REMCONINTERFACEBASE_H
1.29 -
1.30 -#include <e32base.h>
1.31 -#include <remcon/clienttype.h>
1.32 -
1.33 -class CRemConInterfaceSelector;
1.34 -
1.35 -/**
1.36 -Base class for outer layer APIs.
1.37 -*/
1.38 -class CRemConInterfaceBase : public CBase
1.39 - {
1.40 -public:
1.41 - /** Destructor */
1.42 - IMPORT_C ~CRemConInterfaceBase();
1.43 -
1.44 -public: // called by the ultimate client
1.45 - /**
1.46 - Cancels the currently outstanding asynchronous send request.
1.47 - @return KErrNone.
1.48 - */
1.49 - IMPORT_C TInt Cancel();
1.50 -
1.51 -public: // called by the interface selector
1.52 - /**
1.53 - Called by the interface selector to get a pointer to an object which
1.54 - implements the interface API with UID aUid. This is a mechanism for
1.55 - allowing future change to the interface API without breaking BC in
1.56 - existing (non-updated) interfaces.
1.57 - */
1.58 - virtual TAny* GetInterfaceIf(TUid aUid) = 0;
1.59 -
1.60 - /**
1.61 - Accessor for the interface's UID.
1.62 - @return The interface's UID.
1.63 - */
1.64 - TUid InterfaceUid() const;
1.65 -
1.66 - /**
1.67 - Accessor for the maximum length of operation-specific data in this
1.68 - interface.
1.69 - @return The size in bytes of a buffer needed to hold the largest single
1.70 - payload of operation-associated data in this interface.
1.71 - */
1.72 - TUint MaxLength() const;
1.73 -
1.74 - /**
1.75 - Accessor for the type of the interface- either controller or target.
1.76 - @return The interface type.
1.77 - */
1.78 - TRemConClientType Type() const;
1.79 -
1.80 -protected:
1.81 - /**
1.82 - Constructor.
1.83 - @param aInterfaceUid The UID of the interface.
1.84 - @param aMaxLength The maximum length of any operation-specific data in the
1.85 - interface being registered.
1.86 - @param aInterfaceSelector The interface selector.
1.87 - */
1.88 - IMPORT_C CRemConInterfaceBase(TUid aInterfaceUid,
1.89 - TUint aMaxLength,
1.90 - CRemConInterfaceSelector& aInterfaceSelector,
1.91 - TRemConClientType aType);
1.92 -
1.93 - /** Must be called by concrete types at construction time. Registers the
1.94 - interface with the interface selector. */
1.95 - IMPORT_C void BaseConstructL();
1.96 -
1.97 - /**
1.98 - Accessor for the interface selector.
1.99 - @return The interface selector.
1.100 - */
1.101 - IMPORT_C CRemConInterfaceSelector& InterfaceSelector();
1.102 -
1.103 -private: // owned
1.104 - /** The UID of the concrete (derived) interface. */
1.105 - TUid iInterfaceUid;
1.106 -
1.107 - /** Max length of operation-specific data in this interface. */
1.108 - TUint iMaxLength;
1.109 -
1.110 - /** The type of the interface- controller or target. */
1.111 - const TRemConClientType iType;
1.112 -
1.113 - /**
1.114 - Pad for BC-friendly future change.
1.115 - */
1.116 - TAny* iPad;
1.117 -
1.118 -private: // unowned
1.119 - CRemConInterfaceSelector& iInterfaceSelector;
1.120 - };
1.121 -
1.122 -#endif // REMCONINTERFACEBASE_H