MPlayerApplicationSettingsObserver Class Reference

class MPlayerApplicationSettingsObserver

This class is for supporting the player application settings PDUs in AVRCP1.3 specification section 5.2. The RegisterNotification PDU for EVENT_PLAYER_APPLICATION_SETTING_CHANGED is also supported through this API.

The media player should first define all the attributes it supports, using DefineAttributeL. When an attribute's value is changed by the media player, it should call SetAttributeL to inform the controller. When the controller changes a setting, the media player application receives a callback via the MPlayerApplicationSettingsNotify interface

Public Member Functions
IMPORT_C voidDefineAttributeL(TUint, TDesC8 &, RArray< TUint > &, RArray< TPtrC8 > &, TUint)
IMPORT_C voidSetAttributeL(TUint, TUint)
Private Member Functions
voidDoDefineAttributeL(TUint, TDesC8 &, RArray< TUint > &, RArray< TPtrC8 > &, TUint)
voidDoSetAttributeL(TUint, TUint)

Member Functions Documentation

DefineAttributeL(TUint, TDesC8 &, RArray< TUint > &, RArray< TPtrC8 > &, TUint)

IMPORT_C voidDefineAttributeL(TUintaAttributeID,
TDesC8 &aAttributeText,
RArray< TUint > &aValues,
RArray< TPtrC8 > &aValueTexts,
TUintaInitialValue
)
Define an attribute supported by this player. It will be included in future responses to the following PDUs: ListPlayerApplicationSettingAttributes, ListPlayerApplicationSettingValues, GetCurrentPlayerApplicationSettingValue, GetPlayerApplicationSettingAttributeText, GetPlayerApplicationSettingValueText,
leave
KErrNoMemory if memory could not be allocated to store the copies of aAttributeID and relative settings
leave
KErrNotSupported if attribute or value is out of specification defined range, or aValueTexts is not equal length to aValues

Parameters

TUint aAttributeIDThe specification or player defined attribute
TDesC8 & aAttributeTextThe UTF8 text name of the attribute(allowed text length is 1-255) - the API will take a copy
RArray< TUint > & aValuesThe list of defined values
RArray< TPtrC8 > & aValueTextsThe UTF8 text for each defined value(allowed text length is 1-255) - The API will make copies.
TUint aInitialValueThe initial value for this attribute

DoDefineAttributeL(TUint, TDesC8 &, RArray< TUint > &, RArray< TPtrC8 > &, TUint)

voidDoDefineAttributeL(TUintaAttributeID,
TDesC8 &aAttributeText,
RArray< TUint > &aValues,
RArray< TPtrC8 > &aValueTexts,
TUintaInitialValue
)[private, pure virtual]

Parameters

TUint aAttributeID
TDesC8 & aAttributeText
RArray< TUint > & aValues
RArray< TPtrC8 > & aValueTexts
TUint aInitialValue

DoSetAttributeL(TUint, TUint)

voidDoSetAttributeL(TUintaAttributeID,
TUintaValue
)[private, pure virtual]

Parameters

TUint aAttributeID
TUint aValue

SetAttributeL(TUint, TUint)

IMPORT_C voidSetAttributeL(TUintaAttributeID,
TUintaValue
)
Set the current value of a previously defined attribute This updates the cache and will cause completion of a pending EVENT_PLAYER_APPLICATION_SETTING_CHANGED notification PDU
leave
KErrNotFound if the attribute is not defined, KErrArgument if the value is not valid according to the definition

Parameters

TUint aAttributeIDThe specification or player defined attribute
TUint aValueThe current value