CRemConAbsoluteVolumeController Class Reference

class CRemConAbsoluteVolumeController : public CRemConInterfaceBase

This class is used to set and observer the volume level on a remote device.

An active scheduler is required in order to use this class.

Inherits from

Public Member Functions
~CRemConAbsoluteVolumeController ()
IMPORT_C void CancelAbsoluteVolumeNotification ()
IMPORT_C void CancelSetAbsoluteVolume ()
IMPORT_C CRemConAbsoluteVolumeController * NewL ( CRemConInterfaceSelector &, MRemConAbsoluteVolumeControllerObserver &, TUint32 )
IMPORT_C void RegisterAbsoluteVolumeNotification ()
IMPORT_C void SetAbsoluteVolume ( TRequestStatus &, TUint32 , TUint &)
Private Member Functions
CRemConAbsoluteVolumeController ( CRemConInterfaceSelector &, MRemConAbsoluteVolumeControllerObserver &, TUint32 )
TInt AsyncErrorCallBack ( TAny *)
void ConstructL ()
TAny * GetInterfaceIf ( TUid )
void HandleNotify (const TDesC8 &, TRemConMessageSubType )
void HandleSetAbsoluteVolumeResponse (const TDesC8 &)
void KickOffSendIfNeeded ()
void MavsoSendComplete ( TInt )
void MrcibNewMessage ( TUint , const TDesC8 &, TRemConMessageSubType )
void RegisterNotifySendComplete ()
void SendNotify ()
void SendSetAbsoluteVolume ()
void SetAbsoluteVolumeSendComplete ( TInt )
void VolumeUpdate ( TUint32 , TUint32 )
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CRemConInterfaceBase::BaseConstructL()
CRemConInterfaceBase::BaseConstructL(RRemConInterfaceFeatures &)
CRemConInterfaceBase::BaseConstructL(RRemConInterfaceFeatures &,TBool)
CRemConInterfaceBase::Bulk()const
CRemConInterfaceBase::CRemConInterfaceBase(TUid,TUint,CRemConInterfaceSelector &,TRemConClientType)
CRemConInterfaceBase::Cancel()
CRemConInterfaceBase::InterfaceSelector()
CRemConInterfaceBase::InterfaceUid()const
CRemConInterfaceBase::MaxLength()const
CRemConInterfaceBase::Target(TRemConClientType)
CRemConInterfaceBase::Type()const
CRemConInterfaceBase::~CRemConInterfaceBase()
Private Member Enumerations
enum TRequestState { ENotInUse  = 0, ESending , EPending }
Private Attributes
TRequestState iAbsVolRequest
CAbsVolSender * iAbsVolSender
TUint32 iClientMaxVolume
TUint * iClientNumRemotes
TRequestStatus * iClientStatus
TUint32 iCurrentMaxVolume
TUint32 iCurrentVolume
TBool iNotificationRequested
TBuf8 < KAbsoluteVolumeRequestDataSize > iNotifyData
TRequestState iNotifyRequest
MRemConAbsoluteVolumeControllerObserver & iObserver
TBuf8 < KAbsoluteVolumeRequestDataSize > iSetData

Constructor & Destructor Documentation

CRemConAbsoluteVolumeController(CRemConInterfaceSelector &, MRemConAbsoluteVolumeControllerObserver &, TUint32)

CRemConAbsoluteVolumeController ( CRemConInterfaceSelector & aInterfaceSelector,
MRemConAbsoluteVolumeControllerObserver & aObserver,
TUint32 aMaxVolume
) [private]

Constructor.

Parameters

CRemConInterfaceSelector & aInterfaceSelector The interface selector.
MRemConAbsoluteVolumeControllerObserver & aObserver The observer.
TUint32 aMaxVolume

~CRemConAbsoluteVolumeController()

IMPORT_C ~CRemConAbsoluteVolumeController ( )

Member Functions Documentation

AsyncErrorCallBack(TAny *)

TInt AsyncErrorCallBack ( TAny * aObserver ) [private, static]

Parameters

TAny * aObserver

CancelAbsoluteVolumeNotification()

IMPORT_C void CancelAbsoluteVolumeNotification ( )

Called by the client to tell the controller that the client doesn't wish to receicve the volume change notification until the client re-register again.

CancelSetAbsoluteVolume()

IMPORT_C void CancelSetAbsoluteVolume ( )

ConstructL()

void ConstructL ( ) [private]

GetInterfaceIf(TUid)

TAny * GetInterfaceIf ( TUid aUid ) [private, virtual]

Called by the interface selector to get a pointer to an object which implements the interface API with UID aUid. This is a mechanism for allowing future change to the interface API without breaking BC in existing (non-updated) interfaces.

Parameters

TUid aUid

HandleNotify(const TDesC8 &, TRemConMessageSubType)

void HandleNotify ( const TDesC8 & aData,
TRemConMessageSubType aMessageSubType
) [private]

Process the 'volume changed notification response'

Parameters

