MMPXPlayerManager Class Reference

class MMPXPlayerManager

Manages the players. Golden rules: by default, all players of type EPbLocal are tried and the first one found which can handle the content is used; when a specific player is selected by uid, (i.e. SelectPlayerL(TUid aPlayer)) then only that player will be considered in the search; when players are selected by type (i.e. SelectPlayersL(TMPXPlaybackPlayerType aType)), then only players with that type are considered; When a sub player is explicitly selected (i.e. SelectSubPlayerL()), then only that player and its sub player are considered.

mpxplaybackutility.lib

Member Functions Documentation

ClearSelectPlayersL()

voidClearSelectPlayersL()[pure virtual]

Clears all selection criteria. Essentially the same as SelectPlayersL(EPbLocal).

Since
S60 3.2.3

CurrentPlayer()

MMPXPlayer *CurrentPlayer()[pure virtual]

The current player, may change with each item, NULL if none found.

Since
S60 3.2.3

GetPlayerListL(RArray< TUid > &)

voidGetPlayerListL(RArray< TUid > &aPlayers)[pure virtual]

Get the list of UIDs of all players.

Since
S60 3.2.3

Parameters

RArray< TUid > & aPlayersAll the players' uids in the system

GetPlayerListL(RArray< TUid > &, TMPXPlaybackPlayerType)

voidGetPlayerListL(RArray< TUid > &aPlayers,
TMPXPlaybackPlayerTypeaType
)[pure virtual]

Get the list of UIDs of players with the specific type.

Since
S60 3.2.3

Parameters

RArray< TUid > & aPlayersAll the players' uids with the same type
TMPXPlaybackPlayerType aTypethe type of players

GetPlayerTypesL(RArray< TMPXPlaybackPlayerType > &)

voidGetPlayerTypesL(RArray< TMPXPlaybackPlayerType > &aTypes)[pure virtual]

Typically, a client will obtain the list of all the (non-duplicated) player 'types' in the system from GetPlayerTypesL and present localized type names (e.g. "Local","Home network", if possible, else if non-standard type,should use PlayerTypeDisplayNameL to get text from player).

User should be given opportunity to choose IF there is more than one type available, or if there is one type but more than one sub players, the user could be presented with the sub player list.

Since
S60 3.2.3

Parameters

RArray< TMPXPlaybackPlayerType > & aTypesthe list of player types

GetSelectionL(TMPXPlaybackPlayerType &, TUid &, TInt &, HBufC *&)

voidGetSelectionL(TMPXPlaybackPlayerType &aType,
TUid &aPlayer,
TInt &aSubPlayerIndex,
HBufC *&aSubPlayerName
)[pure virtual]

Retreives the current selection: KNullUid and KErrNotFound are possible return values for aPlayer and aSubPlayerIndex respectively if none are explicitly selected.

Since
S60 3.2.3

Parameters

TMPXPlaybackPlayerType & aTypeplayer type
TUid & aPlayerthe UID of player
TInt & aSubPlayerIndexindex of the subplayer
HBufC *& aSubPlayerNamefriendly name of the subplayer. Notes: Client owns the returned aSubPlayerName object.

PlayerTypeDisplayNameL(TMPXPlaybackPlayerType)

HBufC *PlayerTypeDisplayNameL(TMPXPlaybackPlayerTypeaType)[pure virtual]

Returns display name for custom types; standard types should be recognized by client and localized - calling this method would then not be required.

Since
S60 3.2.3

Parameters

TMPXPlaybackPlayerType aTypeplayback type

SelectPlayerL(TUid)

voidSelectPlayerL(TUidaPlayer)[pure virtual]

Client selects a specific player. NOTE: Once a player is manually selected by UID, all subsequent InitL() will continue to use that player, it will not try to resolve a plugin. If the client later wants the engine to auto resolve the proper plugin, the client must call ClearSelectPlayersL() to reset the engine.

Since
S60 3.2.3

Parameters

TUid aPlayerthe UID of the player

SelectPlayersL(TMPXPlaybackPlayerType)

voidSelectPlayersL(TMPXPlaybackPlayerTypeaType)[pure virtual]

Client selects all players with the type aType, the specific player used then being resolved on the basis of the content.

Since
S60 3.2.3

Parameters

TMPXPlaybackPlayerType aTypethe type of player

SelectSubPlayerL(TUid, TInt)

voidSelectSubPlayerL(TUidaPlayer,
TIntaSubPlayerIndex
)[pure virtual]

Client selects specific player aPlayer and sub player aSubPlayerIndex from array returned by SubPlayerNamesL. NOTE: Once a player is manually selected by UID, all subsequent InitL() will continue to use that player, it will not try to resolve a plugin. If the client later wants the engine to auto resolve the proper plugin, the client must call ClearSelectPlayersL() to reset the engine.

Since
S60 3.2.3

Parameters

TUid aPlayerthe UID of player
TInt aSubPlayerIndexthe index of the sub player

SubPlayerNamesL(MMPXPlaybackCallback &, TUid)

voidSubPlayerNamesL(MMPXPlaybackCallback &aCallback,
TUidaPlayer
)[pure virtual]

Get the list of sub player names, Async.

Since
S60 3.2.3

Parameters

MMPXPlaybackCallback & aCallbacksub players returned in call back interface
TUid aPlayerUID of the player