/* util.h generated by valac 0.56.19, the Vala compiler, do not modify */

#ifndef __SRC_CLIENT_PLUGIN_MAIL_MERGE_UTIL_H__
#define __SRC_CLIENT_PLUGIN_MAIL_MERGE_UTIL_H__

#include "geary-engine.h"
#include <glib-object.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <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 MAIL_MERGE_PROCESSOR_REQUIRED_FIELDS (GEARY_EMAIL_FIELD_ENVELOPE | GEARY_EMAIL_REQUIRED_FOR_MESSAGE)

#define MAIL_MERGE_TYPE_FOLDER (mail_merge_folder_get_type ())
#define MAIL_MERGE_FOLDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MAIL_MERGE_TYPE_FOLDER, MailMergeFolder))
#define MAIL_MERGE_FOLDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MAIL_MERGE_TYPE_FOLDER, MailMergeFolderClass))
#define MAIL_MERGE_IS_FOLDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MAIL_MERGE_TYPE_FOLDER))
#define MAIL_MERGE_IS_FOLDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MAIL_MERGE_TYPE_FOLDER))
#define MAIL_MERGE_FOLDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MAIL_MERGE_TYPE_FOLDER, MailMergeFolderClass))

typedef struct _MailMergeFolder MailMergeFolder;
typedef struct _MailMergeFolderClass MailMergeFolderClass;
typedef struct _MailMergeFolderPrivate MailMergeFolderPrivate;

#define MAIL_MERGE_CSV_TYPE_READER (mail_merge_csv_reader_get_type ())
#define MAIL_MERGE_CSV_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MAIL_MERGE_CSV_TYPE_READER, MailMergeCsvReader))
#define MAIL_MERGE_CSV_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MAIL_MERGE_CSV_TYPE_READER, MailMergeCsvReaderClass))
#define MAIL_MERGE_CSV_IS_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MAIL_MERGE_CSV_TYPE_READER))
#define MAIL_MERGE_CSV_IS_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MAIL_MERGE_CSV_TYPE_READER))
#define MAIL_MERGE_CSV_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MAIL_MERGE_CSV_TYPE_READER, MailMergeCsvReaderClass))

typedef struct _MailMergeCsvReader MailMergeCsvReader;
typedef struct _MailMergeCsvReaderClass MailMergeCsvReaderClass;

#define MAIL_MERGE_CSV_TYPE_DATA_ERROR (mail_merge_csv_data_error_get_type ())
typedef struct _MailMergeCsvReaderPrivate MailMergeCsvReaderPrivate;

#define MAIL_MERGE_TYPE_PROCESSOR (mail_merge_processor_get_type ())
#define MAIL_MERGE_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MAIL_MERGE_TYPE_PROCESSOR, MailMergeProcessor))
#define MAIL_MERGE_PROCESSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MAIL_MERGE_TYPE_PROCESSOR, MailMergeProcessorClass))
#define MAIL_MERGE_IS_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MAIL_MERGE_TYPE_PROCESSOR))
#define MAIL_MERGE_IS_PROCESSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MAIL_MERGE_TYPE_PROCESSOR))
#define MAIL_MERGE_PROCESSOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MAIL_MERGE_TYPE_PROCESSOR, MailMergeProcessorClass))

typedef struct _MailMergeProcessor MailMergeProcessor;
typedef struct _MailMergeProcessorClass MailMergeProcessorClass;
typedef struct _MailMergeProcessorPrivate MailMergeProcessorPrivate;

struct _MailMergeFolder {
	GearyAbstractLocalFolder parent_instance;
	MailMergeFolderPrivate * priv;
};

struct _MailMergeFolderClass {
	GearyAbstractLocalFolderClass parent_class;
};

typedef enum  {
	MAIL_MERGE_CSV_DATA_ERROR_NON_TEXT_DATA,
	MAIL_MERGE_CSV_DATA_ERROR_UNKNOWN_EOL,
	MAIL_MERGE_CSV_DATA_ERROR_EOL_NOT_FOUND
} MailMergeCsvDataError;
#define MAIL_MERGE_CSV_DATA_ERROR mail_merge_csv_data_error_quark ()

struct _MailMergeCsvReader {
	GearyBaseObject parent_instance;
	MailMergeCsvReaderPrivate * priv;
};

struct _MailMergeCsvReaderClass {
	GearyBaseObjectClass parent_class;
};

struct _MailMergeProcessor {
	GObject parent_instance;
	MailMergeProcessorPrivate * priv;
};

struct _MailMergeProcessorClass {
	GObjectClass parent_class;
};

