1
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
4
* Copyright (C) Philip Withnall 2010 <philip@tecnocode.co.uk>
6
* Almanah is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation, either version 3 of the License, or
9
* (at your option) any later version.
11
* Almanah is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with Almanah. If not, see <http://www.gnu.org/licenses/>.
20
#ifndef ALMANAH_EXPORT_OPERATION_H
21
#define ALMANAH_EXPORT_OPERATION_H
24
#include <glib-object.h>
28
typedef guint AlmanahExportOperationType;
30
typedef void (*AlmanahExportProgressCallback) (const GDate *date, gpointer user_data);
32
#define ALMANAH_TYPE_EXPORT_OPERATION (almanah_export_operation_get_type ())
33
#define ALMANAH_EXPORT_OPERATION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), ALMANAH_TYPE_EXPORT_OPERATION, AlmanahExportOperation))
34
#define ALMANAH_EXPORT_OPERATION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), ALMANAH_TYPE_EXPORT_OPERATION, AlmanahExportOperationClass))
35
#define ALMANAH_IS_EXPORT_OPERATION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), ALMANAH_TYPE_EXPORT_OPERATION))
36
#define ALMANAH_IS_EXPORT_OPERATION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), ALMANAH_TYPE_EXPORT_OPERATION))
37
#define ALMANAH_EXPORT_OPERATION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), ALMANAH_TYPE_EXPORT_OPERATION, AlmanahExportOperationClass))
39
typedef struct _AlmanahExportOperationPrivate AlmanahExportOperationPrivate;
43
AlmanahExportOperationPrivate *priv;
44
} AlmanahExportOperation;
48
} AlmanahExportOperationClass;
50
GType almanah_export_operation_get_type (void) G_GNUC_CONST;
52
AlmanahExportOperation *almanah_export_operation_new (AlmanahExportOperationType type_id, GFile *destination) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
54
void almanah_export_operation_run (AlmanahExportOperation *self, GCancellable *cancellable,
55
AlmanahExportProgressCallback progress_callback, gpointer progress_user_data,
56
GAsyncReadyCallback callback, gpointer user_data);
57
gboolean almanah_export_operation_finish (AlmanahExportOperation *self, GAsyncResult *async_result, GError **error);
59
void almanah_export_operation_populate_model (GtkListStore *list_store, guint type_id_column, guint name_column, guint description_column,
64
#endif /* !ALMANAH_EXPORT_OPERATION_H */