midgard/midgard_config.h

00001 /* 
00002  * Copyright (C) 2006 Piotr Pokora <piotr.pokora@infoglob.pl>
00003  *
00004  * This program is free software; you can redistribute it and/or modify it
00005  * under the terms of the GNU Lesser General Public License as published
00006  * by the Free Software Foundation; either version 2 of the License, or
00007  * (at your option) any later version.
00008  * 
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  * 
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017  */
00018 
00019 #ifndef MIDGARD_CONFIG_H
00020 #define MIDGARD_CONFIG_H
00021 
00022 #include <midgard/midgard_type.h>
00023 
00033 /* convention macros */
00034 #define MIDGARD_TYPE_CONFIG (midgard_config_get_type())
00035 #define MIDGARD_CONFIG(object)  \
00036         (G_TYPE_CHECK_INSTANCE_CAST ((object),MIDGARD_TYPE_CONFIG, MidgardConfig))
00037 #define MIDGARD_CONFIG_CLASS(klass)  \
00038         (G_TYPE_CHECK_CLASS_CAST ((klass), MIDGARD_TYPE_CONFIG, MidgardConfigClass))
00039 #define MIDGARD_IS_CONFIG(object)   \
00040         (G_TYPE_CHECK_INSTANCE_TYPE ((object), MIDGARD_TYPE_CONFIG))
00041 #define MIDGARD_IS_CONFIG_CLASS(klass) \
00042         (G_TYPE_CHECK_CLASS_TYPE ((klass), MIDGARD_TYPE_CONFIG))
00043 #define MIDGARD_CONFIG_GET_CLASS(obj) \
00044         (G_TYPE_INSTANCE_GET_CLASS ((obj), MIDGARD_TYPE_CONFIG, MidgardConfigClass))
00045 
00046 typedef struct MidgardConfig MidgardConfig;
00047 typedef struct MidgardConfigClass MidgardConfigClass;
00048 typedef struct _MidgardConfigPrivate MidgardConfigPrivate;
00049 
00055 struct MidgardConfig{
00056         GObject parent;
00057         
00058         /* instance members */
00059         MidgardConfigPrivate *private;
00060         midgard *mgd;
00061 };
00062 
00068 struct MidgardConfigClass{
00069         GObjectClass parent;
00070         
00071         /* class members */
00072         gboolean (*read_config) (MidgardConfig *self, const gchar *filename);
00073         void (*connect) (MidgardConfig *self);
00074 };
00075 
00082 extern GType midgard_config_get_type(void);
00083 
00110 extern MidgardConfig *midgard_config_new(void);
00111 
00129 extern gboolean midgard_config_read_file(MidgardConfig *object, const gchar *filename);
00130 
00131 
00132 #endif /* MIDGARD_CONFIG_H */

Generated on Thu Feb 22 06:15:13 2007 for midgard-core by  doxygen 1.4.6