/* OperationStatus.c generated by valac 0.30.2, the Vala compiler
 * generated from OperationStatus.vala, do not modify */

/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 2 -*- */
/*
    This file is part of Déjà Dup.
    For copyright information, see AUTHORS.

    Déjà Dup is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Déjà Dup is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Déjà Dup.  If not, see <http://www.gnu.org/licenses/>.
*/

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


#define DEJA_DUP_TYPE_OPERATION (deja_dup_operation_get_type ())
#define DEJA_DUP_OPERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEJA_DUP_TYPE_OPERATION, DejaDupOperation))
#define DEJA_DUP_OPERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEJA_DUP_TYPE_OPERATION, DejaDupOperationClass))
#define DEJA_DUP_IS_OPERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEJA_DUP_TYPE_OPERATION))
#define DEJA_DUP_IS_OPERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEJA_DUP_TYPE_OPERATION))
#define DEJA_DUP_OPERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEJA_DUP_TYPE_OPERATION, DejaDupOperationClass))

typedef struct _DejaDupOperation DejaDupOperation;
typedef struct _DejaDupOperationClass DejaDupOperationClass;
typedef struct _DejaDupOperationPrivate DejaDupOperationPrivate;

#define DEJA_DUP_TYPE_TOOL_JOB (deja_dup_tool_job_get_type ())
#define DEJA_DUP_TOOL_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEJA_DUP_TYPE_TOOL_JOB, DejaDupToolJob))
#define DEJA_DUP_TOOL_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEJA_DUP_TYPE_TOOL_JOB, DejaDupToolJobClass))
#define DEJA_DUP_IS_TOOL_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEJA_DUP_TYPE_TOOL_JOB))
#define DEJA_DUP_IS_TOOL_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEJA_DUP_TYPE_TOOL_JOB))
#define DEJA_DUP_TOOL_JOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEJA_DUP_TYPE_TOOL_JOB, DejaDupToolJobClass))

typedef struct _DejaDupToolJob DejaDupToolJob;
typedef struct _DejaDupToolJobClass DejaDupToolJobClass;

#define DEJA_DUP_TYPE_OPERATION_STATUS (deja_dup_operation_status_get_type ())
#define DEJA_DUP_OPERATION_STATUS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DEJA_DUP_TYPE_OPERATION_STATUS, DejaDupOperationStatus))
#define DEJA_DUP_OPERATION_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DEJA_DUP_TYPE_OPERATION_STATUS, DejaDupOperationStatusClass))
#define DEJA_DUP_IS_OPERATION_STATUS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DEJA_DUP_TYPE_OPERATION_STATUS))
#define DEJA_DUP_IS_OPERATION_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DEJA_DUP_TYPE_OPERATION_STATUS))
#define DEJA_DUP_OPERATION_STATUS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DEJA_DUP_TYPE_OPERATION_STATUS, DejaDupOperationStatusClass))

typedef struct _DejaDupOperationStatus DejaDupOperationStatus;
typedef struct _DejaDupOperationStatusClass DejaDupOperationStatusClass;
typedef struct _DejaDupOperationStatusPrivate DejaDupOperationStatusPrivate;

#define DEJA_DUP_TOOL_JOB_TYPE_MODE (deja_dup_tool_job_mode_get_type ())

struct _DejaDupOperation {
	GObject parent_instance;
	DejaDupOperationPrivate * priv;
	DejaDupToolJob* job;
	gchar* passphrase;
};

struct _DejaDupOperationClass {
	GObjectClass parent_class;
	void (*start) (DejaDupOperation* self, gboolean try_claim_bus, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*start_finish) (DejaDupOperation* self, GAsyncResult* _res_);
	void (*connect_to_job) (DejaDupOperation* self);
	void (*send_action_file_changed) (DejaDupOperation* self, GFile* file, gboolean actual);
	void (*operation_finished) (DejaDupOperation* self, DejaDupToolJob* job, gboolean success, gboolean cancelled, const gchar* detail, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*operation_finished_finish) (DejaDupOperation* self, GAsyncResult* _res_);
	GList* (*make_argv) (DejaDupOperation* self);
};

struct _DejaDupOperationStatus {
	DejaDupOperation parent_instance;
	DejaDupOperationStatusPrivate * priv;
};

struct _DejaDupOperationStatusClass {
	DejaDupOperationClass parent_class;
};