const TDesC8 & aData The response data.
TRemConMessageSubType aMessageSubType The RemCon submessage type.

HandleSetAbsoluteVolumeResponse(const TDesC8 &)

void HandleSetAbsoluteVolumeResponse ( const TDesC8 & aData ) [private]

Process the 'set absolute volume response'

Parameters

const TDesC8 & aData The response data.

KickOffSendIfNeeded()

void KickOffSendIfNeeded ( ) [private]

MavsoSendComplete(TInt)

void MavsoSendComplete ( TInt aResult ) [private]

Parameters

TInt aResult

MrcibNewMessage(TUint, const TDesC8 &, TRemConMessageSubType)

void MrcibNewMessage ( TUint aOperationId,
const TDesC8 & aData,
TRemConMessageSubType aMessageSubType
) [private]

Parameters

TUint aOperationId
const TDesC8 & aData
TRemConMessageSubType aMessageSubType

NewL(CRemConInterfaceSelector &, MRemConAbsoluteVolumeControllerObserver &, TUint32)

IMPORT_C CRemConAbsoluteVolumeController * NewL ( CRemConInterfaceSelector & aInterfaceSelector,
MRemConAbsoluteVolumeControllerObserver & aObserver,
TUint32 aMaxVolume
) [static]

Allocates and constructs a new CRemConAbsoluteVolumeController object

panic
AbsoluteVolumeController 0 if aMaxVolume is zero.

Parameters

CRemConInterfaceSelector & aInterfaceSelector The interface selector. The client must have created one of these first.
MRemConAbsoluteVolumeControllerObserver & aObserver The observer. The client must have implemented the observer, owned by the client.
TUint32 aMaxVolume The client maximum volume.

RegisterAbsoluteVolumeNotification()

IMPORT_C void RegisterAbsoluteVolumeNotification ( )

Requests notification when the volume on the target device changes, Any responses will be returned via the observer interface.

Volume changes will continue to be provided until either the CancelAbsoluteVolumeNotification function is called, or MrcavcoCurrentVolume is called on the client with an error.

MRemConAbsoluteVolumeControllerObserver::MrcavcoCurrentVolume CRemConAbsoluteVolumeController::CancelAbsoluteVolumeNotification
Pre-condition
The client is not currently registered to receive absolute volume notifications.

RegisterNotifySendComplete()

void RegisterNotifySendComplete ( ) [private]

SendNotify()

void SendNotify ( ) [private]

SendSetAbsoluteVolume()

void SendSetAbsoluteVolume ( ) [private]

SetAbsoluteVolume(TRequestStatus &, TUint32, TUint &)

IMPORT_C void SetAbsoluteVolume ( TRequestStatus & aStatus,
TUint32 aVolume,
TUint & aNumRemotes
)

Sets an absolute volume on the target device, Any responses will be returned via the observer interface.

Pre-condition
The send of any previous SetAbsoluteVolume command has completed.
panic
AbsoluteVolumeController 1, if aVolume greater than the client max volume.

Parameters

TRequestStatus & aStatus Indicates the completion of the send request. The client must not block execution by using User::WaitForRequest to await completion of this send.
TUint32 aVolume The relative volume against the client max volume.
TUint & aNumRemotes The number of remotes to which the command was sent.

SetAbsoluteVolumeSendComplete(TInt)

void SetAbsoluteVolumeSendComplete ( TInt aResult ) [private]

Parameters

TInt aResult

VolumeUpdate(TUint32, TUint32)

void VolumeUpdate ( TUint32 aVolume,
TUint32 aMaxVolume
) [private]

Parameters

TUint32 aVolume
TUint32 aMaxVolume

Member Enumerations Documentation

Enum TRequestState

Enumerators

ENotInUse = 0
ESending
EPending

Member Data Documentation

TRequestState iAbsVolRequest

TRequestState iAbsVolRequest [private]

CAbsVolSender * iAbsVolSender

CAbsVolSender * iAbsVolSender [private]

TUint32 iClientMaxVolume

TUint32 iClientMaxVolume [private]

TUint * iClientNumRemotes

TUint * iClientNumRemotes [private]

TRequestStatus * iClientStatus

TRequestStatus * iClientStatus [private]

TUint32 iCurrentMaxVolume

TUint32 iCurrentMaxVolume [private]

TUint32 iCurrentVolume

TUint32 iCurrentVolume [private]

TBool iNotificationRequested

TBool iNotificationRequested [private]

TBuf8< KAbsoluteVolumeRequestDataSize > iNotifyData

TBuf8 < KAbsoluteVolumeRequestDataSize > iNotifyData [private]

TRequestState iNotifyRequest

TRequestState iNotifyRequest [private]

MRemConAbsoluteVolumeControllerObserver & iObserver

MRemConAbsoluteVolumeControllerObserver & iObserver [private]

TBuf8< KAbsoluteVolumeRequestDataSize > iSetData

TBuf8 < KAbsoluteVolumeRequestDataSize > iSetData [private]