GnuCash  5.6-150-g038405b370+
dialog-ab-trans.h
Go to the documentation of this file.
1 /*
2  * dialog-ab-trans.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 
35 #ifndef DIALOG_AB_TRANS_H
36 #define DIALOG_AB_TRANS_H
37 
38 #include "gnc-ab-utils.h"
39 #include <gtk/gtk.h>
40 #include <aqbanking/banking.h>
41 
42 #include "Account.h"
43 
44 G_BEGIN_DECLS
45 
46 #define GNC_RESPONSE_NOW GTK_RESPONSE_YES
47 #define GNC_RESPONSE_LATER GTK_RESPONSE_NO
48 
49 typedef struct _GncABTransDialog GncABTransDialog;
50 
51 typedef enum _GncABTransType GncABTransType;
52 enum _GncABTransType
53 {
54  SINGLE_TRANSFER = 0, /* obsolete old non-SEPA transfer; no longer in use */
55  SINGLE_DEBITNOTE, /* obsolete old non-SEPA debit note; no longer in use */
56  SINGLE_INTERNAL_TRANSFER
57  , SEPA_TRANSFER
58  , SEPA_DEBITNOTE
59 #if (AQBANKING_VERSION_INT >= 60400)
60  , SEPA_INTERNAL_TRANSFER
61 #endif
62 };
67 gboolean gnc_ab_trans_isSEPA(GncABTransType t);
68 
81 GncABTransDialog *gnc_ab_trans_dialog_new(GtkWidget *parent, GNC_AB_ACCOUNT_SPEC *ab_acc,
82  gint commodity_scu,
83  GncABTransType trans_type,
84  GList *templates);
85 
95 gint gnc_ab_trans_dialog_run_until_ok(GncABTransDialog *td);
96 
102 void gnc_ab_trans_dialog_free(GncABTransDialog *td);
103 
104 #if (AQBANKING_VERSION_INT >= 60400)
105 
117 GList *gnc_ab_trans_dialog_get_templ(const GncABTransDialog *td,
118  gboolean *changed);
119 #endif
120 
126 GtkWidget *gnc_ab_trans_dialog_get_parent(const GncABTransDialog *td);
127 
134 const AB_TRANSACTION *gnc_ab_trans_dialog_get_ab_trans(const GncABTransDialog *td);
135 
142 GNC_AB_JOB *gnc_ab_trans_dialog_get_job(const GncABTransDialog *td);
143 
150 GNC_AB_JOB *gnc_ab_get_trans_job(GNC_AB_ACCOUNT_SPEC *ab_acc,
151  const AB_TRANSACTION *ab_trans,
152  GncABTransType trans_type);
153 
154 G_END_DECLS
155 
159 #endif /* DIALOG_AB_TRANS_H */
gboolean gnc_ab_trans_isSEPA(GncABTransType t)
Returns true if the given GncABTransType is an European (SEPA) transaction (transfer or debit note)...
GncABTransDialog * gnc_ab_trans_dialog_new(GtkWidget *parent, GNC_AB_ACCOUNT_SPEC *ab_acc, gint commodity_scu, GncABTransType trans_type, GList *templates)
Create a new AqBanking transfer dialog.
GNC_AB_JOB * gnc_ab_trans_dialog_get_job(const GncABTransDialog *td)
Receive the Aqbanking job filled by the dialog.
Account handling public routines.
GNC_AB_JOB * gnc_ab_get_trans_job(GNC_AB_ACCOUNT_SPEC *ab_acc, const AB_TRANSACTION *ab_trans, GncABTransType trans_type)
Return the AqBanking job associated with the transaction.
void gnc_ab_trans_dialog_free(GncABTransDialog *td)
Free a Aqbanking transfer dialog.
const AB_TRANSACTION * gnc_ab_trans_dialog_get_ab_trans(const GncABTransDialog *td)
Receive the Aqbanking Transaction filled by the dialog.
GtkWidget * gnc_ab_trans_dialog_get_parent(const GncABTransDialog *td)
Retrieve the widget used as parent.
gint gnc_ab_trans_dialog_run_until_ok(GncABTransDialog *td)
Run the Aqbanking transfer dialog until correct values where entered or the user cancelled the dialog...
AqBanking utility functions.