/* httpseverywhere.h generated by valac 0.38.6, the Vala compiler, do not modify */


#ifndef __SRC_HTTPSEVERYWHERE_H__
#define __SRC_HTTPSEVERYWHERE_H__

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

G_BEGIN_DECLS


#define HTTPS_EVERYWHERE_TYPE_CONTEXT (https_everywhere_context_get_type ())
#define HTTPS_EVERYWHERE_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), HTTPS_EVERYWHERE_TYPE_CONTEXT, HTTPSEverywhereContext))
#define HTTPS_EVERYWHERE_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), HTTPS_EVERYWHERE_TYPE_CONTEXT, HTTPSEverywhereContextClass))
#define HTTPS_EVERYWHERE_IS_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), HTTPS_EVERYWHERE_TYPE_CONTEXT))
#define HTTPS_EVERYWHERE_IS_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), HTTPS_EVERYWHERE_TYPE_CONTEXT))
#define HTTPS_EVERYWHERE_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), HTTPS_EVERYWHERE_TYPE_CONTEXT, HTTPSEverywhereContextClass))

typedef struct _HTTPSEverywhereContext HTTPSEverywhereContext;
typedef struct _HTTPSEverywhereContextClass HTTPSEverywhereContextClass;
typedef struct _HTTPSEverywhereContextPrivate HTTPSEverywhereContextPrivate;

#define HTTPS_EVERYWHERE_CONTEXT_TYPE_REWRITE_RESULT (https_everywhere_context_rewrite_result_get_type ())

#define HTTPS_EVERYWHERE_TYPE_RULESET (https_everywhere_ruleset_get_type ())
#define HTTPS_EVERYWHERE_RULESET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), HTTPS_EVERYWHERE_TYPE_RULESET, HTTPSEverywhereRuleset))
#define HTTPS_EVERYWHERE_RULESET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), HTTPS_EVERYWHERE_TYPE_RULESET, HTTPSEverywhereRulesetClass))
#define HTTPS_EVERYWHERE_IS_RULESET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), HTTPS_EVERYWHERE_TYPE_RULESET))
#define HTTPS_EVERYWHERE_IS_RULESET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), HTTPS_EVERYWHERE_TYPE_RULESET))
#define HTTPS_EVERYWHERE_RULESET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), HTTPS_EVERYWHERE_TYPE_RULESET, HTTPSEverywhereRulesetClass))

typedef struct _HTTPSEverywhereRuleset HTTPSEverywhereRuleset;
typedef struct _HTTPSEverywhereRulesetClass HTTPSEverywhereRulesetClass;
typedef struct _HTTPSEverywhereRulesetPrivate HTTPSEverywhereRulesetPrivate;

#define HTTPS_EVERYWHERE_TYPE_TARGET (https_everywhere_target_get_type ())
#define HTTPS_EVERYWHERE_TARGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), HTTPS_EVERYWHERE_TYPE_TARGET, HTTPSEverywhereTarget))
#define HTTPS_EVERYWHERE_TARGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), HTTPS_EVERYWHERE_TYPE_TARGET, HTTPSEverywhereTargetClass))
#define HTTPS_EVERYWHERE_IS_TARGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), HTTPS_EVERYWHERE_TYPE_TARGET))
#define HTTPS_EVERYWHERE_IS_TARGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), HTTPS_EVERYWHERE_TYPE_TARGET))
#define HTTPS_EVERYWHERE_TARGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), HTTPS_EVERYWHERE_TYPE_TARGET, HTTPSEverywhereTargetClass))

typedef struct _HTTPSEverywhereTarget HTTPSEverywhereTarget;
typedef struct _HTTPSEverywhereTargetClass HTTPSEverywhereTargetClass;
typedef struct _HTTPSEverywhereTargetPrivate HTTPSEverywhereTargetPrivate;

#define HTTPS_EVERYWHERE_TYPE_UPDATE_STATE (https_everywhere_update_state_get_type ())

#define HTTPS_EVERYWHERE_TYPE_UPDATER (https_everywhere_updater_get_type ())
#define HTTPS_EVERYWHERE_UPDATER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), HTTPS_EVERYWHERE_TYPE_UPDATER, HTTPSEverywhereUpdater))
#define HTTPS_EVERYWHERE_UPDATER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), HTTPS_EVERYWHERE_TYPE_UPDATER, HTTPSEverywhereUpdaterClass))
#define HTTPS_EVERYWHERE_IS_UPDATER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), HTTPS_EVERYWHERE_TYPE_UPDATER))
#define HTTPS_EVERYWHERE_IS_UPDATER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), HTTPS_EVERYWHERE_TYPE_UPDATER))
#define HTTPS_EVERYWHERE_UPDATER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), HTTPS_EVERYWHERE_TYPE_UPDATER, HTTPSEverywhereUpdaterClass))

typedef struct _HTTPSEverywhereUpdater HTTPSEverywhereUpdater;
typedef struct _HTTPSEverywhereUpdaterClass HTTPSEverywhereUpdaterClass;
typedef struct _HTTPSEverywhereUpdaterPrivate HTTPSEverywhereUpdaterPrivate;

typedef enum  {
	HTTPS_EVERYWHERE_CONTEXT_ERROR_NOT_IMPLEMENTED
} HTTPSEverywhereContextError;
#define HTTPS_EVERYWHERE_CONTEXT_ERROR https_everywhere_context_error_quark ()
struct _HTTPSEverywhereContext {
	GObject parent_instance;
	HTTPSEverywhereContextPrivate * priv;
};

struct _HTTPSEverywhereContextClass {
	GObjectClass parent_class;
};

typedef enum  {
	HTTPS_EVERYWHERE_CONTEXT_REWRITE_RESULT_OK,
	HTTPS_EVERYWHERE_CONTEXT_REWRITE_RESULT_NO_MATCH,
	HTTPS_EVERYWHERE_CONTEXT_REWRITE_RESULT_NO_RULESET
} HTTPSEverywhereContextRewriteResult;

typedef enum  {
	HTTPS_EVERYWHERE_RULESET_ERROR_PARSE_ERROR
} HTTPSEverywhereRulesetError;
#define HTTPS_EVERYWHERE_RULESET_ERROR https_everywhere_ruleset_error_quark ()
struct _HTTPSEverywhereRuleset {
	GObject parent_instance;
	HTTPSEverywhereRulesetPrivate * priv;
};

struct _HTTPSEverywhereRulesetClass {
	GObjectClass parent_class;
};

struct _HTTPSEverywhereTarget {
	GObject parent_instance;
	HTTPSEverywhereTargetPrivate * priv;
};

struct _HTTPSEverywhereTargetClass {
	GObjectClass parent_class;
};

typedef enum  {
	HTTPS_EVERYWHERE_UPDATE_STATE_FINISHED,
	HTTPS_EVERYWHERE_UPDATE_STATE_CHECKING_AVAILABILITY,
	HTTPS_EVERYWHERE_UPDATE_STATE_DOWNLOADING_XPI,
	HTTPS_EVERYWHERE_UPDATE_STATE_DECOMPRESSING_XPI,
	HTTPS_EVERYWHERE_UPDATE_STATE_COPYING_RULES
} HTTPSEverywhereUpdateState;

typedef enum  {
	HTTPS_EVERYWHERE_UPDATE_ERROR_IN_PROGRESS,
	HTTPS_EVERYWHERE_UPDATE_ERROR_NO_UPDATE_AVAILABLE,
	HTTPS_EVERYWHERE_UPDATE_ERROR_CANT_REACH_SERVER,
	HTTPS_EVERYWHERE_UPDATE_ERROR_CANT_READ_HTTP_BODY,
	HTTPS_EVERYWHERE_UPDATE_ERROR_CANT_READ_FROM_ARCHIVE,
	HTTPS_EVERYWHERE_UPDATE_ERROR_NO_RULESET_FILE,
	HTTPS_EVERYWHERE_UPDATE_ERROR_WRITE_FAILED
} HTTPSEverywhereUpdateError;
#define HTTPS_EVERYWHERE_UPDATE_ERROR https_everywhere_update_error_quark ()
struct _HTTPSEverywhereUpdater {
	GObject parent_instance;
	HTTPSEverywhereUpdaterPrivate * priv;
};

struct _HTTPSEverywhereUpdaterClass {
	GObjectClass parent_class;
};


GQuark https_everywhere_context_error_quark (void);
GType https_everywhere_context_get_type (void) G_GNUC_CONST;
GType https_everywhere_context_rewrite_result_get_type (void) G_GNUC_CONST;
HTTPSEverywhereContext* https_everywhere_context_new (void);
HTTPSEverywhereContext* https_everywhere_context_construct (GType object_type);
void https_everywhere_context_init (HTTPSEverywhereContext* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
void https_everywhere_context_init_finish (HTTPSEverywhereContext* self, GAsyncResult* _res_, GError** error);
HTTPSEverywhereContextRewriteResult https_everywhere_context_rewrite_result (HTTPSEverywhereContext* self);
gchar* https_everywhere_context_rewrite (HTTPSEverywhereContext* self, const gchar* url);
gboolean https_everywhere_context_has_https (HTTPSEverywhereContext* self, const gchar* url);
void https_everywhere_context_ignore_ruleset (HTTPSEverywhereContext* self, guint id);
void https_everywhere_context_unignore_ruleset (HTTPSEverywhereContext* self, guint id);
void https_everywhere_context_ignore_host (HTTPSEverywhereContext* self, const gchar* host);
void https_everywhere_context_unignore_host (HTTPSEverywhereContext* self, const gchar* host);
gboolean https_everywhere_context_get_initialized (HTTPSEverywhereContext* self);
GQuark https_everywhere_ruleset_error_quark (void);
GType https_everywhere_ruleset_get_type (void) G_GNUC_CONST;
HTTPSEverywhereRuleset* https_everywhere_ruleset_new (void);
HTTPSEverywhereRuleset* https_everywhere_ruleset_construct (GType object_type);
HTTPSEverywhereRuleset* https_everywhere_ruleset_new_from_json (JsonNode* root, GError** error);
HTTPSEverywhereRuleset* https_everywhere_ruleset_construct_from_json (GType object_type, JsonNode* root, GError** error);
void https_everywhere_ruleset_add_rule (HTTPSEverywhereRuleset* self, const gchar* from, const gchar* to);
void https_everywhere_ruleset_add_exclusion (HTTPSEverywhereRuleset* self, const gchar* exclusion);
void https_everywhere_ruleset_add_target (HTTPSEverywhereRuleset* self, const gchar* host);
gchar* https_everywhere_ruleset_rewrite (HTTPSEverywhereRuleset* self, const gchar* url);
GType https_everywhere_target_get_type (void) G_GNUC_CONST;
GeeArrayList* https_everywhere_ruleset_get_targets (HTTPSEverywhereRuleset* self);
HTTPSEverywhereTarget* https_everywhere_target_new (const gchar* host);
HTTPSEverywhereTarget* https_everywhere_target_construct (GType object_type, const gchar* host);
gboolean https_everywhere_target_matches (HTTPSEverywhereTarget* self, const gchar* url);
const gchar* https_everywhere_target_get_host (HTTPSEverywhereTarget* self);
void https_everywhere_target_set_host (HTTPSEverywhereTarget* self, const gchar* value);
GType https_everywhere_update_state_get_type (void) G_GNUC_CONST;
GQuark https_everywhere_update_error_quark (void);
GType https_everywhere_updater_get_type (void) G_GNUC_CONST;
HTTPSEverywhereUpdater* https_everywhere_updater_new (HTTPSEverywhereContext* context);
HTTPSEverywhereUpdater* https_everywhere_updater_construct (GType object_type, HTTPSEverywhereContext* context);
void https_everywhere_updater_update (HTTPSEverywhereUpdater* self, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
void https_everywhere_updater_update_finish (HTTPSEverywhereUpdater* self, GAsyncResult* _res_, GError** error);
HTTPSEverywhereUpdateState https_everywhere_updater_get_update_state (HTTPSEverywhereUpdater* self);


G_END_DECLS

#endif
