GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
qofquery-p.h
1 /********************************************************************\
2  * qofquery-p.h -- internal/private API for finding objects *
3  * Copyright (C) 2002 Derek Atkins <[email protected]> *
4  * *
5  * This program is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU General Public License as *
7  * published by the Free Software Foundation; either version 2 of *
8  * the License, or (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License*
16  * along with this program; if not, contact: *
17  * *
18  * Free Software Foundation Voice: +1-617-542-5942 *
19  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
20  * Boston, MA 02110-1301, USA [email protected] *
21  * *
22 \********************************************************************/
23 
24 #ifndef QOF_QUERY_P_H
25 #define QOF_QUERY_P_H
26 
27 #include "qofquery.h"
28 
29 typedef struct _QofQueryTerm QofQueryTerm;
30 typedef struct _QofQuerySort QofQuerySort;
31 
32 #ifdef __cplusplus
33 extern "C"
34 {
35 #endif
36 
37 /* Functions to get Query information */
38 int qof_query_get_max_results (const QofQuery *q);
39 
40 
41 /* Functions to get and look at QueryTerms */
42 
43 /* This returns a List of List of Query Terms. Each list of Query
44  * Terms are ANDed together, and each list of ANDed terms are ORed
45  * together. So, what is returned is the 'or' list of 'and' lists
46  * of query term objects.
47  *
48  * Note that you should NOT modify this list in any way. It belongs
49  * to the query.
50  */
51 /*@ dependent @*/
52 GList * qof_query_get_terms (const QofQuery *q);
53 
54 /*@ dependent @*/
55 QofQueryParamList * qof_query_term_get_param_path (const QofQueryTerm *queryterm);
56 /*@ dependent @*/
57 QofQueryPredData *qof_query_term_get_pred_data (const QofQueryTerm *queryterm);
58 gboolean qof_query_term_is_inverted (const QofQueryTerm *queryterm);
59 
60 
61 /* Functions to get and look at QuerySorts */
62 
63 /* This function returns the primary, secondary, and tertiary sorts.
64  * These are part of the query and should NOT be changed!
65  */
66 void qof_query_get_sorts (QofQuery *q, QofQuerySort **primary,
67  QofQuerySort **secondary, QofQuerySort **tertiary);
68 
69 /*@ dependent @*/
70 QofQueryParamList * qof_query_sort_get_param_path (const QofQuerySort *querysort);
71 gint qof_query_sort_get_sort_options (const QofQuerySort *querysort);
72 gboolean qof_query_sort_get_increasing (const QofQuerySort *querysort);
73 
74 #ifdef __cplusplus
75 }
76 #endif
77 
78 #endif /* QOF_QUERY_P_H */
struct _QofQuery QofQuery
Definition: qofquery.h:90
GSList QofQueryParamList
Definition: qofquerycore.h:152
find objects that match a certain expression.