GnuCash 2.4.99
SX-book.h
Go to the documentation of this file.
00001 /********************************************************************\
00002  * SX-book.h -- scheduled transaction dataset access                *
00003  *                                                                  *
00004  * This program is free software; you can redistribute it and/or    *
00005  * modify it under the terms of the GNU General Public License as   *
00006  * published by the Free Software Foundation; either version 2 of   *
00007  * the License, or (at your option) any later version.              *
00008  *                                                                  *
00009  * This program is distributed in the hope that it will be useful,  *
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
00012  * GNU General Public License for more details.                     *
00013  *                                                                  *
00014  * You should have received a copy of the GNU General Public License*
00015  * along with this program; if not, contact:                        *
00016  *                                                                  *
00017  * Free Software Foundation           Voice:  +1-617-542-5942       *
00018  * 51 Franklin Street, Fifth Floor    Fax:    +1-617-542-2652       *
00019  * Boston, MA  02110-1301,  USA       gnu@gnu.org                   *
00020 \********************************************************************/
00021 
00039 #ifndef GNC_SX_BOOK_H
00040 #define GNC_SX_BOOK_H
00041 
00042 typedef struct xaccSchedXactionsDef SchedXactions;
00043 typedef struct _SchedXactionsClass SchedXactionsClass;
00044 
00045 #include <glib.h>
00046 #include "SchedXaction.h"
00047 #include "qof.h"
00048 
00049 struct xaccSchedXactionsDef
00050 {
00051     QofInstance inst;
00052     GList* sx_list;
00053     gboolean sx_notsaved;
00054 };
00055 
00056 struct _SchedXactionsClass
00057 {
00058     QofInstanceClass parent_class;
00059 };
00060 
00061 /* --- type macros --- */
00062 #define GNC_TYPE_SCHEDXACTIONS            (gnc_schedxactions_get_type ())
00063 #define GNC_SCHEDXACTIONS(o)              \
00064      (G_TYPE_CHECK_INSTANCE_CAST ((o), GNC_TYPE_SCHEDXACTIONS, SchedXactions))
00065 #define GNC_SCHEDXACTIONS_CLASS(k)        \
00066      (G_TYPE_CHECK_CLASS_CAST((k), GNC_TYPE_SCHEDXACTIONS, SchedXactionsClass))
00067 #define GNC_IS_SCHEDXACTIONS(o)           \
00068      (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNC_TYPE_SCHEDXACTIONS))
00069 #define GNC_IS_SCHEDXACTIONS_CLASS(k)     \
00070      (G_TYPE_CHECK_CLASS_TYPE ((k), GNC_TYPE_SCHEDXACTIONS))
00071 #define GNC_SCHEDXACTIONS_GET_CLASS(o)    \
00072      (G_TYPE_INSTANCE_GET_CLASS ((o), GNC_TYPE_SCHEDXACTIONS, SchedXactionsClass))
00073 GType gnc_schedxactions_get_type(void);
00074 
00075 #define GNC_IS_SXES(obj)  GNC_IS_SCHEDXACTIONS(obj)
00076 #define GNC_SXES(obj)     GNC_SCHEDXACTIONS(obj)
00077 
00078 /*@ dependent @*/ SchedXactions* gnc_book_get_schedxactions(QofBook* book);
00079 
00080 void gnc_sxes_add_sx(SchedXactions* sxes, SchedXaction* sx);
00081 void gnc_sxes_del_sx(SchedXactions* sxes, SchedXaction* sx);
00082 
00084 /*@ dependent @*/
00085 Account *gnc_book_get_template_root(const QofBook *book);
00086 
00088 GList* gnc_sx_get_sxes_referencing_account(QofBook *book, Account *acct);
00089 
00090 #endif /* GNC_SX_BOOK_H */
00091 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines