/* httpseverywhere.h generated by valac 0.56.18, 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

#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define HTTPS_EVERYWHERE_TYPE_CONTEXT_ERROR (https_everywhere_context_error_get_type ())

#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;
typedef enum  {
	HTTPS_EVERYWHERE_CONTEXT_REWRITE_RESULT_OK,
	HTTPS_EVERYWHERE_CONTEXT_REWRITE_RESULT_NO_MATCH,
	HTTPS_EVERYWHERE_CONTEXT_REWRITE_RESULT_NO_RULESET
} HTTPSEverywhereContextRewriteResult;

#define HTTPS_EVERYWHERE_CONTEXT_TYPE_REWRITE_RESULT (https_everywhere_context_rewrite_result_get_type ())

#define HTTPS_EVERYWHERE_TYPE_RULESET_ERROR (https_everywhere_ruleset_error_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;
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;

#define HTTPS_EVERYWHERE_TYPE_UPDATE_STATE (https_everywhere_update_state_get_type ())

#define HTTPS_EVERYWHERE_TYPE_UPDATE_ERROR (https_everywhere_update_error_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_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_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;
};

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

G_END_DECLS

#endif
