Interface for Menu, Chapter, Angle and Title/Track control. More...
#include <phonon/AddonInterface>
Public Types | |
enum | Interface { NavigationInterface = 1, ChapterInterface = 2, AngleInterface = 3, TitleInterface = 4, SubtitleInterface = 5, AudioChannelInterface = 6 } |
enum | NavigationCommand { availableMenus, setMenu } |
enum | ChapterCommand { availableChapters, chapter, setChapter } |
enum | AngleCommand { availableAngles, angle, setAngle } |
enum | TitleCommand { availableTitles, title, setTitle, autoplayTitles, setAutoplayTitles } |
enum | SubtitleCommand { availableSubtitles, currentSubtitle, setCurrentSubtitle, setCurrentSubtitleFile, subtitleAutodetect, setSubtitleAutodetect, subtitleEncoding, setSubtitleEncoding, subtitleFont, setSubtitleFont } |
enum | AudioChannelCommand { availableAudioChannels, currentAudioChannel, setCurrentAudioChannel } |
Public Member Functions | |
virtual bool | hasInterface (Interface iface) const =0 |
virtual QVariant | interfaceCall (Interface iface, int command, const QList< QVariant > &arguments=QList< QVariant >())=0 |
Interface for Menu, Chapter, Angle and Title/Track control.
Enumerator | |
---|---|
availableAngles |
|
angle |
|
setAngle |
Sets the current angle to the first |
Enumerator | |
---|---|
availableAudioChannels |
|
currentAudioChannel |
|
setCurrentAudioChannel |
Sets the current audio channel to the first |
Enumerator | |
---|---|
availableChapters |
|
chapter |
|
setChapter |
Sets the current chapter to the first |
Enumerator | |
---|---|
availableMenus |
|
setMenu |
Sets the current menu to the first |
Enumerator | |
---|---|
availableSubtitles |
|
currentSubtitle |
|
setCurrentSubtitle |
Sets the current subtitle to the first |
setCurrentSubtitleFile |
Sets the current subtitle to the first QUrl
|
subtitleAutodetect |
|
setSubtitleAutodetect |
Sets/Unsets subtitles autodetection
|
subtitleEncoding |
|
subtitleFont |
Sets the current encoding used to render subtitles
|
setSubtitleFont |
Sets the current font used to render subtitles
|
Enumerator | |
---|---|
availableTitles |
|
title |
|
setTitle |
Sets the current tittle to the first |
autoplayTitles |
|
setAutoplayTitles |
Sets autoplay to |
|
pure virtual |
Queries whether the backend supports a specific interface.
iface | The interface to query support information about |
true
when the backend supports the interface, false
otherwise
|
pure virtual |
Calls an interface on the backend.
iface | The interface to call. |
command | The command the interface shall execute. This can be any value of the Command enumeration associated with the command. The backend casts this appropriately. |
arguments | The arguments for the command. This list can contain a QVariant supported format + additions specific to Phonon. The content entirely depends on the command (e.g. a getter may simply use an empty list). |
QVariant
, as with the arguments this can be anything ranging from an empty QVariant to custom types used within PhononSetting the chapter of a Media could be done like this:
Handling such a request in the backend is done as follows: