Top |
gboolean | gadget | Read / Write / Construct Only |
gchar * | interface | Read / Write / Construct Only |
gboolean | manual | Read / Write / Construct Only |
gchar * | name | Read / Write / Construct Only |
SnapdPlugRef * | plug | Read / Write / Construct Only |
GHashTable * | plug-attrs | Read / Write / Construct Only |
SnapdSlotRef * | slot | Read / Write / Construct Only |
GHashTable * | slot-attrs | Read / Write / Construct Only |
gchar * | snap | Read / Write / Construct Only |
A SnapdConnection contains information about how a SnapdPlug is connected
to a SnapdSlot. Connections are queried using snapd_client_get_connections_sync()
.
const gchar *
snapd_connection_get_interface (SnapdConnection *connection
);
Get the interface this connections uses.
Since: 1.48
SnapdSlotRef *
snapd_connection_get_slot (SnapdConnection *connection
);
Get the slot this connection is made with.
Since: 1.48
SnapdPlugRef *
snapd_connection_get_plug (SnapdConnection *connection
);
Get the plug this connection is made with.
Since: 1.48
gboolean
snapd_connection_get_manual (SnapdConnection *connection
);
Get if this connection was made manually.
Since: 1.48
gboolean
snapd_connection_get_gadget (SnapdConnection *connection
);
Get if this connection was made by the gadget snap.
Since: 1.48
GStrv snapd_connection_get_slot_attribute_names (SnapdConnection *connection
,guint *length
);
Get the names of the attributes the connected slot has.
connection |
||
length |
location to write number of attributes or |
[out][allow-none] |
a string array of attribute names. Free with g_strfreev()
.
[transfer full][array zero-terminated=1]
Since: 1.48
gboolean snapd_connection_has_slot_attribute (SnapdConnection *connection
,const gchar *name
);
Check if the connected slot has an attribute.
Since: 1.48
GVariant * snapd_connection_get_slot_attribute (SnapdConnection *connection
,const gchar *name
);
Get an attribute for connected slot.
Since: 1.48
GStrv snapd_connection_get_plug_attribute_names (SnapdConnection *connection
,guint *length
);
Get the names of the attributes the connected plug has.
connection |
||
length |
location to write number of attributes or |
[out][allow-none] |
a string array of attribute names. Free with g_strfreev()
.
[transfer full][array zero-terminated=1]
Since: 1.48
gboolean snapd_connection_has_plug_attribute (SnapdConnection *connection
,const gchar *name
);
Check if the connected plug has an attribute.
Since: 1.48
GVariant * snapd_connection_get_plug_attribute (SnapdConnection *connection
,const gchar *name
);
Get an attribute for connected plug.
Since: 1.48
const gchar *
snapd_connection_get_name (SnapdConnection *connection
);
snapd_connection_get_name
has been deprecated since version 1.48 and should not be used in newly-written code.
Get the name of this connection (i.e. a slot or plug name).
Since: 1.0
const gchar *
snapd_connection_get_snap (SnapdConnection *connection
);
snapd_connection_get_snap
has been deprecated since version 1.48 and should not be used in newly-written code.
Get the snap this connection is on.
Since: 1.0
typedef struct _SnapdConnection SnapdConnection;
SnapdConnection contains the state of Snap a interface connection.
Since: 1.0
“gadget”
property“gadget” gboolean
TRUE if connection was made by the gadget snap.
Flags: Read / Write / Construct Only
Default value: FALSE
“interface”
property“interface” gchar *
Interface this connection uses.
Flags: Read / Write / Construct Only
Default value: NULL
“manual”
property“manual” gboolean
TRUE if connection was made manually.
Flags: Read / Write / Construct Only
Default value: FALSE
“name”
property“name” gchar *
Name of connection/plug on snap.
Flags: Read / Write / Construct Only
Default value: NULL
“plug”
property“plug” SnapdPlugRef *
Plug this connection is made with.
Flags: Read / Write / Construct Only
“plug-attrs”
property“plug-attrs” GHashTable *
Attributes for connected plug.
Flags: Read / Write / Construct Only
“slot”
property“slot” SnapdSlotRef *
Slot this connection is made with.
Flags: Read / Write / Construct Only
“slot-attrs”
property“slot-attrs” GHashTable *
Attributes for connected slot.
Flags: Read / Write / Construct Only
“snap”
property“snap” gchar *
Snap this connection is made to.
Flags: Read / Write / Construct Only
Default value: NULL