2 * captive wrapper of GnomeVFSFileInfo interface to reactos
3 * Copyright (C) 2005 Jan Kratochvil <project-captive@jankratochvil.net>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; exactly version 2 of June 1991 is required
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #include "captive/client-file-info.h" /* self */
23 #include <glib/gmessages.h>
25 #include "reactos/ntos/types.h" /* for ULONG */
28 struct _CaptiveFileInfoObjectClass {
29 GObjectClass parent_class;
33 static gpointer captive_file_info_object_parent_class=NULL;
36 static void captive_file_info_object_finalize(CaptiveFileInfoObject *captive_file_info_object)
38 g_return_if_fail(captive_file_info_object!=NULL);
40 gnome_vfs_file_info_clear(&captive_file_info_object->p);
42 G_OBJECT_CLASS(captive_file_info_object_parent_class)->finalize((GObject *)captive_file_info_object);
46 static void captive_file_info_object_class_init(CaptiveFileInfoObjectClass *class)
48 GObjectClass *gobject_class=G_OBJECT_CLASS(class);
50 captive_file_info_object_parent_class=g_type_class_ref(g_type_parent(G_TYPE_FROM_CLASS(class)));
51 gobject_class->finalize=(void (*)(GObject *object))captive_file_info_object_finalize;
55 static void captive_file_info_object_init(CaptiveFileInfoObject *captive_file_info_object)
60 GType captive_file_info_object_get_type(void)
62 static GType captive_file_info_object_type=0;
64 if (!captive_file_info_object_type) {
65 static const GTypeInfo captive_file_info_object_info={
66 sizeof(CaptiveFileInfoObjectClass),
68 NULL, /* base_finalize */
69 (GClassInitFunc)captive_file_info_object_class_init,
70 NULL, /* class_finalize */
71 NULL, /* class_data */
72 sizeof(CaptiveFileInfoObject),
74 (GInstanceInitFunc)captive_file_info_object_init,
77 captive_file_info_object_type=g_type_register_static(G_TYPE_OBJECT,
78 "CaptiveFileInfoObject",&captive_file_info_object_info,0);
81 return captive_file_info_object_type;
85 GnomeVFSResult captive_file_info_object_new(CaptiveFileInfoObject **captive_file_info_object_return)
87 g_return_val_if_fail(captive_file_info_object_return!=NULL,GNOME_VFS_ERROR_BAD_PARAMETERS);
89 *captive_file_info_object_return=g_object_new(
90 CAPTIVE_FILE_INFO_TYPE_OBJECT, /* object_type */
91 NULL); /* first_property_name; FIXME: support properties */
92 g_assert(*captive_file_info_object_return!=NULL);