SnapdChannel

SnapdChannel — Snap channel metadata

Functions

Properties

SnapdConfinement confinement Read / Write / Construct Only
gchar * epoch Read / Write / Construct Only
gchar * name Read / Write / Construct Only
GDateTime * released-at Read / Write / Construct Only
gchar * revision Read / Write / Construct Only
gint64 size Read / Write / Construct Only
gchar * version Read / Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ╰── SnapdChannel

Includes

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

Description

A SnapdChannel contains the metadata for a given snap channel as returned using snapd_snap_get_channels().

Functions

snapd_channel_get_branch ()

const gchar *
snapd_channel_get_branch (SnapdChannel *channel);

Get the branch this channel is tracking.

Parameters

channel

a SnapdChannel.

 

Returns

a branch name or NULL if not a branch.

[allow-none]

Since: 1.31


snapd_channel_get_confinement ()

SnapdConfinement
snapd_channel_get_confinement (SnapdChannel *channel);

Get the confinement this snap is using, e.g. SNAPD_CONFINEMENT_STRICT.

Parameters

channel

a SnapdChannel.

 

Returns

a SnapdConfinement.

Since: 1.22


snapd_channel_get_epoch ()

const gchar *
snapd_channel_get_epoch (SnapdChannel *channel);

Get the epoch used on this channel, e.g. "1".

Parameters

channel

a SnapdChannel.

 

Returns

an epoch.

Since: 1.22


snapd_channel_get_name ()

const gchar *
snapd_channel_get_name (SnapdChannel *channel);

Get the name of this channel, e.g. "stable".

Channel names are in the form track/risk/branch

track is the name of the feature track. Defaults to latest and is implied if the track is not present. risk is the risk of the channel, one of stable, candidate, beta or edge. branch is an optional branch name.

Example names: beta (alias to latest/beta) xenial/stable (stable release on xenial track) latest/stable/red-button (red button feature branch)

Parameters

channel

a SnapdChannel.

 

Returns

a name.

Since: 1.22


snapd_channel_get_released_at ()

GDateTime *
snapd_channel_get_released_at (SnapdChannel *channel);

Get the date this revision was released into the channel or NULL if unknown.

Parameters

channel

a SnapdChannel.

 

Returns

a GDateTime.

[transfer none][allow-none]

Since: 1.46


snapd_channel_get_revision ()

const gchar *
snapd_channel_get_revision (SnapdChannel *channel);

Get the revision for this snap. The format of the string is undefined. See also snapd_channel_get_version().

Parameters

channel

a SnapdChannel.

 

Returns

a revision string.

Since: 1.22


snapd_channel_get_risk ()

const gchar *
snapd_channel_get_risk (SnapdChannel *channel);

Get the risk this channel is on, one of stable, candidate, beta or edge.

Parameters

channel

a SnapdChannel.

 

Returns

a risk name.

Since: 1.31


snapd_channel_get_size ()

gint64
snapd_channel_get_size (SnapdChannel *channel);

Get the download size of this snap.

Parameters

channel

a SnapdChannel.

 

Returns

a byte count.

Since: 1.22


snapd_channel_get_track ()

const gchar *
snapd_channel_get_track (SnapdChannel *channel);

Get the track this channel is on.

Parameters

channel

a SnapdChannel.

 

Returns

a track name.

Since: 1.31


snapd_channel_get_version ()

const gchar *
snapd_channel_get_version (SnapdChannel *channel);

Get the version for this snap. The format of the string is undefined. See also snapd_channel_get_revision().

Parameters

channel

a SnapdChannel.

 

Returns

a version string.

Since: 1.22

Types and Values

SnapdChannel

typedef struct _SnapdChannel SnapdChannel;

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

Since: 1.22

Property Details

The “confinement” property

  “confinement”              SnapdConfinement

Confinement requested by the snap.

Flags: Read / Write / Construct Only

Default value: SNAPD_CONFINEMENT_UNKNOWN


The “epoch” property

  “epoch”                    gchar *

Epoch of this snap.

Flags: Read / Write / Construct Only

Default value: NULL


The “name” property

  “name”                     gchar *

The channel name.

Flags: Read / Write / Construct Only

Default value: NULL


The “released-at” property

  “released-at”              GDateTime *

Date revision was released into channel.

Flags: Read / Write / Construct Only


The “revision” property

  “revision”                 gchar *

Revision of this snap.

Flags: Read / Write / Construct Only

Default value: NULL


The “size” property

  “size”                     gint64

Download size in bytes.

Flags: Read / Write / Construct Only

Default value: 0


The “version” property

  “version”                  gchar *

Snap version.

Flags: Read / Write / Construct Only

Default value: NULL