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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
22 #ifndef REMCONABSVOLTARGET_H
23 #define REMCONABSVOLTARGET_H
26 #include <remcon/remconinterfacebase.h>
27 #include <remcon/remconinterfaceif.h>
29 class MRemConAbsVolTargetObserver;
30 class CRemConInterfaceSelector;
33 Client-instantiable type supporting sending AbsVol API responses.
35 NONSHARABLE_CLASS(CRemConAbsVolTarget) : public CRemConInterfaceBase,
36 public MRemConInterfaceIf
41 @param aInterfaceSelector The interface selector. The client must have
42 created one of these first.
43 @param aObserver The observer of this interface.
44 @return A new CRemConAbsVolTarget, owned by the interface selector.
46 IMPORT_C static CRemConAbsVolTarget* NewL(CRemConInterfaceSelector& aInterfaceSelector,
47 MRemConAbsVolTargetObserver& aObserver);
50 IMPORT_C ~CRemConAbsVolTarget();
54 Sends a response to a 'get absolute volume' command.
55 Only one response per target session can be outstanding at any one time.
56 @param aStatus Used by RemCon to indicate completion of the send request.
57 @param aAbsVol The volume, on a scale of 0 to aMaxVol.
58 @param aMaxVol The maximum volume, to which aAbsVol is relative.
59 @param aError The response error.
61 IMPORT_C void GetAbsoluteVolumeResponse(TRequestStatus& aStatus,
67 Sends a response to a 'set absolute volume' command.
68 Only one response per target session can be outstanding at any one time.
69 @param aStatus Used by RemCon to indicate completion of the request.
70 @param aError The response error.
72 IMPORT_C void SetAbsoluteVolumeResponse(TRequestStatus& aStatus,
78 @param aInterfaceSelector The interface selector.
79 @param aObserver The observer of this interface.
81 CRemConAbsVolTarget(CRemConInterfaceSelector& aInterfaceSelector,
82 MRemConAbsVolTargetObserver& aObserver);
84 private: // from CRemConInterfaceBase
85 TAny* GetInterfaceIf(TUid aUid);
87 private: // from MRemConInterfaceIf
88 void MrcibNewMessage(TUint aOperationId, const TDesC8& aData);
91 MRemConAbsVolTargetObserver& iObserver;
94 // For operation-specific data.
95 static const TUint KMaxOperationDataSize = 0x20;
96 TBuf8<KMaxOperationDataSize> iOutData;
98 // not used by this class, but required for calling RRemCon::Send ...
103 #endif // REMCONABSVOLTARGET_H