SnapdPlug

SnapdPlug — Snap plugs

Functions

const gchar * snapd_plug_get_name ()
const gchar * snapd_plug_get_snap ()
const gchar * snapd_plug_get_interface ()
const gchar * snapd_plug_get_label ()
GPtrArray * snapd_plug_get_connections ()

Properties

GPtrArray * connections Read / Write / Construct Only
gchar * interface Read / Write / Construct Only
gchar * label Read / Write / Construct Only
gchar * name Read / Write / Construct Only
gchar * snap Read / Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ╰── SnapdPlug

Includes

#include <snapd-glib/snapd-glib.h>

Description

A SnapdPlug represents a part of a snap that can be connected to a SnapdSlot on another snap. Available plugs can be queried using snapd_client_get_interfaces_sync(). Plugs can be connected / disconnected using snapd_client_connect_interface_sync() and snapd_client_disconnect_interface_sync().

Functions

snapd_plug_get_name ()

const gchar *
snapd_plug_get_name (SnapdPlug *plug);

Get the name of this plug.

Parameters

plug

a SnapdPlug.

 

Returns

a name.


snapd_plug_get_snap ()

const gchar *
snapd_plug_get_snap (SnapdPlug *plug);

Get the snap this plug is on.

Parameters

plug

a SnapdPlug.

 

Returns

a snap name.


snapd_plug_get_interface ()

const gchar *
snapd_plug_get_interface (SnapdPlug *plug);

Get the name of the interface this plug provides.

Parameters

plug

a SnapdPlug.

 

Returns

an interface name.


snapd_plug_get_label ()

const gchar *
snapd_plug_get_label (SnapdPlug *plug);

Get a human readable label for this plug.

Parameters

plug

a SnapdPlug.

 

Returns

a label.


snapd_plug_get_connections ()

GPtrArray *
snapd_plug_get_connections (SnapdPlug *plug);

Get the connections being made with this plug.

Parameters

plug

a SnapdPlug.

 

Returns

an array of SnapdConnection.

[transfer none][element-type SnapdConnection]

Types and Values

SnapdPlug

typedef struct _SnapdPlug SnapdPlug;

SnapdPlug is an opaque data structure and can only be accessed using the provided functions.

Property Details

The “connections” property

  “connections”              GPtrArray *

Connections with this plug.

Flags: Read / Write / Construct Only


The “interface” property

  “interface”                gchar *

Interface this plug provides.

Flags: Read / Write / Construct Only

Default value: NULL


The “label” property

  “label”                    gchar *

Short description of this plug.

Flags: Read / Write / Construct Only

Default value: NULL


The “name” property

  “name”                     gchar *

Plug name.

Flags: Read / Write / Construct Only

Default value: NULL


The “snap” property

  “snap”                     gchar *

Snap this plug is on.

Flags: Read / Write / Construct Only

Default value: NULL