GnuCash  5.6-150-g038405b370+
gnc-aqbanking-templates.h
1 /*
2  * gnc-ab-trans-templ.h --
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 
33 #ifndef GNC_AB_TRANS_TEMPL_H
34 #define GNC_AB_TRANS_TEMPL_H
35 
36 #include <config.h>
37 #include <glib.h>
38 #include "qof.h"
39 
40 #ifdef __cplusplus
41 extern "C"
42 {
43 #endif
44 
46 typedef struct _GncABTransTempl GncABTransTempl;
47 
53 GncABTransTempl *gnc_ab_trans_templ_new(void);
54 
67 GncABTransTempl *gnc_ab_trans_templ_new_full(
68  const gchar *name, const gchar *recp_name, const gchar *recp_account,
69  const gchar *recp_bankcode, gnc_numeric amount, const gchar *purpose,
70  const gchar *purpose_cont);
71 
78 GList *gnc_ab_trans_templ_list_new_from_book(QofBook *b);
79 
88 void gnc_ab_set_book_template_list(QofBook *b, GList *template_list);
89 
94 void gnc_ab_trans_templ_free(GncABTransTempl *t);
95 
101 void gnc_ab_trans_templ_list_free(GList *l);
102 
107 const gchar *gnc_ab_trans_templ_get_name(const GncABTransTempl *t);
108 
113 const gchar *gnc_ab_trans_templ_get_recp_name(const GncABTransTempl *t);
114 
119 const gchar *gnc_ab_trans_templ_get_recp_account(const GncABTransTempl *t);
120 
125 const gchar *gnc_ab_trans_templ_get_recp_bankcode(const GncABTransTempl *t);
126 
131 gnc_numeric gnc_ab_trans_templ_get_amount(const GncABTransTempl *t);
132 
137 const gchar *gnc_ab_trans_templ_get_purpose(const GncABTransTempl *t);
138 
143 const gchar *gnc_ab_trans_templ_get_purpose_cont(const GncABTransTempl *t);
144 
151 void gnc_ab_trans_templ_set_name(GncABTransTempl *t, const gchar *name);
152 
159 void gnc_ab_trans_templ_set_recp_name(GncABTransTempl *t,
160  const gchar *recp_name);
161 
168 void gnc_ab_trans_templ_set_recp_account(GncABTransTempl *t,
169  const gchar *recp_account);
170 
177 void gnc_ab_trans_templ_set_recp_bankcode(GncABTransTempl *t,
178  const gchar *recp_bankcode);
179 
186 void gnc_ab_trans_templ_set_amount(GncABTransTempl *t, gnc_numeric amount);
187 
194 void gnc_ab_trans_templ_set_purpose(GncABTransTempl *t, const gchar *purpose);
195 
202 void gnc_ab_trans_templ_set_purpose_cont(GncABTransTempl *t,
203  const gchar *purpose_cont);
204 
205 #ifdef __cplusplus
206 }
207 #endif
208 #endif /* GNC_AB_TRANS_TEMPL_H */
209 
const gchar * gnc_ab_trans_templ_get_purpose(const GncABTransTempl *t)
void gnc_ab_trans_templ_free(GncABTransTempl *t)
Free the memory used by a template.
void gnc_ab_trans_templ_set_purpose_cont(GncABTransTempl *t, const gchar *purpose_cont)
Replace the second purpose line stored in a template.
A template for an AqBanking transaction.
void gnc_ab_trans_templ_set_amount(GncABTransTempl *t, gnc_numeric amount)
Replace the amount stored in a template.
const gchar * gnc_ab_trans_templ_get_recp_account(const GncABTransTempl *t)
void gnc_ab_trans_templ_list_free(GList *l)
Free the memory used by a list of templates, including the list itself.
void gnc_ab_trans_templ_set_recp_account(GncABTransTempl *t, const gchar *recp_account)
Replace the Account Number of the recipient stored in a template.
void gnc_ab_trans_templ_set_name(GncABTransTempl *t, const gchar *name)
Set the name of a template.
void gnc_ab_trans_templ_set_recp_name(GncABTransTempl *t, const gchar *recp_name)
Replace the Account Number of the recipient stored in a template.
void gnc_ab_trans_templ_set_recp_bankcode(GncABTransTempl *t, const gchar *recp_bankcode)
Replace the Bank Code of the recipient stored in a template.
GncABTransTempl * gnc_ab_trans_templ_new(void)
Create a template with unset contents.
void gnc_ab_trans_templ_set_purpose(GncABTransTempl *t, const gchar *purpose)
Replace the first purpose line stored in a template.
const gchar * gnc_ab_trans_templ_get_name(const GncABTransTempl *t)
gnc_numeric gnc_ab_trans_templ_get_amount(const GncABTransTempl *t)
const gchar * gnc_ab_trans_templ_get_recp_bankcode(const GncABTransTempl *t)
void gnc_ab_set_book_template_list(QofBook *b, GList *template_list)
Set the GList of kvp_frames of template transactions in the Book b to template_list.
const gchar * gnc_ab_trans_templ_get_recp_name(const GncABTransTempl *t)
GncABTransTempl * gnc_ab_trans_templ_new_full(const gchar *name, const gchar *recp_name, const gchar *recp_account, const gchar *recp_bankcode, gnc_numeric amount, const gchar *purpose, const gchar *purpose_cont)
Create a template with given contents.
const gchar * gnc_ab_trans_templ_get_purpose_cont(const GncABTransTempl *t)
GList * gnc_ab_trans_templ_list_new_from_book(QofBook *b)
Obtain the list of QofTemplates saved in a Book.