typedef enum  {
	DEJA_DUP_TOOL_JOB_MODE_INVALID,
	DEJA_DUP_TOOL_JOB_MODE_BACKUP,
	DEJA_DUP_TOOL_JOB_MODE_RESTORE,
	DEJA_DUP_TOOL_JOB_MODE_STATUS,
	DEJA_DUP_TOOL_JOB_MODE_LIST,
	DEJA_DUP_TOOL_JOB_MODE_HISTORY
} DejaDupToolJobMode;


static gpointer deja_dup_operation_status_parent_class = NULL;

GType deja_dup_operation_get_type (void) G_GNUC_CONST;
GType deja_dup_tool_job_get_type (void) G_GNUC_CONST;
GType deja_dup_operation_status_get_type (void) G_GNUC_CONST;
enum  {
	DEJA_DUP_OPERATION_STATUS_DUMMY_PROPERTY
};
DejaDupOperationStatus* deja_dup_operation_status_new (void);
DejaDupOperationStatus* deja_dup_operation_status_construct (GType object_type);
GType deja_dup_tool_job_mode_get_type (void) G_GNUC_CONST;
static void deja_dup_operation_status_real_connect_to_job (DejaDupOperation* base);
static void __lambda28_ (DejaDupOperationStatus* self, DejaDupToolJob* d, GList* dates);
static void ___lambda28__deja_dup_tool_job_collection_dates (DejaDupToolJob* _sender, GList* dates, gpointer self);
void deja_dup_operation_connect_to_job (DejaDupOperation* self);


DejaDupOperationStatus* deja_dup_operation_status_construct (GType object_type) {
	DejaDupOperationStatus * self = NULL;
	self = (DejaDupOperationStatus*) g_object_new (object_type, "mode", DEJA_DUP_TOOL_JOB_MODE_STATUS, NULL);
	return self;
}


DejaDupOperationStatus* deja_dup_operation_status_new (void) {
	return deja_dup_operation_status_construct (DEJA_DUP_TYPE_OPERATION_STATUS);
}


static void __lambda28_ (DejaDupOperationStatus* self, DejaDupToolJob* d, GList* dates) {
	GList* _tmp0_ = NULL;
	g_return_if_fail (d != NULL);
	_tmp0_ = dates;
	g_signal_emit_by_name (self, "collection-dates", _tmp0_);
}


static void ___lambda28__deja_dup_tool_job_collection_dates (DejaDupToolJob* _sender, GList* dates, gpointer self) {
	__lambda28_ ((DejaDupOperationStatus*) self, _sender, dates);
}


static void deja_dup_operation_status_real_connect_to_job (DejaDupOperation* base) {
	DejaDupOperationStatus * self;
	DejaDupToolJob* _tmp0_ = NULL;
	self = (DejaDupOperationStatus*) base;
	_tmp0_ = ((DejaDupOperation*) self)->job;
	g_signal_connect_object (_tmp0_, "collection-dates", (GCallback) ___lambda28__deja_dup_tool_job_collection_dates, self, 0);
	DEJA_DUP_OPERATION_CLASS (deja_dup_operation_status_parent_class)->connect_to_job (G_TYPE_CHECK_INSTANCE_CAST (self, DEJA_DUP_TYPE_OPERATION, DejaDupOperation));
}


static void deja_dup_operation_status_class_init (DejaDupOperationStatusClass * klass) {
	deja_dup_operation_status_parent_class = g_type_class_peek_parent (klass);
	((DejaDupOperationClass *) klass)->connect_to_job = deja_dup_operation_status_real_connect_to_job;
	g_signal_new ("collection_dates", DEJA_DUP_TYPE_OPERATION_STATUS, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER);
}


static void deja_dup_operation_status_instance_init (DejaDupOperationStatus * self) {
}


GType deja_dup_operation_status_get_type (void) {
	static volatile gsize deja_dup_operation_status_type_id__volatile = 0;
	if (g_once_init_enter (&deja_dup_operation_status_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (DejaDupOperationStatusClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) deja_dup_operation_status_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DejaDupOperationStatus), 0, (GInstanceInitFunc) deja_dup_operation_status_instance_init, NULL };
		GType deja_dup_operation_status_type_id;
		deja_dup_operation_status_type_id = g_type_register_static (DEJA_DUP_TYPE_OPERATION, "DejaDupOperationStatus", &g_define_type_info, 0);
		g_once_init_leave (&deja_dup_operation_status_type_id__volatile, deja_dup_operation_status_type_id);
	}
	return deja_dup_operation_status_type_id__volatile;
}



