epoc32/include/remconabsvoltarget.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 /**
    17  @file
    18  @publishedAll
    19  @released
    20 */
    21 
    22 #ifndef REMCONABSVOLTARGET_H
    23 #define REMCONABSVOLTARGET_H
    24 
    25 #include <e32base.h>
    26 #include <remcon/remconinterfacebase.h>
    27 #include <remcon/remconinterfaceif.h>
    28 
    29 class MRemConAbsVolTargetObserver;
    30 class CRemConInterfaceSelector;
    31 
    32 /**
    33 Client-instantiable type supporting sending AbsVol API responses.
    34 */
    35 NONSHARABLE_CLASS(CRemConAbsVolTarget) : public CRemConInterfaceBase, 
    36 								         public MRemConInterfaceIf
    37 	{
    38 public:
    39 	/**
    40 	Factory function.
    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.
    45 	*/
    46 	IMPORT_C static CRemConAbsVolTarget* NewL(CRemConInterfaceSelector& aInterfaceSelector, 
    47 		MRemConAbsVolTargetObserver& aObserver);
    48 	
    49 	/** Destructor. */
    50 	IMPORT_C ~CRemConAbsVolTarget();
    51 
    52 public:
    53 	/**
    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.
    60 	*/
    61 	IMPORT_C void GetAbsoluteVolumeResponse(TRequestStatus& aStatus, 
    62 		TUint aAbsVol, 
    63 		TUint aMaxVol, 
    64 		TInt aError);
    65 
    66 	/**
    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.
    71 	*/
    72 	IMPORT_C void SetAbsoluteVolumeResponse(TRequestStatus& aStatus, 
    73 		TInt aError);
    74 
    75 private:
    76 	/** 
    77 	Constructor.
    78 	@param aInterfaceSelector The interface selector.
    79 	@param aObserver The observer of this interface.
    80 	*/
    81 	CRemConAbsVolTarget(CRemConInterfaceSelector& aInterfaceSelector, 
    82 		MRemConAbsVolTargetObserver& aObserver);
    83 
    84 private: // from CRemConInterfaceBase
    85 	TAny* GetInterfaceIf(TUid aUid);
    86 
    87 private: // from MRemConInterfaceIf
    88 	void MrcibNewMessage(TUint aOperationId, const TDesC8& aData);
    89 
    90 private: // unowned
    91 	MRemConAbsVolTargetObserver& iObserver;
    92 
    93 private: // owned
    94 	// For operation-specific data.
    95 	static const TUint KMaxOperationDataSize = 0x20;
    96 	TBuf8<KMaxOperationDataSize> iOutData;
    97 	
    98 	// not used by this class, but required for calling RRemCon::Send ...
    99 	TUint iNumRemotes;
   100 	
   101 	};
   102 
   103 #endif // REMCONABSVOLTARGET_H