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 REMCONABSVOLTARGET_H
25 #define REMCONABSVOLTARGET_H
28 #include <remcon/remconinterfacebase.h>
29 #include <remcon/remconinterfaceif.h>
31 class MRemConAbsVolTargetObserver;
32 class CRemConInterfaceSelector;
35 Client-instantiable type supporting sending AbsVol API responses.
37 NONSHARABLE_CLASS(CRemConAbsVolTarget) : 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 CRemConAbsVolTarget, owned by the interface selector.
48 IMPORT_C static CRemConAbsVolTarget* NewL(CRemConInterfaceSelector& aInterfaceSelector,
49 MRemConAbsVolTargetObserver& aObserver);
52 IMPORT_C ~CRemConAbsVolTarget();
56 Sends a response to a 'get absolute volume' command.
57 Only one response per target session can be outstanding at any one time.
58 @param aStatus Used by RemCon to indicate completion of the send request.
59 @param aAbsVol The volume, on a scale of 0 to aMaxVol.
60 @param aMaxVol The maximum volume, to which aAbsVol is relative.
61 @param aError The response error.
63 IMPORT_C void GetAbsoluteVolumeResponse(TRequestStatus& aStatus,
69 Sends a response to a 'set absolute volume' command.
70 Only one response per target session can be outstanding at any one time.
71 @param aStatus Used by RemCon to indicate completion of the request.
72 @param aError The response error.
74 IMPORT_C void SetAbsoluteVolumeResponse(TRequestStatus& aStatus,
80 @param aInterfaceSelector The interface selector.
81 @param aObserver The observer of this interface.
83 CRemConAbsVolTarget(CRemConInterfaceSelector& aInterfaceSelector,
84 MRemConAbsVolTargetObserver& aObserver);
86 private: // from CRemConInterfaceBase
87 TAny* GetInterfaceIf(TUid aUid);
89 private: // from MRemConInterfaceIf
90 void MrcibNewMessage(TUint aOperationId, const TDesC8& aData);
93 MRemConAbsVolTargetObserver& iObserver;
96 // For operation-specific data.
97 static const TUint KMaxOperationDataSize = 0x20;
98 TBuf8<KMaxOperationDataSize> iOutData;
100 // not used by this class, but required for calling RRemCon::Send ...
105 #endif // REMCONABSVOLTARGET_H