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 voidCancelAbsoluteVolumeNotification()
IMPORT_C voidCancelSetAbsoluteVolume()
IMPORT_C CRemConAbsoluteVolumeController *NewL(CRemConInterfaceSelector &, MRemConAbsoluteVolumeControllerObserver &, TUint32)
IMPORT_C voidRegisterAbsoluteVolumeNotification()
IMPORT_C voidSetAbsoluteVolume(TRequestStatus &, TUint32, TUint &)
Private Member Functions
CRemConAbsoluteVolumeController(CRemConInterfaceSelector &, MRemConAbsoluteVolumeControllerObserver &, TUint32)
TInt AsyncErrorCallBack(TAny *)
voidConstructL()
TAny *GetInterfaceIf(TUid)
voidHandleNotify(const TDesC8 &, TRemConMessageSubType)
voidHandleSetAbsoluteVolumeResponse(const TDesC8 &)
voidKickOffSendIfNeeded()
voidMavsoSendComplete(TInt)
voidMrcibNewMessage(TUint, const TDesC8 &, TRemConMessageSubType)
voidRegisterNotifySendComplete()
voidSendNotify()
voidSendSetAbsoluteVolume()
voidSetAbsoluteVolumeSendComplete(TInt)
voidVolumeUpdate(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
enumTRequestState { 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,
TUint32aMaxVolume
)[private]

Constructor.

Parameters

CRemConInterfaceSelector & aInterfaceSelectorThe interface selector.
MRemConAbsoluteVolumeControllerObserver & aObserverThe observer.
TUint32 aMaxVolume

~CRemConAbsoluteVolumeController()

IMPORT_C~CRemConAbsoluteVolumeController()

Member Functions Documentation

AsyncErrorCallBack(TAny *)

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

Parameters

TAny * aObserver

CancelAbsoluteVolumeNotification()

IMPORT_C voidCancelAbsoluteVolumeNotification()

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 voidCancelSetAbsoluteVolume()

ConstructL()

voidConstructL()[private]

GetInterfaceIf(TUid)

TAny *GetInterfaceIf(TUidaUid)[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)

voidHandleNotify(const TDesC8 &aData,
TRemConMessageSubTypeaMessageSubType
)[private]

Process the 'volume changed notification response'

Parameters

const TDesC8 & aDataThe response data.
TRemConMessageSubType aMessageSubTypeThe RemCon submessage type.

HandleSetAbsoluteVolumeResponse(const TDesC8 &)

voidHandleSetAbsoluteVolumeResponse(const TDesC8 &aData)[private]

Process the 'set absolute volume response'

Parameters

const TDesC8 & aDataThe response data.

KickOffSendIfNeeded()

voidKickOffSendIfNeeded()[private]

MavsoSendComplete(TInt)

voidMavsoSendComplete(TIntaResult)[private]

Parameters

TInt aResult

MrcibNewMessage(TUint, const TDesC8 &, TRemConMessageSubType)

voidMrcibNewMessage(TUintaOperationId,
const TDesC8 &aData,
TRemConMessageSubTypeaMessageSubType
)[private]

Parameters

TUint aOperationId
const TDesC8 & aData
TRemConMessageSubType aMessageSubType

NewL(CRemConInterfaceSelector &, MRemConAbsoluteVolumeControllerObserver &, TUint32)

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

Allocates and constructs a new CRemConAbsoluteVolumeController object

A new CRemConAbsoluteVolumeController, owned by the interface selector

panic

AbsoluteVolumeController 0 if aMaxVolume is zero.

Parameters

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

RegisterAbsoluteVolumeNotification()

IMPORT_C voidRegisterAbsoluteVolumeNotification()

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

The client is not currently registered to receive absolute volume notifications.

RegisterNotifySendComplete()

voidRegisterNotifySendComplete()[private]

SendNotify()

voidSendNotify()[private]

SendSetAbsoluteVolume()

voidSendSetAbsoluteVolume()[private]

SetAbsoluteVolume(TRequestStatus &, TUint32, TUint &)

IMPORT_C voidSetAbsoluteVolume(TRequestStatus &aStatus,
TUint32aVolume,
TUint &aNumRemotes
)

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

The send of any previous SetAbsoluteVolume command has completed.

panic

AbsoluteVolumeController 1, if aVolume greater than the client max volume.

Parameters

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

SetAbsoluteVolumeSendComplete(TInt)

voidSetAbsoluteVolumeSendComplete(TIntaResult)[private]

Parameters

TInt aResult

VolumeUpdate(TUint32, TUint32)

voidVolumeUpdate(TUint32aVolume,
TUint32aMaxVolume
)[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]