Client
Object Hierarchy:
Description:
[ CCode ( type_id = "snapd_client_get_type ()" ) ]
[ Version ( since = "1.0" ) ]
public class Client : Object
[ Version ( since = "1.0" ) ]
public class Client : Object
Client contains connection state with snapd.
Namespace: Snapd
Package: snapd-glib
Content:
Creation methods:
- public Client ()
Create a new client to talk to snapd.
- public Client.from_socket (Socket socket)
Create a new client to talk on an existing socket.
Methods:
- public async Change abort_change_async (string id, Cancellable? cancellable) throws Error
Asynchronously abort a change.
- public Change abort_change_sync (string id, Cancellable? cancellable = null) throws Error
Get information on a change.
- public async bool add_assertions_async (string[] assertions, Cancellable? cancellable) throws Error
Asynchronously add an assertion.
- public bool add_assertions_sync (string[] assertions, Cancellable? cancellable = null) throws Error
Add an assertion.
- public async bool alias_async (string snap, string app, string alias, ProgressCallback? progress_callback, Cancellable? cancellable) throws Error
Asynchronously create an alias to an app.
- public bool alias_sync (string snap, string app, string alias, ProgressCallback? progress_callback, Cancellable? cancellable = null) throws Error
Create an alias to an app.
- public async bool buy_async (string id, double amount, string currency, Cancellable? cancellable) throws Error
Asynchronously buy a snap from the store.
- public bool buy_sync (string id, double amount, string currency, Cancellable? cancellable = null) throws Error
Buy a snap from the store.
- public async bool check_buy_async (Cancellable? cancellable) throws Error
Asynchronously check if able to buy snaps.
- public bool check_buy_sync (Cancellable? cancellable = null) throws Error
Check if able to buy snaps.
- public async bool connect_async (Cancellable? cancellable) throws Error
This method is no longer required and does nothing, snapd-glib now connects on demand.
- public async bool connect_interface_async (string plug_snap, string plug_name, string slot_snap, string slot_name, ProgressCallback? progress_callback, Cancellable? cancellable) throws Error
Asynchronously connect two interfaces together.
- public bool connect_interface_sync (string plug_snap, string plug_name, string slot_snap, string slot_name, ProgressCallback? progress_callback, Cancellable? cancellable = null) throws Error
Connect two interfaces together.
- public bool connect_sync (Cancellable? cancellable = null) throws Error
This method is no longer required and does nothing, snapd-glib now connects on demand.
- public async UserInformation create_user_async (string email, CreateUserFlags flags, Cancellable? cancellable) throws Error
Asynchronously create a local user account.
- public UserInformation create_user_sync (string email, CreateUserFlags flags, Cancellable? cancellable = null) throws Error
Create a local user account for the given user.
- public async GenericArray<unowned UserInformation> create_users_async (Cancellable? cancellable) throws Error
Asynchronously create local user accounts using the system-user assertions that are valid for this device.
- public GenericArray<unowned UserInformation> create_users_sync (Cancellable? cancellable = null) throws Error
Create local user accounts using the system-user assertions that are valid for this device.
- public async bool disable_aliases_async (string snap, string[] aliases, ProgressCallback? progress_callback, Cancellable? cancellable) throws Error
Asynchronously change the state of aliases.
- public bool disable_aliases_sync (string snap, string[] aliases, ProgressCallback? progress_callback, Cancellable? cancellable = null) throws Error
Change the state of aliases.
- public async bool disable_async (string name, ProgressCallback? progress_callback, Cancellable? cancellable) throws Error
Asynchronously disable an installed snap.
- public bool disable_sync (string name, ProgressCallback? progress_callback, Cancellable? cancellable = null) throws Error
Disable an installed snap.
- public async bool disconnect_interface_async (string plug_snap, string plug_name, string slot_snap, string slot_name, ProgressCallback? progress_callback, Cancellable? cancellable) throws Error
Asynchronously disconnect two interfaces.
- public bool disconnect_interface_sync (string plug_snap, string plug_name, string slot_snap, string slot_name, ProgressCallback? progress_callback, Cancellable? cancellable = null) throws Error
Disconnect two interfaces.
- public async Bytes download_async (string name, string? channel, string? revision, Cancellable? cancellable) throws Error
Asynchronously download a snap.
- public Bytes download_sync (string name, string? channel, string? revision, Cancellable? cancellable = null) throws Error
Download the given snap.
- public async bool enable_aliases_async (string snap, string[] aliases, ProgressCallback? progress_callback, Cancellable? cancellable) throws Error
Asynchronously change the state of aliases.
- public bool enable_aliases_sync (string snap, string[] aliases, ProgressCallback? progress_callback, Cancellable? cancellable = null) throws Error
Change the state of aliases.
- public async bool enable_async (string name, ProgressCallback? progress_callback, Cancellable? cancellable) throws Error
Asynchronously enable an installed snap.
- public bool enable_sync (string name, ProgressCallback? progress_callback, Cancellable? cancellable = null) throws Error
Enable an installed snap.
- public async GenericArray<unowned Snap> find_async (FindFlags flags, string query, Cancellable? cancellable, out string suggested_currency) throws Error
Asynchronously find snaps in the store.
- public async GenericArray<unowned Snap> find_refreshable_async (Cancellable? cancellable) throws Error
Asynchronously find snaps in store that are newer revisions than locally installed versions.
- public GenericArray<unowned Snap> find_refreshable_sync (Cancellable? cancellable = null) throws Error
Find snaps in store that are newer revisions than locally installed versions.
- public async GenericArray<unowned Snap> find_section_async (FindFlags flags, string? section, string? query, Cancellable? cancellable, out string suggested_currency) throws Error
Asynchronously find snaps in the store.
- public GenericArray<unowned Snap> find_section_sync (FindFlags flags, string? section, string? query, out string suggested_currency, Cancellable? cancellable = null) throws Error
Find snaps in the store.
- public GenericArray<unowned Snap> find_sync (FindFlags flags, string query, out string suggested_currency, Cancellable? cancellable = null) throws Error
Find snaps in the store.
- public async GenericArray<unowned Alias> get_aliases_async (Cancellable? cancellable) throws Error
Asynchronously get the available aliases.
- public GenericArray<unowned Alias> get_aliases_sync (Cancellable? cancellable = null) throws Error
Get the available aliases.
- public bool get_allow_interaction ()
Get whether snapd operations are allowed to interact with the user.
- public async GenericArray<unowned App> get_apps2_async (GetAppsFlags flags, string[]? snaps, Cancellable? cancellable) throws Error
Asynchronously get information on installed apps.
- public GenericArray<unowned App> get_apps2_sync (GetAppsFlags flags, string[]? snaps, Cancellable? cancellable = null) throws Error
Get information on installed apps.
- public async GenericArray<unowned App> get_apps_async (GetAppsFlags flags, Cancellable? cancellable) throws Error
Asynchronously get information on installed apps.
- public GenericArray<unowned App> get_apps_sync (GetAppsFlags flags, Cancellable? cancellable = null) throws Error
Get information on installed apps.
- public async string[] get_assertions_async (string type, Cancellable? cancellable) throws Error
Asynchronously get assertions.
- public string[] get_assertions_sync (string type, Cancellable? cancellable = null) throws Error
Get assertions.
- public unowned AuthData? get_auth_data ()
Get the authorization data that is used for requests.
- public async Change get_change_async (string id, Cancellable? cancellable) throws Error
Asynchronously get information on a change.
- public Change get_change_sync (string id, Cancellable? cancellable = null) throws Error
Get information on a change.
- public async GenericArray<unowned Change> get_changes_async (ChangeFilter filter, string? snap_name, Cancellable? cancellable) throws Error
Asynchronously get changes that have occurred / are occurring on the snap daemon.
- public GenericArray<unowned Change> get_changes_sync (ChangeFilter filter, string? snap_name, Cancellable? cancellable = null) throws Error
Get changes that have occurred / are occurring on the snap daemon.
- public async bool get_connections2_async (GetConnectionsFlags flags, string? snap, string? @interface, Cancellable? cancellable, out GenericArray<unowned Connection> established, out GenericArray<unowned Connection> undesired, out GenericArray<unowned Plug> plugs, out GenericArray<unowned Slot> slots) throws Error
Asynchronously get the installed snap connections.
- public bool get_connections2_sync (GetConnectionsFlags flags, string? snap, string? @interface, out GenericArray<unowned Connection> established, out GenericArray<unowned Connection> undesired, out GenericArray<unowned Plug> plugs, out GenericArray<unowned Slot> slots, Cancellable? cancellable = null) throws Error
Get the installed snap connections.
- public async bool get_connections_async (Cancellable? cancellable, out GenericArray<unowned Connection> established, out GenericArray<unowned Connection> undesired, out GenericArray<unowned Plug> plugs, out GenericArray<unowned Slot> slots) throws Error
Asynchronously get the installed snap connections.
- public bool get_connections_sync (out GenericArray<unowned Connection> established, out GenericArray<unowned Connection> undesired, out GenericArray<unowned Plug> plugs, out GenericArray<unowned Slot> slots, Cancellable? cancellable = null) throws Error
Get the installed snap connections.
- public async Icon get_icon_async (string name, Cancellable? cancellable) throws Error
Asynchronously get the icon for an installed snap.
- public Icon get_icon_sync (string name, Cancellable? cancellable = null) throws Error
Get the icon for an installed snap.
- public async GenericArray<unowned Interface> get_interfaces2_async (GetInterfacesFlags flags, string[]? names, Cancellable? cancellable) throws Error
Asynchronously get the installed snap interfaces.
- public GenericArray<unowned Interface> get_interfaces2_sync (GetInterfacesFlags flags, string[]? names, Cancellable? cancellable = null) throws Error
Get information about the available snap interfaces.
- public async bool get_interfaces_async (Cancellable? cancellable, out GenericArray<unowned Plug> plugs, out GenericArray<unowned Slot> slots) throws Error
Asynchronously get the installed snap interfaces.
- public bool get_interfaces_sync (out GenericArray<unowned Plug> plugs, out GenericArray<unowned Slot> slots, Cancellable? cancellable = null) throws Error
Get the installed snap interfaces.
- public unowned Maintenance? get_maintenance ()
Get the maintenance information reported by snapd or null if no maintenance is in progress.
- public async string[] get_sections_async (Cancellable? cancellable) throws Error
Asynchronously get the store sections.
- public string[] get_sections_sync (Cancellable? cancellable = null) throws Error
Get the store sections.
- public async Snap get_snap_async (string name, Cancellable? cancellable) throws Error
Asynchronously get information of a single installed snap.
- public async HashTable<string,Variant> get_snap_conf_async (string name, string[]? keys, Cancellable? cancellable) throws Error
Asynchronously get configuration for a snap.
- public HashTable<string,Variant> get_snap_conf_sync (string name, string[]? keys, Cancellable? cancellable = null) throws Error
Get configuration for a snap.
- public Snap get_snap_sync (string name, Cancellable? cancellable = null) throws Error
Get information of a single installed snap.
- public async GenericArray<unowned Snap> get_snaps_async (GetSnapsFlags flags, string[]? names, Cancellable? cancellable) throws Error
Asynchronously get information on installed snaps.
- public GenericArray<unowned Snap> get_snaps_sync (GetSnapsFlags flags, string[]? names, Cancellable? cancellable = null) throws Error
Get information on installed snaps (snaps with status snapd_snap_status_active).
- public unowned string get_socket_path ()
Get the unix socket path to connect to snapd with.
- public async SystemInformation get_system_information_async (Cancellable? cancellable) throws Error
Request system information asynchronously from snapd.
- public SystemInformation get_system_information_sync (Cancellable? cancellable = null) throws Error
Request system information from snapd.
- public unowned string? get_user_agent ()
Get the HTTP user-agent that is sent with each request to snapd.
- public async GenericArray<unowned UserInformation> get_users_async (Cancellable? cancellable) throws Error
Asynchronously get user accounts that are valid for this device.
- public GenericArray<unowned UserInformation> get_users_sync (Cancellable? cancellable = null) throws Error
Get user accounts that are valid for this device.
- public async bool install2_async (InstallFlags flags, string name, string? channel, string? revision, ProgressCallback? progress_callback, Cancellable? cancellable) throws Error
Asynchronously install a snap from the store.
- public bool install2_sync (InstallFlags flags, string name, string? channel, string? revision, ProgressCallback? progress_callback, Cancellable? cancellable = null) throws Error
Install a snap from the store.
- public async bool install_async (string name, string? channel, ProgressCallback? progress_callback, Cancellable? cancellable) throws Error
Asynchronously install a snap from the store.
- public async bool install_stream_async (InstallFlags flags, InputStream stream, ProgressCallback? progress_callback, Cancellable? cancellable) throws Error
Asynchronously install a snap.
- public bool install_stream_sync (InstallFlags flags, InputStream stream, ProgressCallback? progress_callback, Cancellable? cancellable = null) throws Error
Install a snap.
- public bool install_sync (string name, string? channel, ProgressCallback? progress_callback, Cancellable? cancellable = null) throws Error
Install a snap from the store.
- public async GenericArray<unowned Snap> list_async (Cancellable? cancellable) throws Error
Asynchronously get information on all installed snaps.
- public async Snap list_one_async (string name, Cancellable? cancellable) throws Error
Asynchronously get information of a single installed snap.
- public Snap list_one_sync (string name, Cancellable? cancellable = null) throws Error
Get information of a single installed snap.
- public GenericArray<unowned Snap> list_sync (Cancellable? cancellable = null) throws Error
Get information on all installed snaps.
- public async UserInformation login2_async (string email, string password, string? otp, Cancellable? cancellable) throws Error
Asynchronously get authorization to install/remove snaps.
- public UserInformation login2_sync (string email, string password, string? otp, Cancellable? cancellable = null) throws Error
Log in to snapd and get authorization to install/remove snaps.
- public async AuthData login_async (string email, string password, string? otp, Cancellable? cancellable) throws Error
Asynchronously get authorization to install/remove snaps.
- public AuthData login_sync (string email, string password, string? otp, Cancellable? cancellable = null) throws Error
Log in to snapd and get authorization to install/remove snaps.
- public async bool logout_async (int64 id, Cancellable? cancellable) throws Error
Asynchronously log out from the snap store.
- public bool logout_sync (int64 id, Cancellable? cancellable = null) throws Error
Log out from snapd.
- public async bool prefer_async (string snap, ProgressCallback? progress_callback, Cancellable? cancellable) throws Error
Asynchronously ???.
- public bool prefer_sync (string snap, ProgressCallback? progress_callback, Cancellable? cancellable = null) throws Error
???
- public async string[] refresh_all_async (ProgressCallback? progress_callback, Cancellable? cancellable) throws Error
Asynchronously ensure all snaps are updated to their latest versions.
- public string[] refresh_all_sync (ProgressCallback? progress_callback, Cancellable? cancellable = null) throws Error
Update all installed snaps to their latest version.
- public async bool refresh_async (string name, string? channel, ProgressCallback? progress_callback, Cancellable? cancellable) throws Error
Asynchronously ensure an installed snap is at the latest version.
- public bool refresh_sync (string name, string? channel, ProgressCallback? progress_callback, Cancellable? cancellable = null) throws Error
Ensure an installed snap is at the latest version.
- public async bool remove2_async (RemoveFlags flags, string name, ProgressCallback? progress_callback, Cancellable? cancellable) throws Error
Asynchronously uninstall a snap.
- public bool remove2_sync (RemoveFlags flags, string name, ProgressCallback? progress_callback, Cancellable? cancellable = null) throws Error
Uninstall a snap.
- public async bool remove_async (string name, ProgressCallback? progress_callback, Cancellable? cancellable) throws Error
Asynchronously uninstall a snap.
- public bool remove_sync (string name, ProgressCallback? progress_callback, Cancellable? cancellable = null) throws Error
Uninstall a snap.
- public async bool reset_aliases_async (string snap, string[] aliases, ProgressCallback? progress_callback, Cancellable? cancellable) throws Error
Asynchronously change the state of aliases.
- public bool reset_aliases_sync (string snap, string[] aliases, ProgressCallback? progress_callback, Cancellable? cancellable = null) throws Error
Change the state of aliases.
- public async bool run_snapctl_async (string context_id, string[] args, Cancellable? cancellable, out string stdout_output, out string stderr_output) throws Error
Asynchronously run a snapctl command.
- public bool run_snapctl_sync (string context_id, string[] args, out string[] stdout_output, out string[] stderr_output, Cancellable? cancellable = null) throws Error
Run a snapctl command.
- public void set_allow_interaction (bool allow_interaction)
Set whether snapd operations are allowed to interact with the user.
- public void set_auth_data (AuthData? auth_data)
Set the authorization data to use for requests.
- public async bool set_snap_conf_async (string name, HashTable<string,Variant> key_values, Cancellable? cancellable) throws Error
Asynchronously set configuration for a snap.
- public bool set_snap_conf_sync (string name, HashTable<string,Variant> key_values, Cancellable? cancellable = null) throws Error
Set configuration for a snap.
- public void set_socket_path (string? socket_path)
Set the Unix socket path to connect to snapd with.
- public void set_user_agent (string? user_agent)
Set the HTTP user-agent that is sent with each request to snapd.
- public async bool switch_async (string name, string channel, ProgressCallback? progress_callback, Cancellable? cancellable) throws Error
Asynchronously set the tracking channel on an installed snap.
- public bool switch_sync (string name, string channel, ProgressCallback? progress_callback, Cancellable? cancellable = null) throws Error
Set the tracking channel on an installed snap.
- public async bool try_async (string path, ProgressCallback? progress_callback, Cancellable? cancellable) throws Error
Asynchronously try a snap.
- public bool try_sync (string path, ProgressCallback? progress_callback, Cancellable? cancellable = null) throws Error
Try a snap.
- public async bool unalias_async (string? snap, string? alias, ProgressCallback? progress_callback, Cancellable? cancellable) throws Error
Asynchronously remove an alias from an app.
- public bool unalias_sync (string? snap, string? alias, ProgressCallback? progress_callback, Cancellable? cancellable = null) throws Error
Remove an alias from an app.
Inherited Members:
All known members inherited from class GLib.Object