1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
4 * Copyright (C) 2000 Naba Kumar <naba@gnome.org>
6 * This program 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 2 of the License, or
9 * (at your option) any later version.
11 * This program 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 Library General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #ifndef ANJUTA_SERIALIZER_H
22 #define ANJUTA_SERIALIZER_H
25 #include <glib-object.h>
29 #define ANJUTA_TYPE_SERIALIZER (anjuta_serializer_get_type ())
30 #define ANJUTA_SERIALIZER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), ANJUTA_TYPE_SERIALIZER, AnjutaSerializer))
31 #define ANJUTA_SERIALIZER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), ANJUTA_TYPE_SERIALIZER, AnjutaSerializerClass))
32 #define ANJUTA_IS_SERIALIZER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), ANJUTA_TYPE_SERIALIZER))
33 #define ANJUTA_IS_SERIALIZER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), ANJUTA_TYPE_SERIALIZER))
34 #define ANJUTA_SERIALIZER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), ANJUTA_TYPE_SERIALIZER, AnjutaSerializerClass))
38 ANJUTA_SERIALIZER_READ
,
39 ANJUTA_SERIALIZER_WRITE
40 } AnjutaSerializerMode
;
42 typedef struct _AnjutaSerializer AnjutaSerializer
;
43 typedef struct _AnjutaSerializerPrivate AnjutaSerializerPrivate
;
44 typedef struct _AnjutaSerializerClass AnjutaSerializerClass
;
46 struct _AnjutaSerializer
{
48 AnjutaSerializerPrivate
*priv
;
51 struct _AnjutaSerializerClass
{
52 GObjectClass parent_class
;
55 GType
anjuta_serializer_get_type (void);
56 AnjutaSerializer
*anjuta_serializer_new (const gchar
*filepath
,
57 AnjutaSerializerMode mode
);
60 anjuta_serializer_write_int (AnjutaSerializer
*serializer
,
61 const gchar
*name
, gint value
);
63 anjuta_serializer_write_float (AnjutaSerializer
*serializer
,
64 const gchar
*name
, gfloat value
);
66 anjuta_serializer_write_string (AnjutaSerializer
*serializer
,
67 const gchar
*name
, const gchar
*value
);
69 anjuta_serializer_read_int (AnjutaSerializer
*serializer
,
70 const gchar
*name
, gint
*value
);
72 anjuta_serializer_read_float (AnjutaSerializer
*serializer
,
73 const gchar
*name
, gfloat
*value
);
75 anjuta_serializer_read_string (AnjutaSerializer
*serializer
,
76 const gchar
*name
, gchar
**value
,
81 #endif /* ANJUTA_SERIALIZER_H */