Snapd.Plug

g GObject.Object GObject.Object Snapd.Plug Snapd.Plug GObject.Object->Snapd.Plug

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

get_attribute (name)

get_attribute_names ()

get_connected_slots ()

get_connections ()

get_interface ()

get_label ()

get_name ()

get_snap ()

has_attribute (name)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

attributes

GLib.HashTable

r/w/co

Attributes for this plug

connections

GLib.PtrArray

r/w/co

Connections with this plug

interface

str

r/w/co

Interface this plug provides

label

str

r/w/co

Short description of this plug

name

str

r/w/co

Plug name

snap

str

r/w/co

Snap this plug is on

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Snapd.Plug(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Snapd.PlugClass

Snapd.Plug contains information about a Snap plug.

New in version 1.0.

get_attribute(name)
Parameters:

name (str) – an attribute name.

Returns:

an attribute value or None if not set.

Return type:

GLib.Variant or None

Get an attribute for this interface.

New in version 1.3.

get_attribute_names()
Returns:

a string array of attribute names. Free with GLib.strfreev().

length:

location to write number of attributes or None if not required.

Return type:

([str], length: int)

Get the names of the attributes this plug has.

New in version 1.3.

get_connected_slots()
Returns:

an array of Snapd.SlotRef.

Return type:

[Snapd.SlotRef]

Get the slots connected to this plug.

New in version 1.48.

get_connections()
Returns:

an array of Snapd.Connection.

Return type:

[Snapd.Connection]

Get the connections being made with this plug.

New in version 1.0.

Deprecated since version 1.48: Use Snapd.Plug.get_connected_slots()

get_interface()
Returns:

an interface name.

Return type:

str

Get the name of the interface this plug provides.

New in version 1.0.

get_label()
Returns:

a label.

Return type:

str

Get a human readable label for this plug.

New in version 1.0.

get_name()
Returns:

a name.

Return type:

str

Get the name of this plug.

New in version 1.0.

get_snap()
Returns:

a snap name.

Return type:

str

Get the snap this plug is on.

New in version 1.0.

has_attribute(name)
Parameters:

name (str) – an attribute name.

Returns:

True if this attribute exists.

Return type:

bool

Check if this plug has an attribute.

New in version 1.3.

Property Details

Snapd.Plug.props.attributes
Name:

attributes

Type:

GLib.HashTable

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Attributes for this plug

Snapd.Plug.props.connections
Name:

connections

Type:

GLib.PtrArray

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Connections with this plug

Snapd.Plug.props.interface
Name:

interface

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Interface this plug provides

Snapd.Plug.props.label
Name:

label

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Short description of this plug

Snapd.Plug.props.name
Name:

name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Plug name

Snapd.Plug.props.snap
Name:

snap

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Snap this plug is on