QOF
0.7.5
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
qofclass.h
Go to the documentation of this file.
1
/********************************************************************\
2
* qofclass.h -- API for registering parameters on objects *
3
* *
4
* This program is free software; you can redistribute it and/or *
5
* modify it under the terms of the GNU General Public License as *
6
* published by the Free Software Foundation; either version 2 of *
7
* the License, or (at your option) any later version. *
8
* *
9
* This program is distributed in the hope that it will be useful, *
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12
* GNU General Public License for more details. *
13
* *
14
* You should have received a copy of the GNU General Public License*
15
* along with this program; if not, contact: *
16
* *
17
* Free Software Foundation Voice: +1-617-542-5942 *
18
* 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
19
* Boston, MA 02110-1301, USA gnu@gnu.org *
20
* *
21
\********************************************************************/
22
66
#ifndef QOF_CLASS_H
67
#define QOF_CLASS_H
68
69
#include "
qofid.h
"
70
71
#define QOF_MOD_CLASS "qof-class"
72
82
#define QOF_TYPE_STRING "string"
83
#define QOF_TYPE_TIME "time"
84
#define QOF_TYPE_NUMERIC "numeric"
85
#define QOF_TYPE_DEBCRED "debcred"
86
#define QOF_TYPE_GUID "guid"
87
#define QOF_TYPE_INT32 "gint32"
88
#define QOF_TYPE_INT64 "gint64"
89
#define QOF_TYPE_DOUBLE "double"
90
#define QOF_TYPE_BOOLEAN "boolean"
91
#define QOF_TYPE_KVP "kvp"
92
#define QOF_TYPE_CHAR "character"
93
#define QOF_TYPE_COLLECT "collection"
123
typedef const gchar *QofType;
124
125
typedef
struct
_QofParam
QofParam
;
126
142
typedef
gpointer (*
QofAccessFunc
) (gpointer object,
const
QofParam
* param);
143
149
typedef
void (*
QofSetterFunc
) (gpointer, gpointer);
150
168
struct
_QofParam
169
{
170
const
gchar *param_name;
171
QofType
param_type;
172
QofAccessFunc
param_getfcn;
173
QofSetterFunc
param_setfcn;
174
gpointer param_userdata;
175
};
176
178
typedef
179
gint (*
QofSortFunc
) (gconstpointer, gconstpointer);
180
198
void
qof_class_register
(
QofIdTypeConst
obj_name,
199
QofSortFunc
default_sort_fcn,
200
const
QofParam
* params);
201
224
gboolean
225
qof_class_is_registered
(
QofIdTypeConst
obj_name);
226
228
QofType
229
qof_class_get_parameter_type
(
QofIdTypeConst
obj_name,
230
const
gchar *param_name);
231
233
const
QofParam
*
234
qof_class_get_parameter
(
QofIdTypeConst
obj_name,
235
const
gchar *parameter);
236
238
QofAccessFunc
239
qof_class_get_parameter_getter
(
QofIdTypeConst
obj_name,
240
const
gchar *parameter);
241
243
QofSetterFunc
244
qof_class_get_parameter_setter
(
QofIdTypeConst
obj_name,
245
const
gchar *parameter);
246
248
typedef
void (*
QofClassForeachCB
) (
QofIdTypeConst
, gpointer);
249
253
void
254
qof_class_foreach
(
QofClassForeachCB
, gpointer user_data);
255
257
typedef
void (*
QofParamForeachCB
) (
QofParam
*, gpointer user_data);
258
262
void
263
qof_class_param_foreach
(
QofIdTypeConst
obj_name,
264
QofParamForeachCB
, gpointer user_data);
265
272
GList *
273
qof_class_get_referenceList
(
QofIdTypeConst
type);
274
275
#endif
/* QOF_CLASS_H */
276
qof
qofclass.h
Generated by
1.8.3.1