/* click.h generated by valac 0.48.10, the Vala compiler, do not modify */

#ifndef __CLICK_H__
#define __CLICK_H__

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <json-glib/json-glib.h>

G_BEGIN_DECLS

#define CLICK_TYPE_INSTALLED_PACKAGE (click_installed_package_get_type ())
#define CLICK_INSTALLED_PACKAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLICK_TYPE_INSTALLED_PACKAGE, ClickInstalledPackage))
#define CLICK_INSTALLED_PACKAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLICK_TYPE_INSTALLED_PACKAGE, ClickInstalledPackageClass))
#define CLICK_IS_INSTALLED_PACKAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLICK_TYPE_INSTALLED_PACKAGE))
#define CLICK_IS_INSTALLED_PACKAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLICK_TYPE_INSTALLED_PACKAGE))
#define CLICK_INSTALLED_PACKAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLICK_TYPE_INSTALLED_PACKAGE, ClickInstalledPackageClass))

typedef struct _ClickInstalledPackage ClickInstalledPackage;
typedef struct _ClickInstalledPackageClass ClickInstalledPackageClass;
typedef struct _ClickInstalledPackagePrivate ClickInstalledPackagePrivate;

#define CLICK_TYPE_SINGLE_DB (click_single_db_get_type ())
#define CLICK_SINGLE_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLICK_TYPE_SINGLE_DB, ClickSingleDB))
#define CLICK_SINGLE_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLICK_TYPE_SINGLE_DB, ClickSingleDBClass))
#define CLICK_IS_SINGLE_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLICK_TYPE_SINGLE_DB))
#define CLICK_IS_SINGLE_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLICK_TYPE_SINGLE_DB))
#define CLICK_SINGLE_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLICK_TYPE_SINGLE_DB, ClickSingleDBClass))

typedef struct _ClickSingleDB ClickSingleDB;
typedef struct _ClickSingleDBClass ClickSingleDBClass;
typedef struct _ClickSingleDBPrivate ClickSingleDBPrivate;

#define CLICK_TYPE_DB (click_db_get_type ())
#define CLICK_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLICK_TYPE_DB, ClickDB))
#define CLICK_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLICK_TYPE_DB, ClickDBClass))
#define CLICK_IS_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLICK_TYPE_DB))
#define CLICK_IS_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLICK_TYPE_DB))
#define CLICK_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLICK_TYPE_DB, ClickDBClass))

typedef struct _ClickDB ClickDB;
typedef struct _ClickDBClass ClickDBClass;
typedef struct _ClickDBPrivate ClickDBPrivate;

#define CLICK_TYPE_FRAMEWORK (click_framework_get_type ())
#define CLICK_FRAMEWORK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLICK_TYPE_FRAMEWORK, ClickFramework))
#define CLICK_FRAMEWORK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLICK_TYPE_FRAMEWORK, ClickFrameworkClass))
#define CLICK_IS_FRAMEWORK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLICK_TYPE_FRAMEWORK))
#define CLICK_IS_FRAMEWORK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLICK_TYPE_FRAMEWORK))
#define CLICK_FRAMEWORK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLICK_TYPE_FRAMEWORK, ClickFrameworkClass))

typedef struct _ClickFramework ClickFramework;
typedef struct _ClickFrameworkClass ClickFrameworkClass;
typedef struct _ClickFrameworkPrivate ClickFrameworkPrivate;

#define CLICK_TYPE_HOOK (click_hook_get_type ())
#define CLICK_HOOK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLICK_TYPE_HOOK, ClickHook))
#define CLICK_HOOK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLICK_TYPE_HOOK, ClickHookClass))
#define CLICK_IS_HOOK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLICK_TYPE_HOOK))
#define CLICK_IS_HOOK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLICK_TYPE_HOOK))
#define CLICK_HOOK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLICK_TYPE_HOOK, ClickHookClass))

typedef struct _ClickHook ClickHook;
typedef struct _ClickHookClass ClickHookClass;
typedef struct _ClickHookPrivate ClickHookPrivate;

