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 REMCONABSVOLCONTROLLER_H
23 #define REMCONABSVOLCONTROLLER_H
26 #include <remcon/remconinterfacebase.h>
27 #include <remcon/remconinterfaceif.h>
29 class MRemConAbsVolControllerObserver;
30 class CRemConInterfaceSelector;
33 Client-instantiable type supporting sending AbsVol API responses.
35 NONSHARABLE_CLASS(CRemConAbsVolController) : 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 CRemConAbsVolController, owned by the interface selector.
46 IMPORT_C static CRemConAbsVolController* NewL(CRemConInterfaceSelector& aInterfaceSelector,
47 MRemConAbsVolControllerObserver& aObserver);
50 IMPORT_C ~CRemConAbsVolController();
54 Sends a 'get absolute volume' command. The absolute volume will be
55 returned in response(s) via the observer interface.
56 Only one command per controller session can be outstanding at any one time.
57 @param aStatus Used by RemCon to indicate completion of the send request.
58 @param aNumRemotes The number of remotes to which the command was sent.
60 IMPORT_C void GetAbsoluteVolume(TRequestStatus& aStatus, TUint& aNumRemotes);
63 Sends a 'set absolute volume' command. The volume is set to aAbsVol, on a
64 range of zero to aMaxVol. Any responses will be returned via the observer
66 Only one command per controller session can be outstanding at any one time.
67 @param aStatus Used by RemCon to indicate completion of the send request.
68 @param aAbsVol The relative volume.
69 @param aMaxVol The maximum against which aAbsVol is relative.
70 @param aNumRemotes The number of remotes to which the command was sent.
72 IMPORT_C void SetAbsoluteVolume(TRequestStatus& aStatus, TUint aAbsVol, TUint aMaxVol, TUint& aNumRemotes);
77 @param aInterfaceSelector The interface selector.
78 @param aObserver The observer of this interface.
80 CRemConAbsVolController(CRemConInterfaceSelector& aInterfaceSelector,
81 MRemConAbsVolControllerObserver& aObserver);
83 private: // from CRemConInterfaceBase
84 TAny* GetInterfaceIf(TUid aUid);
86 private: // from MRemConInterfaceIf
87 void MrcibNewMessage(TUint aOperationId, const TDesC8& aData);
90 MRemConAbsVolControllerObserver& iObserver;
93 static const TUint KMaxOperationDataSize = 0x20;
94 TBuf8<KMaxOperationDataSize> iOutData;
97 #endif // REMCONABSVOLCONTROLLER_H