### Interface

# Phosh MprisDBusMediaPlayer2Player

since: 0

#### Description [src]

    interface Phosh.MprisDBusMediaPlayer2Player : GObject.Object

Abstract interface type for the D-Bus interface org.mpris.MediaPlayer2.Player.

Available since: 0

#### Prerequisite

In order to implement MprisDBusMediaPlayer2Player, your type must inherit from`GObject`.

#### Implementations

- PhoshMprisDBusMediaPlayer2PlayerProxy
- PhoshMprisDBusMediaPlayer2PlayerSkeleton

#### Functions

###### phosh_mpris_dbus_media_player2_player_interface_info

Gets a machine-readable description of the org.mpris.MediaPlayer2.Player D-Bus interface.

since: 0

###### phosh_mpris_dbus_media_player2_player_override_properties

Overrides all `GObject` properties in the `PhoshMprisDBusMediaPlayer2Player` interface for a concrete class. The properties are overridden in the order they are defined.

since: 0

#### Instance methods

###### phosh_mpris_dbus_media_player2_player_call_next

Asynchronously invokes the Next() D-Bus method on `proxy`. When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). You can then call `phosh_mpris_dbus_media_player2_player_call_next_finish()` to get the result of the operation.

since: 0

###### phosh_mpris_dbus_media_player2_player_call_next_finish

Finishes an operation started with phosh_mpris_dbus_media_player2_player_call_next().

since: 0

###### phosh_mpris_dbus_media_player2_player_call_next_sync

Synchronously invokes the Next() D-Bus method on `proxy`. The calling thread is blocked until a reply is received.

since: 0

###### phosh_mpris_dbus_media_player2_player_call_play_pause

Asynchronously invokes the PlayPause() D-Bus method on `proxy`. When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). You can then call `phosh_mpris_dbus_media_player2_player_call_play_pause_finish()` to get the result of the operation.

since: 0

###### phosh_mpris_dbus_media_player2_player_call_play_pause_finish

Finishes an operation started with phosh_mpris_dbus_media_player2_player_call_play_pause().

since: 0

###### phosh_mpris_dbus_media_player2_player_call_play_pause_sync

Synchronously invokes the PlayPause() D-Bus method on `proxy`. The calling thread is blocked until a reply is received.

since: 0

###### phosh_mpris_dbus_media_player2_player_call_previous

Asynchronously invokes the Previous() D-Bus method on `proxy`. When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). You can then call `phosh_mpris_dbus_media_player2_player_call_previous_finish()` to get the result of the operation.

since: 0

###### phosh_mpris_dbus_media_player2_player_call_previous_finish

Finishes an operation started with phosh_mpris_dbus_media_player2_player_call_previous().

since: 0

###### phosh_mpris_dbus_media_player2_player_call_previous_sync

Synchronously invokes the Previous() D-Bus method on `proxy`. The calling thread is blocked until a reply is received.

since: 0

###### phosh_mpris_dbus_media_player2_player_call_seek

Asynchronously invokes the Seek() D-Bus method on `proxy`. When the operation is finished, `callback` will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). You can then call `phosh_mpris_dbus_media_player2_player_call_seek_finish()` to get the result of the operation.

since: 0

###### phosh_mpris_dbus_media_player2_player_call_seek_finish

Finishes an operation started with phosh_mpris_dbus_media_player2_player_call_seek().

since: 0

###### phosh_mpris_dbus_media_player2_player_call_seek_sync

Synchronously invokes the Seek() D-Bus method on `proxy`. The calling thread is blocked until a reply is received.

since: 0

###### phosh_mpris_dbus_media_player2_player_complete_next

Helper function used in service implementations to finish handling invocations of the Next() D-Bus method. If you instead want to finish handling an invocation by returning an error, use `g_dbus_method_invocation_return_error()` or similar.

since: 0

###### phosh_mpris_dbus_media_player2_player_complete_play_pause

Helper function used in service implementations to finish handling invocations of the PlayPause() D-Bus method. If you instead want to finish handling an invocation by returning an error, use `g_dbus_method_invocation_return_error()` or similar.

since: 0

###### phosh_mpris_dbus_media_player2_player_complete_previous

Helper function used in service implementations to finish handling invocations of the Previous() D-Bus method. If you instead want to finish handling an invocation by returning an error, use `g_dbus_method_invocation_return_error()` or similar.

since: 0

###### phosh_mpris_dbus_media_player2_player_complete_seek

Helper function used in service implementations to finish handling invocations of the Seek() D-Bus method. If you instead want to finish handling an invocation by returning an error, use `g_dbus_method_invocation_return_error()` or similar.

