2003-06-10 10:07:52 -05:00
|
|
|
/********************************************************************\
|
|
|
|
* SX-book.h -- scheduled transaction dataset access *
|
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or *
|
|
|
|
* modify it under the terms of the GNU General Public License as *
|
|
|
|
* published by the Free Software Foundation; either version 2 of *
|
|
|
|
* the License, or (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* GNU General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU General Public License*
|
|
|
|
* along with this program; if not, contact: *
|
|
|
|
* *
|
|
|
|
* Free Software Foundation Voice: +1-617-542-5942 *
|
2005-11-16 23:35:02 -06:00
|
|
|
* 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
|
|
|
|
* Boston, MA 02110-1301, USA gnu@gnu.org *
|
2003-06-10 10:07:52 -05:00
|
|
|
\********************************************************************/
|
|
|
|
|
2003-06-10 10:21:47 -05:00
|
|
|
/**
|
2004-05-06 21:36:40 -05:00
|
|
|
* @addtogroup Engine
|
|
|
|
* @{ */
|
|
|
|
/**
|
|
|
|
* @addtogroup SchedXaction
|
2003-06-10 10:21:47 -05:00
|
|
|
* @{ */
|
|
|
|
/**
|
|
|
|
* @file SX-book.h
|
|
|
|
* @brief Anchor Scheduled Transaction info in a book.
|
|
|
|
* See src/doc/books.txt for design overview.
|
|
|
|
* @author Copyright (c) 2003 Linas Vepstas <linas@linas.org>
|
2007-01-19 17:45:45 -06:00
|
|
|
* @author Copyright (c) 2006 Joshua Sled <jsled@asynchronous.org>
|
2010-02-17 23:31:54 -06:00
|
|
|
*
|
2003-10-19 00:11:07 -05:00
|
|
|
* XXX currently, this is crufty, it should be modified to use
|
|
|
|
* entities a bit more whole-heartedly than it does.
|
2003-06-10 10:21:47 -05:00
|
|
|
**/
|
2003-06-10 10:07:52 -05:00
|
|
|
|
|
|
|
#ifndef GNC_SX_BOOK_H
|
|
|
|
#define GNC_SX_BOOK_H
|
|
|
|
|
2007-04-04 19:23:42 -05:00
|
|
|
typedef struct xaccSchedXactionsDef SchedXactions;
|
|
|
|
typedef struct _SchedXactionsClass SchedXactionsClass;
|
|
|
|
|
2021-02-13 15:35:27 -06:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C++" {
|
2003-06-10 10:07:52 -05:00
|
|
|
#include <glib.h>
|
2021-02-13 15:35:27 -06:00
|
|
|
}
|
|
|
|
#endif
|
2007-01-19 17:45:45 -06:00
|
|
|
#include "SchedXaction.h"
|
2005-11-01 21:32:36 -06:00
|
|
|
#include "qof.h"
|
2003-06-10 10:07:52 -05:00
|
|
|
|
2010-02-17 23:31:54 -06:00
|
|
|
struct xaccSchedXactionsDef
|
|
|
|
{
|
|
|
|
QofInstance inst;
|
|
|
|
GList* sx_list;
|
|
|
|
gboolean sx_notsaved;
|
2007-01-19 17:45:45 -06:00
|
|
|
};
|
|
|
|
|
2007-04-04 19:23:42 -05:00
|
|
|
struct _SchedXactionsClass
|
|
|
|
{
|
2010-02-17 23:31:54 -06:00
|
|
|
QofInstanceClass parent_class;
|
2007-04-04 19:23:42 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
/* --- type macros --- */
|
|
|
|
#define GNC_TYPE_SCHEDXACTIONS (gnc_schedxactions_get_type ())
|
|
|
|
#define GNC_SCHEDXACTIONS(o) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_CAST ((o), GNC_TYPE_SCHEDXACTIONS, SchedXactions))
|
|
|
|
#define GNC_SCHEDXACTIONS_CLASS(k) \
|
|
|
|
(G_TYPE_CHECK_CLASS_CAST((k), GNC_TYPE_SCHEDXACTIONS, SchedXactionsClass))
|
|
|
|
#define GNC_IS_SCHEDXACTIONS(o) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_TYPE ((o), GNC_TYPE_SCHEDXACTIONS))
|
|
|
|
#define GNC_IS_SCHEDXACTIONS_CLASS(k) \
|
|
|
|
(G_TYPE_CHECK_CLASS_TYPE ((k), GNC_TYPE_SCHEDXACTIONS))
|
|
|
|
#define GNC_SCHEDXACTIONS_GET_CLASS(o) \
|
|
|
|
(G_TYPE_INSTANCE_GET_CLASS ((o), GNC_TYPE_SCHEDXACTIONS, SchedXactionsClass))
|
|
|
|
GType gnc_schedxactions_get_type(void);
|
|
|
|
|
|
|
|
#define GNC_IS_SXES(obj) GNC_IS_SCHEDXACTIONS(obj)
|
|
|
|
#define GNC_SXES(obj) GNC_SCHEDXACTIONS(obj)
|
2007-01-19 17:45:45 -06:00
|
|
|
|
2009-03-09 12:17:57 -05:00
|
|
|
/*@ dependent @*/ SchedXactions* gnc_book_get_schedxactions(QofBook* book);
|
2007-01-19 17:45:45 -06:00
|
|
|
|
|
|
|
void gnc_sxes_add_sx(SchedXactions* sxes, SchedXaction* sx);
|
|
|
|
void gnc_sxes_del_sx(SchedXactions* sxes, SchedXaction* sx);
|
2003-10-19 00:11:07 -05:00
|
|
|
|
2006-02-26 09:18:55 -06:00
|
|
|
/** Returns the template group from the book. **/
|
2010-02-17 23:31:54 -06:00
|
|
|
/*@ dependent @*/
|
|
|
|
Account *gnc_book_get_template_root(const QofBook *book);
|
2003-06-10 10:07:52 -05:00
|
|
|
|
2006-02-26 13:55:17 -06:00
|
|
|
/** @return The list of SXes which reference the given Account. Caller should free this list. **/
|
|
|
|
GList* gnc_sx_get_sxes_referencing_account(QofBook *book, Account *acct);
|
|
|
|
|
2003-06-10 10:21:47 -05:00
|
|
|
#endif /* GNC_SX_BOOK_H */
|
|
|
|
/** @} */
|
2004-05-06 21:36:40 -05:00
|
|
|
/** @} */
|