QOF: test-engine-stuff.h Source File

QOF 0.7.5

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

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 #ifndef QOF_DISABLE_DEPRECATED
36 Timespec *get_random_timespec (void);
37 void random_timespec_zero_nsec (gboolean zero_nsec);
38 void random_timespec_usec_resolution (gboolean usec_resolution);
39 #endif
40
41 KvpValue *get_random_kvp_value (gint type);
42
43 typedef struct
44 {
45 guchar *data;
46 gint len;
47 } bin_data;
48
49 bin_data *get_random_binary_data (void);
50
51 KvpFrame *get_random_kvp_frame (void);
52 QofNumeric get_random_qof_numeric (void);
53 GUID *get_random_guid (void);
54 GList *get_random_glist (void);
55
56 void random_glist_strings_only (gboolean strings_only);
57 void kvp_exclude_type (KvpValueType kvp_type);
58 void set_max_kvp_depth (gint max_kvp_depth);
59 void set_max_kvp_frame_elements (gint max_kvp_frame_elements);
60
61 typedef enum
62 {
63 RANDOM_QT = 0,
64 SIMPLE_QT = 1 << 0,
65 GUID_QT = 1 << 5,
66 ALL_QT = (1 << 8) - 1
67 } TestQueryTypes;
68
69 QofQuery *get_random_query (void);
70 TestQueryTypes get_random_query_type (void);
71
72 QofBook *get_random_book (void);
73 QofSession *get_random_session (void);
74
75 #endif
qofsession.h
Encapsulates a connection to a backend (persistent store)
_QofSession
Definition: qofsession-p.h:35
KvpValueType
KvpValueType
possible types in the union KvpValue
Definition: kvpframe.h:87
KvpFrame
struct _KvpFrame KvpFrame
Definition: kvpframe.h:74
timespec64
Definition: qoftime.h:97
QofQuery
struct _QofQuery QofQuery
Definition: qofquery.h:85
qofquery.h
find objects that match a certain expression.
KvpValue
struct _KvpValue KvpValue
Definition: kvpframe.h:78
_QofNumeric
Definition: qofnumeric.h:52
qoftime.h
64bit UTC Time handling routines
_GUID
Definition: guid.h:53
qofbook.h
Encapsulate all the information about a dataset.
_QofBook
Definition: qofbook-p.h:48
bin_data
Definition: test-engine-stuff.h:43