since: 0

###### phosh_mpris_dbus_media_player2_player_dup_metadata

Gets a copy of the “Metadata” D-Bus property.

since: 0

###### phosh_mpris_dbus_media_player2_player_dup_playback_status

Gets a copy of the “PlaybackStatus” D-Bus property.

since: 0

###### phosh_mpris_dbus_media_player2_player_get_can_go_next

Gets the value of the “CanGoNext” D-Bus property.

since: 0

###### phosh_mpris_dbus_media_player2_player_get_can_go_previous

Gets the value of the “CanGoPrevious” D-Bus property.

since: 0

###### phosh_mpris_dbus_media_player2_player_get_can_play

Gets the value of the “CanPlay” D-Bus property.

since: 0

###### phosh_mpris_dbus_media_player2_player_get_can_seek

Gets the value of the “CanSeek” D-Bus property.

since: 0

###### phosh_mpris_dbus_media_player2_player_get_metadata

Gets the value of the “Metadata” D-Bus property.

since: 0

###### phosh_mpris_dbus_media_player2_player_get_playback_status

Gets the value of the “PlaybackStatus” D-Bus property.

since: 0

###### phosh_mpris_dbus_media_player2_player_set_can_go_next

Sets the “CanGoNext” D-Bus property to `value`.

since: 0

###### phosh_mpris_dbus_media_player2_player_set_can_go_previous

Sets the “CanGoPrevious” D-Bus property to `value`.

since: 0

###### phosh_mpris_dbus_media_player2_player_set_can_play

Sets the “CanPlay” D-Bus property to `value`.

since: 0

###### phosh_mpris_dbus_media_player2_player_set_can_seek

Sets the “CanSeek” D-Bus property to `value`.

since: 0

###### phosh_mpris_dbus_media_player2_player_set_metadata

Sets the “Metadata” D-Bus property to `value`.

since: 0

###### phosh_mpris_dbus_media_player2_player_set_playback_status

Sets the “PlaybackStatus” D-Bus property to `value`.

since: 0

#### Properties

###### Phosh.MprisDBusMediaPlayer2Player:can-go-next

Represents the D-Bus property “CanGoNext”.

since: 0

###### Phosh.MprisDBusMediaPlayer2Player:can-go-previous

Represents the D-Bus property “CanGoPrevious”.

since: 0

###### Phosh.MprisDBusMediaPlayer2Player:can-play

Represents the D-Bus property “CanPlay”.

since: 0

###### Phosh.MprisDBusMediaPlayer2Player:can-seek

Represents the D-Bus property “CanSeek”.

since: 0

###### Phosh.MprisDBusMediaPlayer2Player:metadata

Represents the D-Bus property “Metadata”.

since: 0

###### Phosh.MprisDBusMediaPlayer2Player:playback-status

Represents the D-Bus property “PlaybackStatus”.

since: 0

#### Signals

###### Phosh.MprisDBusMediaPlayer2Player::handle-next

Signal emitted when a remote caller is invoking the Next() D-Bus method.

since: 0

###### Phosh.MprisDBusMediaPlayer2Player::handle-play-pause

Signal emitted when a remote caller is invoking the PlayPause() D-Bus method.

since: 0

###### Phosh.MprisDBusMediaPlayer2Player::handle-previous

Signal emitted when a remote caller is invoking the Previous() D-Bus method.

since: 0

###### Phosh.MprisDBusMediaPlayer2Player::handle-seek

Signal emitted when a remote caller is invoking the Seek() D-Bus method.

since: 0

#### Interface structure

    struct PhoshMprisDBusMediaPlayer2PlayerIface {
      GTypeInterface parent_iface;
      gboolean (* handle_next) (
        PhoshMprisDBusMediaPlayer2Player* object,
        GDBusMethodInvocation* invocation
      );
      gboolean (* handle_play_pause) (
        PhoshMprisDBusMediaPlayer2Player* object,
        GDBusMethodInvocation* invocation
      );
      gboolean (* handle_previous) (
        PhoshMprisDBusMediaPlayer2Player* object,
        GDBusMethodInvocation* invocation
      );
      gboolean (* handle_seek) (
        PhoshMprisDBusMediaPlayer2Player* object,
        GDBusMethodInvocation* invocation,
        gint64 arg_Offset
      );
      gboolean (* get_can_go_next) (
        PhoshMprisDBusMediaPlayer2Player* object
      );
      gboolean (* get_can_go_previous) (
        PhoshMprisDBusMediaPlayer2Player* object
      );
      gboolean (* get_can_play) (
        PhoshMprisDBusMediaPlayer2Player* object
      );
      gboolean (* get_can_seek) (
        PhoshMprisDBusMediaPlayer2Player* object
      );
      GVariant* (* get_metadata) (
        PhoshMprisDBusMediaPlayer2Player* object
      );
      const gchar* (* get_playback_status) (
        PhoshMprisDBusMediaPlayer2Player* object
      );

    }

