GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
SX-ttinfo.h
1 /********************************************************************\
2  * SX-ttinfo.h -- Template Transaction manipulation functions *
3  * for scheduled transactions *
4  * Copyright (C) 2001 Robert Merkel <[email protected]> *
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 [email protected] *
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 
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 gnc_commodity * gnc_ttinfo_get_currency(TTInfo *tti);
56 GList * gnc_ttinfo_get_template_splits(TTInfo *tti);
57 
58 /* split_i IS NOT deep copied and becomes owned by TTI */
59 void gnc_ttinfo_append_template_split(TTInfo *tti, TTSplitInfo *split_i);
60 
61 TTSplitInfo * gnc_ttsplitinfo_malloc(void);
62 void gnc_ttsplitinfo_free(TTSplitInfo *split_i);
63 
64 void gnc_ttsplitinfo_set_action(TTSplitInfo *split_i, const char *action);
65 const char * gnc_ttsplitinfo_get_action(TTSplitInfo *split_i);
66 
67 void gnc_ttsplitinfo_set_memo(TTSplitInfo *split_i, const char *memo);
68 const char *gnc_ttsplitinfo_get_memo(TTSplitInfo *split_i);
69 
70 void gnc_ttsplitinfo_set_credit_formula(TTSplitInfo *split_i,
71  const char *credit_formula);
72 
73 void gnc_ttsplitinfo_set_credit_formula_numeric(TTSplitInfo *split_i,
74  gnc_numeric credit_formula);
75 
76 const char *gnc_ttsplitinfo_get_credit_formula(TTSplitInfo *split_i);
77 
78 void gnc_ttsplitinfo_set_debit_formula(TTSplitInfo *split_i,
79  const char *debit_formula);
80 
81 void gnc_ttsplitinfo_set_debit_formula_numeric(TTSplitInfo *split_i,
82  gnc_numeric debit_formula);
83 
84 const char *gnc_ttsplitinfo_get_debit_formula(TTSplitInfo *split_i);
85 
86 void gnc_ttsplitinfo_set_account(TTSplitInfo *split_i, Account *acc);
87 Account *gnc_ttsplitinfo_get_account(TTSplitInfo *split_i);
88 
89 #endif
Account handling public routines.
Scheduled Transactions public handling routines.
Commodity handling public routines.