playerctl-player-name: Playerctl Reference Manual

## playerctl-player-name playerctl-player-name — Contains connection information that fully qualifies a potential connection to a player. |

## Functions

void | playerctl_player_name_free ()
PlayerctlPlayerName * | playerctl_player_name_copy ()

## Types and Values

enum | PlayerctlSource
struct | PlayerctlPlayerName

## Object Hierarchy

        GBoxed
        ╰── PlayerctlPlayerName

## Description

Contains connection information that fully qualifies a potential connection to a player. You should not have to construct one of these directly. You can list the names that are available to control from the `playerctl_list_players()` function or use the “player-names” property from a PlayerctlPlayerManager.

Once you have gotten a player name like this, you can check the type of player with the "name" property to see if you are interested in connecting to it. If you are, you can pass it directly to the `playerctl_player_new_from_name()` function to get a PlayerctlPlayer that is connected to this name and ready to command and query.

## Functions

### playerctl_player_name_free ()

    void
    playerctl_player_name_free (PlayerctlPlayerName *name);

Frees `name` . If `name` is `NULL`, it simply returns.

#### Parameters

name | a PlayerctlPlayerName. | [allow-none]

### playerctl_player_name_copy ()

    PlayerctlPlayerName *
    playerctl_player_name_copy (PlayerctlPlayerName *name);

Creates a dynamically allocated name name container as a copy of `name` .

#### Parameters

name | a PlayerctlPlayerName |

#### Returns

a newly-allocated copy of `name` .

[transfer full]

## Types and Values

### enum PlayerctlSource

The source of the name used to control the player.

#### Members

PLAYERCTL_SOURCE_NONE | Only for unitialized players. Source will be chosen automatically. |
PLAYERCTL_SOURCE_DBUS_SESSION | The player is on the DBus session bus. |
PLAYERCTL_SOURCE_DBUS_SYSTEM | The player is on the DBus system bus. |

### struct PlayerctlPlayerName

    struct PlayerctlPlayerName {
        gchar *name;
        gchar *instance;
        PlayerctlSource source;
    };

Event container for when names of players appear or disapear as the controllable media player applications open and close.

#### Members

gchar *`name`; | the name of the type of player. |
gchar *`instance`; | the complete name and instance of the player. |
PlayerctlSource `source`; | the source of the player name. |