Virtual table for the D-Bus interface org.mpris.MediaPlayer2.Player.

###### Interface members

`parent_iface`

    GTypeInterface

| The parent interface.

`handle_next`

    gboolean (* handle_next) (
        PhoshMprisDBusMediaPlayer2Player* object,
        GDBusMethodInvocation* invocation
      )

| Handler for the `PhoshMprisDBusMediaPlayer2Player::handle-next` signal.

`handle_play_pause`

    gboolean (* handle_play_pause) (
        PhoshMprisDBusMediaPlayer2Player* object,
        GDBusMethodInvocation* invocation
      )

| Handler for the `PhoshMprisDBusMediaPlayer2Player::handle-play-pause` signal.

`handle_previous`

    gboolean (* handle_previous) (
        PhoshMprisDBusMediaPlayer2Player* object,
        GDBusMethodInvocation* invocation
      )

| Handler for the `PhoshMprisDBusMediaPlayer2Player::handle-previous` signal.

`handle_seek`

    gboolean (* handle_seek) (
        PhoshMprisDBusMediaPlayer2Player* object,
        GDBusMethodInvocation* invocation,
        gint64 arg_Offset
      )

| Handler for the `PhoshMprisDBusMediaPlayer2Player::handle-seek` signal.

`get_can_go_next`

    gboolean (* get_can_go_next) (
        PhoshMprisDBusMediaPlayer2Player* object
      )

| Getter for the `PhoshMprisDBusMediaPlayer2Player:can-go-next` property.

`get_can_go_previous`

    gboolean (* get_can_go_previous) (
        PhoshMprisDBusMediaPlayer2Player* object
      )

| Getter for the `PhoshMprisDBusMediaPlayer2Player:can-go-previous` property.

`get_can_play`

    gboolean (* get_can_play) (
        PhoshMprisDBusMediaPlayer2Player* object
      )

| Getter for the `PhoshMprisDBusMediaPlayer2Player:can-play` property.

`get_can_seek`

    gboolean (* get_can_seek) (
        PhoshMprisDBusMediaPlayer2Player* object
      )

| Getter for the `PhoshMprisDBusMediaPlayer2Player:can-seek` property.

`get_metadata`

    GVariant* (* get_metadata) (
        PhoshMprisDBusMediaPlayer2Player* object
      )

| Getter for the `PhoshMprisDBusMediaPlayer2Player:metadata` property.

`get_playback_status`

    const gchar* (* get_playback_status) (
        PhoshMprisDBusMediaPlayer2Player* object
      )

| Getter for the `PhoshMprisDBusMediaPlayer2Player:playback-status` property.

#### Virtual methods

###### Phosh.MprisDBusMediaPlayer2Player.get_can_go_next

Gets the value of the “CanGoNext” D-Bus property.

since: 0

###### Phosh.MprisDBusMediaPlayer2Player.get_can_go_previous

Gets the value of the “CanGoPrevious” D-Bus property.

since: 0

###### Phosh.MprisDBusMediaPlayer2Player.get_can_play

Gets the value of the “CanPlay” D-Bus property.

since: 0

###### Phosh.MprisDBusMediaPlayer2Player.get_can_seek

Gets the value of the “CanSeek” D-Bus property.

since: 0

###### Phosh.MprisDBusMediaPlayer2Player.get_metadata

Gets the value of the “Metadata” D-Bus property.

since: 0

###### Phosh.MprisDBusMediaPlayer2Player.get_playback_status

Gets the value of the “PlaybackStatus” D-Bus property.

since: 0

###### Phosh.MprisDBusMediaPlayer2Player.handle_next

Handler for the `PhoshMprisDBusMediaPlayer2Player::handle-next` signal.

since: 0

###### Phosh.MprisDBusMediaPlayer2Player.handle_play_pause

Handler for the `PhoshMprisDBusMediaPlayer2Player::handle-play-pause` signal.

since: 0

###### Phosh.MprisDBusMediaPlayer2Player.handle_previous

Handler for the `PhoshMprisDBusMediaPlayer2Player::handle-previous` signal.

since: 0

###### Phosh.MprisDBusMediaPlayer2Player.handle_seek

Handler for the `PhoshMprisDBusMediaPlayer2Player::handle-seek` signal.

since: 0