src/group_constraint.h

00001 /* 
00002  * Copyright (C) 2005 Jukka Zitting <jz@yukatan.fi>
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 #ifndef _GROUP_CONSTRAINT_H
00019 #define _GROUP_CONSTRAINT_H
00020 
00021 #include <glib.h>
00022 #include <glib-object.h>
00023 #include "query_constraint.h"
00024 
00025 #define MIDGARD_TYPE_GROUP_CONSTRAINT            (midgard_group_constraint_get_type())
00026 #define MIDGARD_GROUP_CONSTRAINT(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), MIDGARD_TYPE_GROUP_CONSTRAINT, MidgardGroupConstraint))
00027 #define MIDGARD_GROUP_CONSTRAINT_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), MIDGARD_TYPE_GROUP_CONSTRAINT, MidgardGroupConstraintClass))
00028 #define MIDGARD_IS_GROUP_CONSTRAINT(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), MIDGARD_TYPE_GROUP_CONSTRAINT))
00029 #define MIDGARD_IS_GROUP_CONSTRAINT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), MIDGARD_TYPE_GROUP_CONSTRAINT))
00030 #define MIDGARD_GROUP_CONSTRAINT_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), MIDGARD_TYPE_GROUP_CONSTRAINT, MidgardGroupConstraintClass))
00031 
00032 typedef struct {
00033         MidgardQueryConstraint parent;
00034 
00035         /* private fields */
00036         const gchar *type;
00037         GQueue *constraints;
00038 } MidgardGroupConstraint;
00039 
00040 typedef struct {
00041         MidgardQueryConstraintClass parent;
00042 } MidgardGroupConstraintClass;
00043 
00044 extern GType midgard_group_constraint_get_type(void);
00045 
00046 #define MIDGARD_GROUP_CONSTRAINT_TYPE_AND "AND"
00047 #define MIDGARD_GROUP_CONSTRAINT_TYPE_OR  "OR"
00048 
00049 extern MidgardGroupConstraint *midgard_group_constraint_new(const gchar *type);
00050 
00051 extern void midgard_group_constraint_add_constraint(
00052         MidgardGroupConstraint *group, MidgardQueryConstraint *constraint);
00053 
00054 #endif

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