GnuCash  4.12-558-g06612b8434
SX-ttinfo.h
1 /********************************************************************\
2  * SX-ttinfo.h -- Template Transaction manipulation functions *
3  * for scheduled transactions *
4  * Copyright (C) 2001 Robert Merkel <rgmerk@mira.net> *
5  * *
6  * This program is free software; you can redistribute it and/or *
7  * modify it under the terms of the GNU General Public License as *
8  * published by the Free Software Foundation; either version 2 of *
9  * the License, or (at your option) any later version. *
10  * *
11  * This program is distributed in the hope that it will be useful, *
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14  * GNU General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU General Public License*
17  * along with this program; if not, contact: *
18  * *
19  * Free Software Foundation Voice: +1-617-542-5942 *
20  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
21  * Boston, MA 02110-1301, USA gnu@gnu.org *
22  * *
23 \********************************************************************/
24 
25 #ifndef GNC_SX_TTINFO_H
26 #define GNC_SX_TTINFO_H
27 
28 #include <glib.h>
29 #include "qof.h"
30 #include "SchedXaction.h"
31 #include "Account.h"
32 #include "gnc-commodity.h"
33 
34 typedef struct TTInfo_s TTInfo;
35 typedef struct TTSplitInfo_s TTSplitInfo;
36 
37 TTInfo *gnc_ttinfo_malloc(void);
38 
39 void gnc_ttinfo_free(TTInfo *info);
40 
41 /* these two deep-copy their arguments */
42 void gnc_ttinfo_set_description(TTInfo *tti, const char *description);
43 void gnc_ttinfo_set_num(TTInfo *tti, const char *num);
44 void gnc_ttinfo_set_notes (TTInfo *tti, const char *notes);
45 
46 /* this one points to a persistent pointer so ownership isn't relevant */
47 void gnc_ttinfo_set_currency(TTInfo *tti, gnc_commodity *common_currency);
48 
49 
50 /* no deep copy occurs - if you want a deep copy make one yourself ! */
51 void gnc_ttinfo_set_template_splits(TTInfo *tti, GList *splits);
52 
53 const char * gnc_ttinfo_get_description(TTInfo *tti);
54 const char * gnc_ttinfo_get_num(TTInfo *tti);
55 const char *gnc_ttinfo_get_notes (TTInfo *tti);
56 gnc_commodity * gnc_ttinfo_get_currency(TTInfo *tti);
57 GList * gnc_ttinfo_get_template_splits(TTInfo *tti);
58 
59 /* split_i IS NOT deep copied and becomes owned by TTI */
60 void gnc_ttinfo_append_template_split(TTInfo *tti, TTSplitInfo *split_i);
61 
62 TTSplitInfo * gnc_ttsplitinfo_malloc(void);
63 void gnc_ttsplitinfo_free(TTSplitInfo *split_i);
64 
65 void gnc_ttsplitinfo_set_action(TTSplitInfo *split_i, const char *action);
66 const char * gnc_ttsplitinfo_get_action(TTSplitInfo *split_i);
67 
68 void gnc_ttsplitinfo_set_memo(TTSplitInfo *split_i, const char *memo);
69 const char *gnc_ttsplitinfo_get_memo(TTSplitInfo *split_i);
70 
71 void gnc_ttsplitinfo_set_credit_formula(TTSplitInfo *split_i,
72  const char *credit_formula);
73 
74 void gnc_ttsplitinfo_set_credit_formula_numeric(TTSplitInfo *split_i,
75  gnc_numeric credit_formula);
76 
77 const char *gnc_ttsplitinfo_get_credit_formula(TTSplitInfo *split_i);
78 
79 void gnc_ttsplitinfo_set_debit_formula(TTSplitInfo *split_i,
80  const char *debit_formula);
81 
82 void gnc_ttsplitinfo_set_debit_formula_numeric(TTSplitInfo *split_i,
83  gnc_numeric debit_formula);
84 
85 const char *gnc_ttsplitinfo_get_debit_formula(TTSplitInfo *split_i);
86 
87 void gnc_ttsplitinfo_set_account(TTSplitInfo *split_i, Account *acc);
88 Account *gnc_ttsplitinfo_get_account(TTSplitInfo *split_i);
89 
90 #endif
Account handling public routines.
Scheduled Transactions public handling routines.
Commodity handling public routines.