1 /* Evolution calendar - iCalendar file backend for tasks
3 * Copyright (C) 2000 Ximian, Inc.
4 * Copyright (C) 2000 Ximian, Inc.
6 * Authors: Federico Mena-Quintero <federico@ximian.com>
7 * Rodrigo Moya <rodrigo@ximian.com>
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of version 2 of the GNU Lesser General Public
11 * License as published by the Free Software Foundation.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 #include "e-cal-backend-file-todos.h"
27 /* Private part of the ECalBackendFileTodos structure */
28 struct _ECalBackendFileTodosPrivate {
34 static void e_cal_backend_file_todos_class_init (ECalBackendFileTodosClass *class);
35 static void e_cal_backend_file_todos_init (ECalBackendFileTodos *cbfile, ECalBackendFileTodosClass *class);
36 static void e_cal_backend_file_todos_dispose (GObject *object);
37 static void e_cal_backend_file_todos_finalize (GObject *object);
39 static ECalBackendFileClass *parent_class;
44 * e_cal_backend_file_todos_get_type:
47 * Registers the #ECalBackendFileTodos class if necessary, and returns the type ID
50 * Return value: The type ID of the #ECalBackendFileTodos class.
53 e_cal_backend_file_todos_get_type (void)
55 static GType e_cal_backend_file_todos_type = 0;
57 if (!e_cal_backend_file_todos_type) {
58 static GTypeInfo info = {
59 sizeof (ECalBackendFileTodosClass),
61 (GBaseFinalizeFunc) NULL,
62 (GClassInitFunc) e_cal_backend_file_todos_class_init,
64 sizeof (ECalBackendFileTodos),
66 (GInstanceInitFunc) e_cal_backend_file_todos_init
68 e_cal_backend_file_todos_type = g_type_register_static (E_TYPE_CAL_BACKEND_FILE,
69 "ECalBackendFileTodos", &info, 0);
72 return e_cal_backend_file_todos_type;
75 /* Class initialization function for the file backend */
77 e_cal_backend_file_todos_class_init (ECalBackendFileTodosClass *klass)
79 GObjectClass *object_class;
80 ECalBackendClass *backend_class;
82 object_class = G_OBJECT_CLASS (klass);
83 backend_class = E_CAL_BACKEND_CLASS (klass);
85 parent_class = g_type_class_peek_parent (klass);
87 object_class->dispose = e_cal_backend_file_todos_dispose;
88 object_class->finalize = e_cal_backend_file_todos_finalize;
90 // backend_class->get_uri = e_cal_backend_file_todos_get_uri;
93 /* Object initialization function for the file backend */
95 e_cal_backend_file_todos_init (ECalBackendFileTodos *cbfile, ECalBackendFileTodosClass *class)
97 ECalBackendFileTodosPrivate *priv;
99 priv = g_new0 (ECalBackendFileTodosPrivate, 1);
102 e_cal_backend_file_set_file_name (E_CAL_BACKEND_FILE (cbfile), "tasks.ics");
105 /* Dispose handler for the file backend */
107 e_cal_backend_file_todos_dispose (GObject *object)
109 ECalBackendFileTodos *cbfile;
110 ECalBackendFileTodosPrivate *priv;
112 cbfile = E_CAL_BACKEND_FILE_TODOS (object);
115 if (G_OBJECT_CLASS (parent_class)->dispose)
116 (* G_OBJECT_CLASS (parent_class)->dispose) (object);
119 /* Finalize handler for the file backend */
121 e_cal_backend_file_todos_finalize (GObject *object)
123 ECalBackendFileTodos *cbfile;
124 ECalBackendFileTodosPrivate *priv;
126 g_return_if_fail (object != NULL);
127 g_return_if_fail (E_IS_CAL_BACKEND_FILE_TODOS (object));
129 cbfile = E_CAL_BACKEND_FILE_TODOS (object);
132 if (G_OBJECT_CLASS (parent_class)->finalize)
133 (* G_OBJECT_CLASS (parent_class)->finalize) (object);