#define CLICK_TYPE_DIR (click_dir_get_type ())
#define CLICK_DIR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLICK_TYPE_DIR, ClickDir))
#define CLICK_DIR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLICK_TYPE_DIR, ClickDirClass))
#define CLICK_IS_DIR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLICK_TYPE_DIR))
#define CLICK_IS_DIR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLICK_TYPE_DIR))
#define CLICK_DIR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLICK_TYPE_DIR, ClickDirClass))

typedef struct _ClickDir ClickDir;
typedef struct _ClickDirClass ClickDirClass;
typedef struct _ClickDirPrivate ClickDirPrivate;

#define CLICK_TYPE_USERS (click_users_get_type ())
#define CLICK_USERS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLICK_TYPE_USERS, ClickUsers))
#define CLICK_USERS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLICK_TYPE_USERS, ClickUsersClass))
#define CLICK_IS_USERS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLICK_TYPE_USERS))
#define CLICK_IS_USERS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLICK_TYPE_USERS))
#define CLICK_USERS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLICK_TYPE_USERS, ClickUsersClass))

typedef struct _ClickUsers ClickUsers;
typedef struct _ClickUsersClass ClickUsersClass;
typedef struct _ClickUsersPrivate ClickUsersPrivate;

#define CLICK_TYPE_USER (click_user_get_type ())
#define CLICK_USER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLICK_TYPE_USER, ClickUser))
#define CLICK_USER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLICK_TYPE_USER, ClickUserClass))
#define CLICK_IS_USER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLICK_TYPE_USER))
#define CLICK_IS_USER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLICK_TYPE_USER))
#define CLICK_USER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLICK_TYPE_USER, ClickUserClass))

typedef struct _ClickUser ClickUser;
typedef struct _ClickUserClass ClickUserClass;
typedef struct _ClickUserPrivate ClickUserPrivate;

typedef enum  {
	CLICK_DATABASE_ERROR_DOES_NOT_EXIST,
	CLICK_DATABASE_ERROR_REMOVE,
	CLICK_DATABASE_ERROR_ENSURE_OWNERSHIP,
	CLICK_DATABASE_ERROR_BAD_MANIFEST,
	CLICK_DATABASE_ERROR_INVALID
} ClickDatabaseError;
#define CLICK_DATABASE_ERROR click_database_error_quark ()
struct _ClickInstalledPackage {
	GObject parent_instance;
	ClickInstalledPackagePrivate * priv;
};

struct _ClickInstalledPackageClass {
	GObjectClass parent_class;
};

struct _ClickSingleDB {
	GObject parent_instance;
	ClickSingleDBPrivate * priv;
};

struct _ClickSingleDBClass {
	GObjectClass parent_class;
};

struct _ClickDB {
	GObject parent_instance;
	ClickDBPrivate * priv;
};

struct _ClickDBClass {
	GObjectClass parent_class;
};

typedef enum  {
	CLICK_FRAMEWORK_ERROR_NO_SUCH_FRAMEWORK,
	CLICK_FRAMEWORK_ERROR_MISSING_FIELD
} ClickFrameworkError;
#define CLICK_FRAMEWORK_ERROR click_framework_error_quark ()
struct _ClickFramework {
	GObject parent_instance;
	ClickFrameworkPrivate * priv;
};

struct _ClickFrameworkClass {
	GObjectClass parent_class;
};

typedef enum  {
	CLICK_HOOKS_ERROR_NO_SUCH_HOOK,
	CLICK_HOOKS_ERROR_MISSING_FIELD,
	CLICK_HOOKS_ERROR_BAD_APP_NAME,
	CLICK_HOOKS_ERROR_NO_SUCH_USER,
	CLICK_HOOKS_ERROR_DROP_PRIVS,
	CLICK_HOOKS_ERROR_NYI,
	CLICK_HOOKS_ERROR_COMMAND_FAILED,
	CLICK_HOOKS_ERROR_INCOMPLETE
} ClickHooksError;
#define CLICK_HOOKS_ERROR click_hooks_error_quark ()
struct _ClickHook {
	GObject parent_instance;
	ClickHookPrivate * priv;
};

