1.1 --- a/epoc32/include/remconabsvoltarget.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/remconabsvoltarget.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,105 @@
1.4 -remconabsvoltarget.h
1.5 +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// 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
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +//
1.19 +
1.20 +
1.21 +
1.22 +/**
1.23 + @file
1.24 + @publishedAll
1.25 + @released
1.26 +*/
1.27 +
1.28 +#ifndef REMCONABSVOLTARGET_H
1.29 +#define REMCONABSVOLTARGET_H
1.30 +
1.31 +#include <e32base.h>
1.32 +#include <remcon/remconinterfacebase.h>
1.33 +#include <remcon/remconinterfaceif.h>
1.34 +
1.35 +class MRemConAbsVolTargetObserver;
1.36 +class CRemConInterfaceSelector;
1.37 +
1.38 +/**
1.39 +Client-instantiable type supporting sending AbsVol API responses.
1.40 +*/
1.41 +NONSHARABLE_CLASS(CRemConAbsVolTarget) : public CRemConInterfaceBase,
1.42 + public MRemConInterfaceIf
1.43 + {
1.44 +public:
1.45 + /**
1.46 + Factory function.
1.47 + @param aInterfaceSelector The interface selector. The client must have
1.48 + created one of these first.
1.49 + @param aObserver The observer of this interface.
1.50 + @return A new CRemConAbsVolTarget, owned by the interface selector.
1.51 + */
1.52 + IMPORT_C static CRemConAbsVolTarget* NewL(CRemConInterfaceSelector& aInterfaceSelector,
1.53 + MRemConAbsVolTargetObserver& aObserver);
1.54 +
1.55 + /** Destructor. */
1.56 + IMPORT_C ~CRemConAbsVolTarget();
1.57 +
1.58 +public:
1.59 + /**
1.60 + Sends a response to a 'get absolute volume' command.
1.61 + Only one response per target session can be outstanding at any one time.
1.62 + @param aStatus Used by RemCon to indicate completion of the send request.
1.63 + @param aAbsVol The volume, on a scale of 0 to aMaxVol.
1.64 + @param aMaxVol The maximum volume, to which aAbsVol is relative.
1.65 + @param aError The response error.
1.66 + */
1.67 + IMPORT_C void GetAbsoluteVolumeResponse(TRequestStatus& aStatus,
1.68 + TUint aAbsVol,
1.69 + TUint aMaxVol,
1.70 + TInt aError);
1.71 +
1.72 + /**
1.73 + Sends a response to a 'set absolute volume' command.
1.74 + Only one response per target session can be outstanding at any one time.
1.75 + @param aStatus Used by RemCon to indicate completion of the request.
1.76 + @param aError The response error.
1.77 + */
1.78 + IMPORT_C void SetAbsoluteVolumeResponse(TRequestStatus& aStatus,
1.79 + TInt aError);
1.80 +
1.81 +private:
1.82 + /**
1.83 + Constructor.
1.84 + @param aInterfaceSelector The interface selector.
1.85 + @param aObserver The observer of this interface.
1.86 + */
1.87 + CRemConAbsVolTarget(CRemConInterfaceSelector& aInterfaceSelector,
1.88 + MRemConAbsVolTargetObserver& aObserver);
1.89 +
1.90 +private: // from CRemConInterfaceBase
1.91 + TAny* GetInterfaceIf(TUid aUid);
1.92 +
1.93 +private: // from MRemConInterfaceIf
1.94 + void MrcibNewMessage(TUint aOperationId, const TDesC8& aData);
1.95 +
1.96 +private: // unowned
1.97 + MRemConAbsVolTargetObserver& iObserver;
1.98 +
1.99 +private: // owned
1.100 + // For operation-specific data.
1.101 + static const TUint KMaxOperationDataSize = 0x20;
1.102 + TBuf8<KMaxOperationDataSize> iOutData;
1.103 +
1.104 + // not used by this class, but required for calling RRemCon::Send ...
1.105 + TUint iNumRemotes;
1.106 +
1.107 + };
1.108 +
1.109 +#endif // REMCONABSVOLTARGET_H