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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
24 #ifndef REMCONINTERFACEBASE_H
25 #define REMCONINTERFACEBASE_H
28 #include <remcon/clienttype.h>
30 class CRemConInterfaceSelector;
33 Base class for outer layer APIs.
35 class CRemConInterfaceBase : public CBase
39 IMPORT_C ~CRemConInterfaceBase();
41 public: // called by the ultimate client
43 Cancels the currently outstanding asynchronous send request.
46 IMPORT_C TInt Cancel();
48 public: // called by the interface selector
50 Called by the interface selector to get a pointer to an object which
51 implements the interface API with UID aUid. This is a mechanism for
52 allowing future change to the interface API without breaking BC in
53 existing (non-updated) interfaces.
55 virtual TAny* GetInterfaceIf(TUid aUid) = 0;
58 Accessor for the interface's UID.
59 @return The interface's UID.
61 TUid InterfaceUid() const;
64 Accessor for the maximum length of operation-specific data in this
66 @return The size in bytes of a buffer needed to hold the largest single
67 payload of operation-associated data in this interface.
69 TUint MaxLength() const;
72 Accessor for the type of the interface- either controller or target.
73 @return The interface type.
75 TRemConClientType Type() const;
80 @param aInterfaceUid The UID of the interface.
81 @param aMaxLength The maximum length of any operation-specific data in the
82 interface being registered.
83 @param aInterfaceSelector The interface selector.
85 IMPORT_C CRemConInterfaceBase(TUid aInterfaceUid,
87 CRemConInterfaceSelector& aInterfaceSelector,
88 TRemConClientType aType);
90 /** Must be called by concrete types at construction time. Registers the
91 interface with the interface selector. */
92 IMPORT_C void BaseConstructL();
95 Accessor for the interface selector.
96 @return The interface selector.
98 IMPORT_C CRemConInterfaceSelector& InterfaceSelector();
101 /** The UID of the concrete (derived) interface. */
104 /** Max length of operation-specific data in this interface. */
107 /** The type of the interface- controller or target. */
108 const TRemConClientType iType;
111 Pad for BC-friendly future change.
116 CRemConInterfaceSelector& iInterfaceSelector;
119 #endif // REMCONINTERFACEBASE_H