struct _ClickHookClass {
	GObjectClass parent_class;
};

struct _ClickDir {
	GObject parent_instance;
	ClickDirPrivate * priv;
};

struct _ClickDirClass {
	GObjectClass parent_class;
};

typedef enum  {
	CLICK_QUERY_ERROR_PATH,
	CLICK_QUERY_ERROR_NO_PACKAGE_DIR
} ClickQueryError;
#define CLICK_QUERY_ERROR click_query_error_quark ()
typedef enum  {
	CLICK_USER_ERROR_GETPWNAM,
	CLICK_USER_ERROR_CREATE_DB,
	CLICK_USER_ERROR_CHOWN_DB,
	CLICK_USER_ERROR_NO_SUCH_USER,
	CLICK_USER_ERROR_DROP_PRIVS,
	CLICK_USER_ERROR_REGAIN_PRIVS,
	CLICK_USER_ERROR_HIDDEN_PACKAGE,
	CLICK_USER_ERROR_NO_SUCH_PACKAGE,
	CLICK_USER_ERROR_RENAME
} ClickUserError;
#define CLICK_USER_ERROR click_user_error_quark ()
struct _ClickUsers {
	GObject parent_instance;
	ClickUsersPrivate * priv;
};

struct _ClickUsersClass {
	GObjectClass parent_class;
};

struct _ClickUser {
	GObject parent_instance;
	ClickUserPrivate * priv;
};

struct _ClickUserClass {
	GObjectClass parent_class;
};

GQuark click_database_error_quark (void);
GType click_installed_package_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClickInstalledPackage, g_object_unref)
ClickInstalledPackage* click_installed_package_new (const gchar* package,
                                                    const gchar* version,
                                                    const gchar* path,
                                                    gboolean writeable);
ClickInstalledPackage* click_installed_package_construct (GType object_type,
                                                          const gchar* package,
                                                          const gchar* version,
                                                          const gchar* path,
                                                          gboolean writeable);
const gchar* click_installed_package_get_package (ClickInstalledPackage* self);
const gchar* click_installed_package_get_version (ClickInstalledPackage* self);
const gchar* click_installed_package_get_path (ClickInstalledPackage* self);
gboolean click_installed_package_get_writeable (ClickInstalledPackage* self);
GType click_single_db_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClickSingleDB, g_object_unref)
GType click_db_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClickDB, g_object_unref)
ClickSingleDB* click_single_db_new (const gchar* root,
                                    ClickDB* master_db);
ClickSingleDB* click_single_db_construct (GType object_type,
                                          const gchar* root,
                                          ClickDB* master_db);
gchar* click_single_db_get_path (ClickSingleDB* self,
                                 const gchar* package,
                                 const gchar* version,
                                 GError** error);
gboolean click_single_db_has_package_version (ClickSingleDB* self,
                                              const gchar* package,
                                              const gchar* version);
GList* click_single_db_get_packages (ClickSingleDB* self,
                                     gboolean all_versions,
                                     GError** error);
JsonObject* click_single_db_get_manifest (ClickSingleDB* self,
                                          const gchar* package,
                                          const gchar* version,
                                          GError** error);
gchar* click_single_db_get_manifest_as_string (ClickSingleDB* self,
                                               const gchar* package,
                                               const gchar* version,
                                               GError** error);
gboolean click_single_db_app_running (ClickSingleDB* self,
                                      const gchar* package,
                                      const gchar* app_name,
                                      const gchar* version);
gboolean click_single_db_any_app_running (ClickSingleDB* self,
                                          const gchar* package,
                                          const gchar* version,
                                          GError** error);
void click_single_db_maybe_remove (ClickSingleDB* self,
                                   const gchar* package,
                                   const gchar* version,
                                   GError** error);
void click_single_db_gc (ClickSingleDB* self,
                         GError** error);
void click_single_db_ensure_ownership (ClickSingleDB* self,
                                       GError** error);
const gchar* click_single_db_get_root (ClickSingleDB* self);
ClickDB* click_db_new (void);
ClickDB* click_db_construct (GType object_type);
void click_db_read (ClickDB* self,
                    const gchar* db_dir,
                    GError** error);
