GnuCash  5.6-150-g038405b370+
import-main-matcher.h
Go to the documentation of this file.
1 /********************************************************************\
2  * import-main-matcher.h - Transaction matcher main window *
3  * *
4  * Copyright (C) 2002 Benoit GrĂ©goire <bock@step.polymtl.ca> *
5  * Copyright (C) 2002 Christian Stimming *
6  * Copyright (C) 2012 Robert Fewell *
7  * *
8  * This program is free software; you can redistribute it and/or *
9  * modify it under the terms of the GNU General Public License as *
10  * published by the Free Software Foundation; either version 2 of *
11  * the License, or (at your option) any later version. *
12  * *
13  * This program is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16  * GNU General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU General Public License*
19  * along with this program; if not, contact: *
20  * *
21  * Free Software Foundation Voice: +1-617-542-5942 *
22  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
23  * Boston, MA 02110-1301, USA gnu@gnu.org *
24 \********************************************************************/
33 #ifndef GNC_IMPORT_MAIN_MATCHER_H
34 #define GNC_IMPORT_MAIN_MATCHER_H
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 #include "Transaction.h"
41 #include "import-backend.h"
42 #include "import-match-picker.h"
43 
44 #include <stdbool.h>
45 
46 typedef struct _main_matcher_info GNCImportMainMatcher;
47 
48 typedef void (*GNCTransactionProcessedCB) (GNCImportTransInfo *trans_info,
49  gboolean imported,
50  gpointer user_data);
51 
76 GNCImportMainMatcher *gnc_gen_trans_list_new (GtkWidget *parent,
77  const gchar* heading,
78  bool all_from_same_account,
79  gint match_date_hardlimit,
80  bool show_all);
81 
82 
83 
112 GNCImportMainMatcher * gnc_gen_trans_assist_new (GtkWidget *parent,
113  GtkWidget *assistant_page,
114  const gchar* heading,
115  bool all_from_same_account,
116  gint match_date_hardlimit);
117 
118 
124 void gnc_gen_trans_assist_start (GNCImportMainMatcher *info);
125 
126 
134 void on_matcher_help_clicked (GtkButton *button, gpointer user_data);
135 
136 
143 void gnc_gen_trans_list_add_tp_cb (GNCImportMainMatcher *info,
144  GNCTransactionProcessedCB trans_processed_cb,
145  gpointer user_data);
146 
147 
149 void gnc_gen_trans_list_delete (GNCImportMainMatcher *info);
150 
162 void gnc_gen_trans_list_add_trans (GNCImportMainMatcher *gui, Transaction *trans);
163 
164 
179 void gnc_gen_trans_list_add_trans_with_split_data (GNCImportMainMatcher *gui,
180  Transaction *trans,
181  GNCImportLastSplitInfo *lsplit);
182 
183 
198 void gnc_gen_trans_list_add_trans_with_ref_id (GNCImportMainMatcher *gui,
199  Transaction *trans,
200  guint32 ref_id);
201 
202 
209 bool gnc_gen_trans_list_run (GNCImportMainMatcher *info);
210 
211 
216 GtkWidget *gnc_gen_trans_list_widget (GNCImportMainMatcher *info);
217 
222 GtkWidget *
223 gnc_gen_trans_list_append_text_widget (GNCImportMainMatcher *info);
224 
229 bool gnc_gen_trans_list_empty (GNCImportMainMatcher *info);
230 
234 void gnc_gen_trans_list_show_all (GNCImportMainMatcher *info);
235 
241 void gnc_gen_trans_list_show_reconcile_after_close_button (GNCImportMainMatcher *info,
242  bool reconcile_after_close,
243  bool active);
248 GtkWidget* gnc_gen_trans_list_get_reconcile_after_close_button (GNCImportMainMatcher *info);
249 
250 #ifdef __cplusplus
251 }
252 #endif
253 
254 #endif
255 
void gnc_gen_trans_list_show_reconcile_after_close_button(GNCImportMainMatcher *info, bool reconcile_after_close, bool active)
Show and set the reconcile after close check button.
void gnc_gen_trans_list_show_all(GNCImportMainMatcher *info)
Shows widgets.
Generic importer backend interface.
void on_matcher_help_clicked(GtkButton *button, gpointer user_data)
This allows for the transaction help dialog to be started from the assistant button callback...
void gnc_gen_trans_list_add_tp_cb(GNCImportMainMatcher *info, GNCTransactionProcessedCB trans_processed_cb, gpointer user_data)
Add transaction processed callback to the transaction importer.
GtkWidget * gnc_gen_trans_list_append_text_widget(GNCImportMainMatcher *info)
Returns the append_text widget of this dialog.
GNCImportMainMatcher * gnc_gen_trans_assist_new(GtkWidget *parent, GtkWidget *assistant_page, const gchar *heading, bool all_from_same_account, gint match_date_hardlimit)
Add the Transaction matcher to an existing page of an assistant.
void gnc_gen_trans_list_add_trans(GNCImportMainMatcher *gui, Transaction *trans)
Add a newly imported Transaction to the Transaction Importer.
bool gnc_gen_trans_list_empty(GNCImportMainMatcher *info)
Checks whether there are no transactions to match.
void gnc_gen_trans_list_add_trans_with_split_data(GNCImportMainMatcher *gui, Transaction *trans, GNCImportLastSplitInfo *lsplit)
Add a newly imported Transaction to the Transaction Importer.
GtkWidget * gnc_gen_trans_list_get_reconcile_after_close_button(GNCImportMainMatcher *info)
Returns the reconcile after close check button.
The transaction match picker dialog interface.
GtkWidget * gnc_gen_trans_list_widget(GNCImportMainMatcher *info)
Returns the widget of this dialog.
void gnc_gen_trans_assist_start(GNCImportMainMatcher *info)
This starts the import process for transaction from an assistant.
GNCImportMainMatcher * gnc_gen_trans_list_new(GtkWidget *parent, const gchar *heading, bool all_from_same_account, gint match_date_hardlimit, bool show_all)
Create a new generic transaction dialog window and return it.
void gnc_gen_trans_list_add_trans_with_ref_id(GNCImportMainMatcher *gui, Transaction *trans, guint32 ref_id)
Add a newly imported Transaction to the Transaction Importer and provide an external reference id for...
void gnc_gen_trans_list_delete(GNCImportMainMatcher *info)
Deletes the given object.
bool gnc_gen_trans_list_run(GNCImportMainMatcher *info)
Run this dialog and return only after the user pressed Ok, Cancel, or closed the window.
API for Transactions and Splits (journal entries)