GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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 [email protected] *
20  * *
21 \********************************************************************/
22 /*
23  * Object instance holds many common fields that most
24  * gnucash objects use.
25  *
26  * Copyright (C) 2003 Linas Vepstas <[email protected]>
27  * Copyright (c) 2007 David Hampton <[email protected]>
28  */
29 
30 #ifndef QOF_INSTANCE_P_H
31 #define QOF_INSTANCE_P_H
32 
33 #include "qofinstance.h"
34 
35 #ifdef __cplusplus
36 extern "C"
37 {
38 #endif
39 
43 void qof_instance_set_collection (gconstpointer ptr, QofCollection *col);
44 
45 void qof_instance_set_slots (QofInstance *, KvpFrame *);
46 
47 /* Set the last_update time. Reserved for use by the SQL backend;
48  * used for comparing version in local memory to that in remote
49  * server.
50  */
51 void qof_instance_set_last_update (QofInstance *inst, Timespec ts);
52 
55 void qof_instance_set_dirty_flag (gconstpointer inst, gboolean flag);
56 
58 void qof_instance_set_guid (gpointer inst, const GncGUID *guid);
59 
63 void qof_instance_copy_guid (gpointer to, gconstpointer from);
64 
65 //QofIdType qof_instance_get_e_type (const QofInstance *inst);
66 //void qof_instance_set_e_type (QofInstance *ent, QofIdType e_type);
67 
69 /*@ dependent @*/
70 KvpFrame* qof_instance_get_slots (const QofInstance *);
71 void qof_instance_set_editlevel(gpointer inst, gint level);
72 void qof_instance_increase_editlevel (gpointer ptr);
73 void qof_instance_decrease_editlevel (gpointer ptr);
74 void qof_instance_reset_editlevel (gpointer ptr);
81 void qof_instance_set_destroying (gpointer ptr, gboolean value);
82 
86 void qof_instance_set_dirty(QofInstance* inst);
87 
88 /* reset the dirty flag */
89 void qof_instance_mark_clean (QofInstance *);
92 gint32 qof_instance_get_version (gconstpointer inst);
93 
96 void qof_instance_set_version (gpointer inst, gint32 value);
99 void qof_instance_copy_version (gpointer to, gconstpointer from);
100 
102 guint32 qof_instance_get_version_check (gconstpointer inst);
104 void qof_instance_set_version_check (gpointer inst, guint32 value);
106 void qof_instance_copy_version_check (gpointer to, gconstpointer from);
107 void qof_instance_set_idata(gpointer inst, guint32 idata);
108 /* Convenience functions to save some typing in property handlers */
109 void qof_instance_set_kvp (QofInstance *inst, const gchar *key, const GValue *value);
110 void qof_instance_get_kvp (QofInstance *inst, const gchar *key, GValue *value);
111 
112 #ifdef __cplusplus
113 }
114 #endif
115 
116 
117 #endif /* QOF_INSTANCE_P_H */
Use a 64-bit unsigned int timespec.
Definition: gnc-date.h:299
Object instance holds common fields that most gnucash objects use.
Definition: guid.h:65
struct KvpFrameImpl KvpFrame
Definition: kvp_frame.h:76