ClickSingleDB* click_db_get (ClickDB* self,
                             gint index,
                             GError** error);
void click_db_add (ClickDB* self,
                   const gchar* root);
gchar* click_db_get_path (ClickDB* self,
                          const gchar* package,
                          const gchar* version,
                          GError** error);
gboolean click_db_has_package_version (ClickDB* self,
                                       const gchar* package,
                                       const gchar* version);
GList* click_db_get_packages (ClickDB* self,
                              gboolean all_versions,
                              GError** error);
JsonObject* click_db_get_manifest (ClickDB* self,
                                   const gchar* package,
                                   const gchar* version,
                                   GError** error);
gchar* click_db_get_manifest_as_string (ClickDB* self,
                                        const gchar* package,
                                        const gchar* version,
                                        GError** error);
JsonArray* click_db_get_manifests (ClickDB* self,
                                   gboolean all_versions,
                                   GError** error);
gchar* click_db_get_manifests_as_string (ClickDB* self,
                                         gboolean all_versions,
                                         GError** error);
void click_db_maybe_remove (ClickDB* self,
                            const gchar* package,
                            const gchar* version,
                            GError** error);
void click_db_gc (ClickDB* self,
                  GError** error);
void click_db_ensure_ownership (ClickDB* self,
                                GError** error);
gint click_db_get_size (ClickDB* self);
const gchar* click_db_get_overlay (ClickDB* self);
GQuark click_framework_error_quark (void);
GType click_framework_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClickFramework, g_object_unref)
ClickFramework* click_framework_open (const gchar* name,
                                      GError** error);
gboolean click_framework_has_framework (const gchar* name);
GList* click_framework_get_frameworks (void);
GList* click_framework_get_fields (ClickFramework* self);
gchar* click_framework_get_field (ClickFramework* self,
                                  const gchar* key,
                                  GError** error);
gchar* click_framework_get_base_name (ClickFramework* self);
gchar* click_framework_get_base_version (ClickFramework* self);
const gchar* click_framework_get_name (ClickFramework* self);
GQuark click_hooks_error_quark (void);
gchar* click_pattern_format (const gchar* format_string,
                             GVariant* args);
GVariant* click_pattern_possible_expansion (const gchar* s,
                                            const gchar* format_string,
                                            GVariant* args);
GType click_hook_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClickHook, g_object_unref)
ClickHook* click_hook_open (ClickDB* db,
                            const gchar* name,
                            GError** error);
GList* click_hook_open_all (ClickDB* db,
                            const gchar* hook_name,
                            GError** error);
GList* click_hook_get_fields (ClickHook* self);
gchar* click_hook_get_field (ClickHook* self,
                             const gchar* key,
                             GError** error);
gchar* click_hook_get_hook_name (ClickHook* self);
gchar* click_hook_get_short_app_id (ClickHook* self,
                                    const gchar* package,
                                    const gchar* app_name,
                                    GError** error);
gchar* click_hook_get_app_id (ClickHook* self,
                              const gchar* package,
                              const gchar* version,
                              const gchar* app_name,
                              GError** error);
gchar* click_hook_get_pattern (ClickHook* self,
                               const gchar* package,
                               const gchar* version,
                               const gchar* app_name,
                               const gchar* user_name,
                               GError** error);
gchar* click_hook_get_run_commands_user (ClickHook* self,
                                         const gchar* user_name,
                                         GError** error);
void click_hook_run_commands (ClickHook* self,
                              const gchar* user_name,
                              GError** error);
void click_hook_install_package (ClickHook* self,
                                 const gchar* package,
                                 const gchar* version,
                                 const gchar* app_name,
                                 const gchar* relative_path,
                                 const gchar* user_name,
                                 GError** error);
void click_hook_remove_package (ClickHook* self,
                                const gchar* package,
                                const gchar* version,
                                const gchar* app_name,
                                const gchar* user_name,
                                GError** error);
void click_hook_install (ClickHook* self,
                         const gchar* user_name,
                         GError** error);
