src/query_order.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 QUERY_ORDER_H
00019 #define QUERY_ORDER_H
00020 
00021 #include <glib.h>
00022 #include <glib-object.h>
00023 #include "midgard/types.h"
00024 
00025 typedef struct MidgardQueryOrder MidgardQueryOrder;
00026 
00027 /* This structure is public now as we need it 
00028  * while adding special orders for types like 
00029  * metadata or referenced ones */
00030 
00034 struct MidgardQueryOrder {
00035         const midgard *mgd;
00036         const GParamSpec *spec;
00037         const gchar *dir;
00038         gchar *sql;
00039         const gchar *property;
00040         MidgardObjectClass *klass;
00041         GType parent_type;
00042         GType ext_type;
00043 };
00044 
00045 extern MidgardQueryOrder *midgard_query_order_new(
00046         midgard *mgd, GObjectClass *klass, const gchar *name, const gchar *dir);
00047 
00048 extern const gchar *midgard_query_order_get_sql(MidgardQueryOrder *order);
00049 
00050 extern void midgard_query_order_free(MidgardQueryOrder *order);
00051 
00052 #endif /* QUERY_ORDER_H */

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