template <>

class Server

Defined at line 1875 of file fidling/gen/sdk/fidl/fuchsia.media.sessions2/fuchsia.media.sessions2/cpp/fidl/fuchsia.media.sessions2/cpp/natural_messaging.h

Public Methods

void Play (PlayCompleter::Sync & completer)

Plays media. If this method is not supported as indicated by the absence of the `PLAY`

flag in `PlayerCapabilities`, this method does nothing.

void Pause (PauseCompleter::Sync & completer)

Pauses playback and retains position in media. If this method is not supported as indicated

by the absence of the `PAUSE` flag in `PlayerCapabilities`, this method does nothing.

void Server ()

Defined at line 1878 of file fidling/gen/sdk/fidl/fuchsia.media.sessions2/fuchsia.media.sessions2/cpp/fidl/fuchsia.media.sessions2/cpp/natural_messaging.h

void Stop (StopCompleter::Sync & completer)

Stops playback. The session should close.

void Seek (SeekRequest & request, SeekCompleter::Sync & completer)

Seeks to a specific position in media. Implementations are free to

enter an error state if the position is out of bounds. `position`

is an offset from the beginning of the media. If this method is not supported as indicated

by the absence of the `SEEK` flag in `PlayerCapabilities`, this method does nothing.

void SkipForward (SkipForwardCompleter::Sync & completer)

Skips forward in media by the player's default skip amount. If this method is not supported

as indicated by the absence of the `SKIP_FORWARD` flag in `PlayerCapabilities`, this method

does nothing.

void SkipReverse (SkipReverseCompleter::Sync & completer)

Skips in reverse in media by the player's default skip amount. If this method is not

supported as indicated by the absence of the `SKIP_REVERSE` flag in `PlayerCapabilities`,

this method does nothing.

void NextItem (NextItemCompleter::Sync & completer)

Changes media to the next item (e.g. next song in playlist). If this method is not

supported as indicated by the absence of the `CHANGE_TO_NEXT_ITEM` flag in

`PlayerCapabilities`, this method does nothing.

void PrevItem (PrevItemCompleter::Sync & completer)

Changes media to the previous item. If this method is not

supported as indicated by the absence of the `CHANGE_TO_PREV_ITEM` flag in

`PlayerCapabilities`, this method does nothing.

void SetPlaybackRate (SetPlaybackRateRequest & request, SetPlaybackRateCompleter::Sync & completer)

Sets the playback rate of the media. This will not change the playback mode. If this method

is not supported as indicated by the absense of the `SET_PLAYBACK_RATE` flag in

`PlayerCapabilities`, this method does nothing.

void SetRepeatMode (SetRepeatModeRequest & request, SetRepeatModeCompleter::Sync & completer)

Sets repeat mode to any of the supported repeat modes.

Whether this method takes effect depends on the `PlayerCapabilities` and `repeat_mode`:

* [`OFF`] is always supported.

* [`GROUP`] requires the `REPEAT_GROUPS` capability, and is otherwise ignored.

* [`SINGLE`] requires the `REPEAT_SINGLE` capability, and is otherwise ignored.

void SetShuffleMode (SetShuffleModeRequest & request, SetShuffleModeCompleter::Sync & completer)

Sets shuffle mode. If this method is not supported as indicated by the absence of the

`SHUFFLE` flag in `PlayerCapabilities`, this method does nothing.

void BindVolumeControl (BindVolumeControlRequest & request, BindVolumeControlCompleter::Sync & completer)

Binds to the session's volume control for control and notifications. If this method is not

supported as indicated by the absence of the `HAS_GAIN_CONTROL` flag in

`PlayerCapabilities`, the channel handle passed as `volume_control_request` is closed

by the service.

void WatchInfoChange (WatchInfoChangeCompleter::Sync & completer)

Gets the net player info change using the hanging get pattern.

Handler bind_handler (async_dispatcher_t * dispatcher)

|bind_handler| returns a handler that binds incoming connections to this

server implementation.

The returned handler borrows the server instance.

The server must outlive the provided |dispatcher|. Only after

the dispatcher is shutdown will it be safe to destroy the servers.

The server should not be moved.

void ~Server ()

Defined at line 1879 of file fidling/gen/sdk/fidl/fuchsia.media.sessions2/fuchsia.media.sessions2/cpp/fidl/fuchsia.media.sessions2/cpp/natural_messaging.h