QOF: qofinstance-p.h Source File

QOF 0.7.5

qofinstance-p.h
1 /********************************************************************\
2 * qofinstance-p.h -- private fields common to all object instances *
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 /*
23 * Object instance holds many common fields that most
24 * QofObjects use.
25 *
26 * Copyright (C) 2003 Linas Vepstas <linas@linas.org>
27 */
28
29 #ifndef QOF_INSTANCE_P_H
30 #define QOF_INSTANCE_P_H
31 #include "config.h"
32 #include "qofinstance.h"
33 #include "qofclass.h"
34
35 struct QofInstance_s
36 {
38 QofEntity entity;
39
41 QofBook *book;
42
47 KvpFrame *kvp_data;
48
52 const QofParam * param;
53
61 QofTime *update_time;
62 #ifndef QOF_DISABLE_DEPRECATED
63 Timespec last_update;
64 #endif
65 /* Keep track of nesting level of begin/end edit calls */
66 gint editlevel;
67
68 /* In process of being destroyed */
69 gboolean do_free;
70
71 /* dirty/clean flag. If dirty, then this instance has been modified,
72 * but has not yet been written out to storage (file/database)
73 */
74 gboolean dirty;
75 };
76
77 /* reset the dirty flag */
78 void qof_instance_mark_clean (QofInstance *);
79
80 void qof_instance_set_slots (QofInstance *, KvpFrame *);
81
82 /* Set the update time. Reserved for use by the SQL backend;
83 * used for comparing version in local memory to that in remote
84 * server. The QofTime becomes the property of the instance.
85 */
86 void
87 qof_instance_set_update_time (QofInstance * inst, QofTime * time);
88
89 #endif /* QOF_INSTANCE_P_H */
QofInstance_s
Definition: qofinstance-p.h:35
_QofParam
Definition: qofclass.h:195
QofEntity_s
Definition: qofid.h:147
KvpFrame
struct _KvpFrame KvpFrame
Definition: kvpframe.h:74
timespec64
Definition: qoftime.h:97
qofinstance.h
Object instance holds common fields that most QofObjects use.
QofInstance_s::kvp_data
KvpFrame * kvp_data
Definition: qofinstance-p.h:47
QofInstance_s::entity
QofEntity entity
Definition: qofinstance-p.h:38
qofclass.h
API for registering paramters on objects.
QofInstance_s::update_time
QofTime * update_time
Definition: qofinstance-p.h:61
QofTime
struct QofTime64 QofTime
Use a 64-bit signed int QofTime.
Definition: qoftime.h:120
_QofBook
Definition: qofbook-p.h:48
QofInstance_s::param
const QofParam * param
Definition: qofinstance-p.h:52
QofInstance_s::book
QofBook * book
Definition: qofinstance-p.h:41