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 
36 {
39 
42 
48 
52  const QofParam * param;
53 
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 */