QOF  0.8.7
test-engine-stuff.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 2 of the License, or
5  * (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software
14  * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA
15  */
16 
17 
22 #ifndef TEST_ENGINE_STUFF_H
23 #define TEST_ENGINE_STUFF_H
24 
25 #include "config.h"
26 
27 #include <glib.h>
28 #include <stdlib.h>
29 #include "config.h"
30 #include "qofquery.h"
31 #include "qoftime.h"
32 #include "qofbook.h"
33 #include "qofsession.h"
34 
35 KvpValue *get_random_kvp_value (gint type);
36 
37 typedef struct
38 {
39  guchar *data;
40  gint len;
41 } bin_data;
42 
43 bin_data *get_random_binary_data (void);
44 
45 KvpFrame *get_random_kvp_frame (void);
46 QofNumeric get_random_qof_numeric (void);
47 GUID *get_random_guid (void);
48 GList *get_random_glist (void);
49 
50 void random_glist_strings_only (gboolean strings_only);
51 void kvp_exclude_type (KvpValueType kvp_type);
52 void set_max_kvp_depth (gint max_kvp_depth);
53 void set_max_kvp_frame_elements (gint max_kvp_frame_elements);
54 
55 typedef enum
56 {
57  RANDOM_QT = 0,
58  SIMPLE_QT = 1 << 0,
59  GUID_QT = 1 << 5,
60  ALL_QT = (1 << 8) - 1
61 } TestQueryTypes;
62 
63 QofQuery *get_random_query (void);
64 TestQueryTypes get_random_query_type (void);
65 
66 QofBook *get_random_book (void);
67 QofSession *get_random_session (void);
68 
69 #endif
Encapsulates a connection to a backend (persistent store)
KvpValueType
possible types in the union KvpValue
Definition: kvpframe.h:87
struct _KvpFrame KvpFrame
Definition: kvpframe.h:74
struct _QofQuery QofQuery
Definition: qofquery.h:85
find objects that match a certain expression.
struct _KvpValue KvpValue
Definition: kvpframe.h:78
64bit UTC Time handling routines
Definition: guid.h:53
Encapsulate all the information about a dataset.