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 REMCONABSVOLCONTROLLER_H
25 #define REMCONABSVOLCONTROLLER_H
28 #include <remcon/remconinterfacebase.h>
29 #include <remcon/remconinterfaceif.h>
31 class MRemConAbsVolControllerObserver;
32 class CRemConInterfaceSelector;
35 Client-instantiable type supporting sending AbsVol API responses.
37 NONSHARABLE_CLASS(CRemConAbsVolController) : public CRemConInterfaceBase,
38 public MRemConInterfaceIf
43 @param aInterfaceSelector The interface selector. The client must have
44 created one of these first.
45 @param aObserver The observer of this interface.
46 @return A new CRemConAbsVolController, owned by the interface selector.
48 IMPORT_C static CRemConAbsVolController* NewL(CRemConInterfaceSelector& aInterfaceSelector,
49 MRemConAbsVolControllerObserver& aObserver);
52 IMPORT_C ~CRemConAbsVolController();
56 Sends a 'get absolute volume' command. The absolute volume will be
57 returned in response(s) via the observer interface.
58 Only one command per controller session can be outstanding at any one time.
59 @param aStatus Used by RemCon to indicate completion of the send request.
60 @param aNumRemotes The number of remotes to which the command was sent.
62 IMPORT_C void GetAbsoluteVolume(TRequestStatus& aStatus, TUint& aNumRemotes);
65 Sends a 'set absolute volume' command. The volume is set to aAbsVol, on a
66 range of zero to aMaxVol. Any responses will be returned via the observer
68 Only one command per controller session can be outstanding at any one time.
69 @param aStatus Used by RemCon to indicate completion of the send request.
70 @param aAbsVol The relative volume.
71 @param aMaxVol The maximum against which aAbsVol is relative.
72 @param aNumRemotes The number of remotes to which the command was sent.
74 IMPORT_C void SetAbsoluteVolume(TRequestStatus& aStatus, TUint aAbsVol, TUint aMaxVol, TUint& aNumRemotes);
79 @param aInterfaceSelector The interface selector.
80 @param aObserver The observer of this interface.
82 CRemConAbsVolController(CRemConInterfaceSelector& aInterfaceSelector,
83 MRemConAbsVolControllerObserver& aObserver);
85 private: // from CRemConInterfaceBase
86 TAny* GetInterfaceIf(TUid aUid);
88 private: // from MRemConInterfaceIf
89 void MrcibNewMessage(TUint aOperationId, const TDesC8& aData);
92 MRemConAbsVolControllerObserver& iObserver;
95 static const TUint KMaxOperationDataSize = 0x20;
96 TBuf8<KMaxOperationDataSize> iOutData;
99 #endif // REMCONABSVOLCONTROLLER_H