VALA_EXTERN GType mail_merge_folder_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MailMergeFolder, g_object_unref)
VALA_EXTERN GFile* mail_merge_folder_get_data_location (MailMergeFolder* self);
VALA_EXTERN const gchar* mail_merge_folder_get_data_display_name (MailMergeFolder* self);
VALA_EXTERN guint mail_merge_folder_get_email_sent (MailMergeFolder* self);
VALA_EXTERN guint mail_merge_folder_get_email_total (MailMergeFolder* self);
VALA_EXTERN gboolean mail_merge_folder_get_is_sending (MailMergeFolder* self);
VALA_EXTERN GType mail_merge_csv_reader_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MailMergeCsvReader, g_object_unref)
VALA_EXTERN void mail_merge_folder_new (GearyAccount* account,
                            GearyFolderRoot* root,
                            GearyEmail* template,
                            GFile* data_location,
                            MailMergeCsvReader* data,
                            GAsyncReadyCallback _callback_,
                            gpointer _user_data_);
VALA_EXTERN MailMergeFolder* mail_merge_folder_new_finish (GAsyncResult* _res_,
                                               GError** error);
VALA_EXTERN void mail_merge_folder_construct (GType object_type,
                                  GearyAccount* account,
                                  GearyFolderRoot* root,
                                  GearyEmail* template,
                                  GFile* data_location,
                                  MailMergeCsvReader* data,
                                  GAsyncReadyCallback _callback_,
                                  gpointer _user_data_);
VALA_EXTERN MailMergeFolder* mail_merge_folder_construct_finish (GAsyncResult* _res_,
                                                     GError** error);
VALA_EXTERN void mail_merge_folder_set_sending (MailMergeFolder* self,
                                    gboolean is_sending);
VALA_EXTERN GQuark mail_merge_csv_data_error_quark (void);
VALA_EXTERN GType mail_merge_csv_data_error_get_type (void) G_GNUC_CONST ;
VALA_EXTERN const gchar* mail_merge_csv_reader_get_line_ending (MailMergeCsvReader* self);
VALA_EXTERN void mail_merge_csv_reader_set_line_ending (MailMergeCsvReader* self,
                                            const gchar* value);
VALA_EXTERN gchar mail_merge_csv_reader_get_field_separator (MailMergeCsvReader* self);
VALA_EXTERN void mail_merge_csv_reader_set_field_separator (MailMergeCsvReader* self,
                                                gchar value);
VALA_EXTERN void mail_merge_csv_reader_new (GInputStream* input,
                                GCancellable* cancellable,
                                GAsyncReadyCallback _callback_,
                                gpointer _user_data_);
VALA_EXTERN MailMergeCsvReader* mail_merge_csv_reader_new_finish (GAsyncResult* _res_,
                                                      GError** error);
VALA_EXTERN void mail_merge_csv_reader_construct (GType object_type,
                                      GInputStream* input,
                                      GCancellable* cancellable,
                                      GAsyncReadyCallback _callback_,
                                      gpointer _user_data_);
VALA_EXTERN MailMergeCsvReader* mail_merge_csv_reader_construct_finish (GAsyncResult* _res_,
                                                            GError** error);
VALA_EXTERN void mail_merge_csv_reader_read_record (MailMergeCsvReader* self,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_);
VALA_EXTERN gchar** mail_merge_csv_reader_read_record_finish (MailMergeCsvReader* self,
                                                  GAsyncResult* _res_,
                                                  gint* result_length1,
                                                  GError** error);
VALA_EXTERN GType mail_merge_processor_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MailMergeProcessor, g_object_unref)
VALA_EXTERN gchar* mail_merge_processor_to_field (const gchar* name);
VALA_EXTERN gboolean mail_merge_processor_is_mail_merge_template (GearyEmail* email,
                                                      GError** error);
VALA_EXTERN gboolean mail_merge_processor_contains_field (const gchar* text);
VALA_EXTERN GearyEmail* mail_merge_processor_get_template (MailMergeProcessor* self);
VALA_EXTERN GearyComposedEmail* mail_merge_processor_get_email (MailMergeProcessor* self);
VALA_EXTERN GeeList* mail_merge_processor_get_missing_fields (MailMergeProcessor* self);
VALA_EXTERN MailMergeProcessor* mail_merge_processor_new (GearyEmail* template);
VALA_EXTERN MailMergeProcessor* mail_merge_processor_construct (GType object_type,
                                                    GearyEmail* template);
VALA_EXTERN GearyComposedEmail* mail_merge_processor_merge (MailMergeProcessor* self,
                                                GeeMap* values,
                                                GError** error);

G_END_DECLS

#endif
