00001 /********************************************************************\ 00002 * qofquery-p.h -- internal/private API for finding objects * 00003 * Copyright (C) 2002 Derek Atkins <warlord@MIT.EDU> * 00004 * Copyright (C) 2006 Neil Williams <linux@codehelp.co.uk> * 00005 * * 00006 * This program is free software; you can redistribute it and/or * 00007 * modify it under the terms of the GNU General Public License as * 00008 * published by the Free Software Foundation; either version 2 of * 00009 * the License, or (at your option) any later version. * 00010 * * 00011 * This program is distributed in the hope that it will be useful, * 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00014 * GNU General Public License for more details. * 00015 * * 00016 * You should have received a copy of the GNU General Public License* 00017 * along with this program; if not, contact: * 00018 * * 00019 * Free Software Foundation Voice: +1-617-542-5942 * 00020 * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 * 00021 * Boston, MA 02110-1301, USA gnu@gnu.org * 00022 * * 00023 \********************************************************************/ 00024 00025 #ifndef QOF_QUERY_P_H 00026 #define QOF_QUERY_P_H 00027 00028 #include "qofquery.h" 00029 00030 typedef struct _QofQueryTerm QofQueryTerm; 00031 typedef struct _QofQuerySort QofQuerySort; 00032 00033 /* Functions to get Query information */ 00034 gint 00035 qof_query_get_max_results (QofQuery * q); 00036 00037 /* Functions to get and look at QueryTerms */ 00038 00039 /* This returns a List of List of Query Terms. Each list of Query 00040 * Terms are ANDed together, and each list of ANDed terms are ORed 00041 * together. So, what is returned is the 'or' list of 'and' lists 00042 * of query term objects. 00043 * 00044 * Note that you should NOT modify this list in any way. It belongs 00045 * to the query. 00046 */ 00047 GList *qof_query_get_terms (QofQuery * q); 00048 00049 GSList * 00050 qof_query_term_get_param_path (QofQueryTerm * queryterm); 00051 QofQueryPredData * 00052 qof_query_term_get_pred_data (QofQueryTerm * queryterm); 00053 gboolean 00054 qof_query_term_is_inverted (QofQueryTerm * queryterm); 00055 00056 /* Functions to get and look at QuerySorts */ 00057 00058 /* This function returns the primary, secondary, and tertiary sorts. 00059 * These are part of the query and should NOT be changed! 00060 */ 00061 void 00062 qof_query_get_sorts (QofQuery * q, QofQuerySort ** primary, 00063 QofQuerySort ** secondary, 00064 QofQuerySort ** tertiary); 00065 00066 GSList * 00067 qof_query_sort_get_param_path (QofQuerySort * querysort); 00068 gint 00069 qof_query_sort_get_sort_options (QofQuerySort * querysort); 00070 gboolean 00071 qof_query_sort_get_increasing (QofQuerySort * querysort); 00072 00073 #ifdef QOF_DISABLE_DEPRECATED 00074 00080 void qof_query_print (QofQuery * query); 00081 #endif 00082 00083 #endif /* QOF_QUERY_P_H */