GnuCash  5.6-150-g038405b370+
SX-book.h
Go to the documentation of this file.
1 /********************************************************************\
2  * SX-book.h -- scheduled transaction dataset access *
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 
39 #ifndef GNC_SX_BOOK_H
40 #define GNC_SX_BOOK_H
41 
42 typedef struct xaccSchedXactionsDef SchedXactions;
43 typedef struct _SchedXactionsClass SchedXactionsClass;
44 
45 #include <glib.h>
46 
47 #include "SchedXaction.h"
48 #include "qof.h"
49 
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53 
55 {
56  QofInstance inst;
57  GList* sx_list;
58  gboolean sx_notsaved;
59 };
60 
62 {
63  QofInstanceClass parent_class;
64 };
65 
66 /* --- type macros --- */
67 #define GNC_TYPE_SCHEDXACTIONS (gnc_schedxactions_get_type ())
68 #define GNC_SCHEDXACTIONS(o) \
69  (G_TYPE_CHECK_INSTANCE_CAST ((o), GNC_TYPE_SCHEDXACTIONS, SchedXactions))
70 #define GNC_SCHEDXACTIONS_CLASS(k) \
71  (G_TYPE_CHECK_CLASS_CAST((k), GNC_TYPE_SCHEDXACTIONS, SchedXactionsClass))
72 #define GNC_IS_SCHEDXACTIONS(o) \
73  (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNC_TYPE_SCHEDXACTIONS))
74 #define GNC_IS_SCHEDXACTIONS_CLASS(k) \
75  (G_TYPE_CHECK_CLASS_TYPE ((k), GNC_TYPE_SCHEDXACTIONS))
76 #define GNC_SCHEDXACTIONS_GET_CLASS(o) \
77  (G_TYPE_INSTANCE_GET_CLASS ((o), GNC_TYPE_SCHEDXACTIONS, SchedXactionsClass))
78 GType gnc_schedxactions_get_type(void);
79 
80 #define GNC_IS_SXES(obj) GNC_IS_SCHEDXACTIONS(obj)
81 #define GNC_SXES(obj) GNC_SCHEDXACTIONS(obj)
82 
83 /*@ dependent @*/ SchedXactions* gnc_book_get_schedxactions(QofBook* book);
84 
85 void gnc_sxes_add_sx(SchedXactions* sxes, SchedXaction* sx);
86 void gnc_sxes_del_sx(SchedXactions* sxes, SchedXaction* sx);
87 
89 /*@ dependent @*/
90 Account *gnc_book_get_template_root(const QofBook *book);
91 
93 GList* gnc_sx_get_sxes_referencing_account(QofBook *book, Account *acct);
94 
95 #ifdef __cplusplus
96 }
97 #endif
98 
99 #endif /* GNC_SX_BOOK_H */
100 
STRUCTS.
Account * gnc_book_get_template_root(const QofBook *book)
Returns the template group from the book.
Definition: SX-book.cpp:65
GList * gnc_sx_get_sxes_referencing_account(QofBook *book, Account *acct)
Definition: SX-book.cpp:365
Scheduled Transactions public handling routines.