void click_hook_remove (ClickHook* self,
                        const gchar* user_name,
                        GError** error);
void click_hook_sync (ClickHook* self,
                      const gchar* user_name,
                      GError** error);
gboolean click_hook_get_is_user_level (ClickHook* self);
gboolean click_hook_get_is_single_version (ClickHook* self);
void click_package_install_hooks (ClickDB* db,
                                  const gchar* package,
                                  const gchar* old_version,
                                  const gchar* new_version,
                                  const gchar* user_name,
                                  GError** error);
void click_package_remove_hooks (ClickDB* db,
                                 const gchar* package,
                                 const gchar* old_version,
                                 const gchar* user_name,
                                 GError** error);
void click_run_system_hooks (ClickDB* db,
                             GError** error);
void click_run_user_hooks (ClickDB* db,
                           const gchar* user_name,
                           GError** error);
gboolean click_find_on_path (const gchar* command);
void click_ensuredir (const gchar* directory,
                      GError** error);
void click_unlink_force (const gchar* path,
                         GError** error);
void click_symlink_force (const gchar* target,
                          const gchar* link_name,
                          GError** error);
gint click_get_umask (void);
GType click_dir_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClickDir, g_object_unref)
ClickDir* click_dir_open (const gchar* path,
                          guint _flags,
                          GError** error);
const gchar* click_dir_read_name (ClickDir* self);
gchar* click_get_hooks_dir (void);
gchar* click_get_db_dir (void);
gchar* click_get_frameworks_dir (void);
GQuark click_query_error_quark (void);
gchar* click_find_package_directory (const gchar* path,
                                     GError** error);
GQuark click_user_error_quark (void);
GType click_users_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClickUsers, g_object_unref)
ClickUsers* click_users_new (ClickDB* db);
ClickUsers* click_users_construct (GType object_type,
                                   ClickDB* db);
GList* click_users_get_user_names (ClickUsers* self,
                                   GError** error);
GType click_user_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClickUser, g_object_unref)
ClickUser* click_users_get_user (ClickUsers* self,
                                 const gchar* user_name,
                                 GError** error);
ClickUser* click_user_new_for_user (ClickDB* db,
                                    const gchar* name,
                                    GError** error);
ClickUser* click_user_construct_for_user (GType object_type,
                                          ClickDB* db,
                                          const gchar* name,
                                          GError** error);
ClickUser* click_user_new_for_all_users (ClickDB* db,
                                         GError** error);
ClickUser* click_user_construct_for_all_users (GType object_type,
                                               ClickDB* db,
                                               GError** error);
ClickUser* click_user_new_for_gc_in_use (ClickDB* db,
                                         GError** error);
ClickUser* click_user_construct_for_gc_in_use (GType object_type,
                                               ClickDB* db,
                                               GError** error);
gchar* click_user_get_overlay_db (ClickUser* self);
GList* click_user_get_package_names (ClickUser* self,
                                     GError** error);
gboolean click_user_has_package_name (ClickUser* self,
                                      const gchar* package);
gchar* click_user_get_version (ClickUser* self,
                               const gchar* package,
                               GError** error);
void click_user_set_version (ClickUser* self,
                             const gchar* package,
                             const gchar* version,
                             GError** error);
void click_user_remove (ClickUser* self,
                        const gchar* package,
                        GError** error);
gchar* click_user_get_path (ClickUser* self,
                            const gchar* package,
                            GError** error);
JsonObject* click_user_get_manifest (ClickUser* self,
                                     const gchar* package,
                                     GError** error);
gchar* click_user_get_manifest_as_string (ClickUser* self,
                                          const gchar* package,
                                          GError** error);
JsonArray* click_user_get_manifests (ClickUser* self,
                                     GError** error);
gchar* click_user_get_manifests_as_string (ClickUser* self,
                                           GError** error);
gboolean click_user_is_removable (ClickUser* self,
                                  const gchar* package);
gboolean click_user_get_is_pseudo_user (ClickUser* self);
gboolean click_user_get_is_gc_in_use (ClickUser* self);

G_END_DECLS

#endif
