Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <playerinformationtargetobserver.h>
Link against: remconplayerinformation.lib
This item is not part of the S60 5th Edition SDK

Class MPlayerEventsObserver

class MPlayerEventsObserver;

Description

This class supports the notification PDUs in AVRCP1.3 specification section 5.4, with the following exceptions: EVENT_SYSTEM_STATUS_CHANGED is not supported, it is only for adaptors that plug into a media player EVENT_PLAYER_APPLICATION_SETTING_CHANGED is supported through the CPlayerApplicationSettings API

Events are pushed by the media player calling functions in this API, where they are cached until the controller pulls them via a GetPlayStatus or RegisterNotification PDU

Members

Defined in MPlayerEventsObserver:


Member functions


PlaybackStatusChanged(TPlaybackStatus)

IMPORT_C void PlaybackStatusChanged(TPlaybackStatus aStatus);

Description

Call this function whenever the playback status changes. It will be used to complete pending EVENT_PLAYBACK_STATUS_CHANGED and EVENT_PLAYBACK_POS_CHANGED notifications. The value is used to generate the response to a GetPlayStatus PDU.

Parameters

MPlayerEventsObserver::TPlaybackStatus aStatus

The specification defined playback status


TrackChanged(TUint64,TUint32)

IMPORT_C void TrackChanged(TUint64 aTrackId, TUint32 aLengthInMilliseconds);

Description

Call this function whenever the current media track is changed. use KNoTrackSelected to indicate that there is no media selected. This is the default value on construction. It will be used to complete pending EVENT_TRACK_CHANGED and EVENT_PLAYBACK_POS_CHANGED notifications. The values are used to generate the response to a GetPlayStatus PDU.

Parameters

TUint64 aTrackId

A handle to the current track.

TUint32 aLengthInMilliseconds

The length of the current track.


TrackReachedEnd()

IMPORT_C void TrackReachedEnd();

Description

Call this function whenever the current track reaches the end position, e.g. due to playback or forward seek. It will be used to complete pending EVENT_TRACK_REACHED_END and EVENT_PLAYBACK_POS_CHANGED notifications.


TrackReachedStart()

IMPORT_C void TrackReachedStart();

Description

Call this function whenever the current track reaches the start position, e.g. due to reverse seek (rewind). It will be used to complete pending EVENT_TRACK_REACHED_START and EVENT_PLAYBACK_POS_CHANGED notifications.


SetPlaybackPosition(TUint32)

IMPORT_C void SetPlaybackPosition(TUint32 aMilliseconds);

Description

Call this function during playback or seek operations, to indicate the current position within the track. It will be used to complete a pending EVENT_PLAYBACK_POS_CHANGED notification. The value is used to generate the response to a GetPlayStatus PDU.

Parameters

TUint32 aMilliseconds

The current playback position. It is recommended to call with a resolution <=1000ms to satisfy the 1s resolution of the notification playback interval.


SetBatteryStatus(TTargetBatteryStatus)

IMPORT_C void SetBatteryStatus(TTargetBatteryStatus aBatteryStatus);

Description

Call this function to report the current battery status

Parameters

MPlayerEventsObserver::TTargetBatteryStatus aBatteryStatus

The current battery status.


DoPlaybackStatusChanged(TPlaybackStatus)

private: virtual void DoPlaybackStatusChanged(TPlaybackStatus aStatus)=0;

Description

Parameters

MPlayerEventsObserver::TPlaybackStatus aStatus


DoTrackChanged(TUint64,TUint32)

private: virtual void DoTrackChanged(TUint64 aTrackId, TUint32 aLengthInMilliseconds)=0;

Description

Parameters

TUint64 aTrackId

TUint32 aLengthInMilliseconds


DoTrackReachedEnd()

private: virtual void DoTrackReachedEnd()=0;

Description


DoTrackReachedStart()

private: virtual void DoTrackReachedStart()=0;

Description


DoSetPlaybackPosition(TUint32)

private: virtual void DoSetPlaybackPosition(TUint32 aMilliseconds)=0;

Description

Parameters

TUint32 aMilliseconds


DoSetBatteryStatus(TTargetBatteryStatus)

private: virtual void DoSetBatteryStatus(TTargetBatteryStatus aBatteryStatus)=0;

Description

Parameters

MPlayerEventsObserver::TTargetBatteryStatus aBatteryStatus

[Top]


Member enumerations


Enum TTargetBatteryStatus

TTargetBatteryStatus

Description

ENormal

EWarning

ECritical

EExternal

EFullCharge

EUnknown


Enum TPlaybackStatus

TPlaybackStatus

Description

EStopped

EPlaying

EPaused

EFwdSeek

ERevSeek

EError


Enum TPlayPosition

TPlayPosition

Description

EStart

EMiddle

EEnd

[Top]


Member data


KNoTrackSelected

const TUint64 KNoTrackSelected=KMaxTUint64;

Description


KPlaybackPositionUnknown

const TUint32 KPlaybackPositionUnknown=0xFFFFFFFF;

Description