Fixed message typo.
[captive.git] / src / libcaptive / client / file-info.c
1 /* $Id$
2  * captive wrapper of GnomeVFSFileInfo interface to reactos
3  * Copyright (C) 2005 Jan Kratochvil <project-captive@jankratochvil.net>
4  * 
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
8  * 
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.
13  * 
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
17  */
18
19
20 #include "config.h"
21
22 #include "captive/client-file-info.h"   /* self */
23 #include <glib/gmessages.h>
24 #include "vfs.h"
25 #include "reactos/ntos/types.h" /* for ULONG */
26
27
28 struct _CaptiveFileInfoObjectClass {
29         GObjectClass parent_class;
30         };
31
32
33 static gpointer captive_file_info_object_parent_class=NULL;
34
35
36 static void captive_file_info_object_finalize(CaptiveFileInfoObject *captive_file_info_object)
37 {
38         g_return_if_fail(captive_file_info_object!=NULL);
39
40         gnome_vfs_file_info_clear(&captive_file_info_object->p);
41
42         G_OBJECT_CLASS(captive_file_info_object_parent_class)->finalize((GObject *)captive_file_info_object);
43 }
44
45
46 static void captive_file_info_object_class_init(CaptiveFileInfoObjectClass *class)
47 {
48 GObjectClass *gobject_class=G_OBJECT_CLASS(class);
49
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;
52 }
53
54
55 static void captive_file_info_object_init(CaptiveFileInfoObject *captive_file_info_object)
56 {
57 }
58
59
60 GType captive_file_info_object_get_type(void)
61 {
62 static GType captive_file_info_object_type=0;
63
64         if (!captive_file_info_object_type) {
65 static const GTypeInfo captive_file_info_object_info={
66                                 sizeof(CaptiveFileInfoObjectClass),
67                                 NULL,   /* base_init */
68                                 NULL,   /* base_finalize */
69                                 (GClassInitFunc)captive_file_info_object_class_init,
70                                 NULL,   /* class_finalize */
71                                 NULL,   /* class_data */
72                                 sizeof(CaptiveFileInfoObject),
73                                 5,      /* n_preallocs */
74                                 (GInstanceInitFunc)captive_file_info_object_init,
75                                 };
76
77                 captive_file_info_object_type=g_type_register_static(G_TYPE_OBJECT,
78                                 "CaptiveFileInfoObject",&captive_file_info_object_info,0);
79                 }
80
81         return captive_file_info_object_type;
82 }
83
84
85 GnomeVFSResult captive_file_info_object_new(CaptiveFileInfoObject **captive_file_info_object_return)
86 {
87         g_return_val_if_fail(captive_file_info_object_return!=NULL,GNOME_VFS_ERROR_BAD_PARAMETERS);
88
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);
93
94         return GNOME_VFS_OK;
95 }