GnuCash  5.6-150-g038405b370+
gnc-plugin-aqbanking.c
1 /*
2  * gnc-plugin-aqbanking.c --
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 
31 #include <config.h>
32 
33 #include <glib/gi18n.h>
34 
35 #include "Account.h"
36 #include "dialog-ab-trans.h"
37 #include "assistant-ab-initial.h"
38 #include "gnc-ab-getbalance.h"
39 #include "gnc-ab-gettrans.h"
40 #include "gnc-ab-transfer.h"
41 #include "gnc-ab-utils.h"
42 #include "gnc-ab-kvp.h"
43 #include "gnc-gwen-gui.h"
44 #include "gnc-file-aqb-import.h"
45 #include "gnc-plugin-aqbanking.h"
46 #include "gnc-plugin-manager.h"
49 #include "gnc-main-window.h"
50 #include "gnc-prefs.h"
51 #include "gnc-ui-util.h" // for gnc_get_current_book
52 
53 /* This static indicates the debugging module that this .o belongs to. */
54 static QofLogModule log_module = G_LOG_DOMAIN;
55 
56 static void gnc_plugin_aqbanking_add_to_window(GncPlugin *plugin, GncMainWindow *window, GQuark type);
57 static void gnc_plugin_aqbanking_remove_from_window(GncPlugin *plugin, GncMainWindow *window, GQuark type);
58 
59 /* Object callbacks */
60 static void gnc_plugin_ab_main_window_page_added(GncMainWindow *window, GncPluginPage *page, gpointer user_data);
61 static void gnc_plugin_ab_main_window_page_changed(GncMainWindow *window, GncPluginPage *page, gpointer user_data);
62 static void gnc_plugin_ab_account_selected(GncPluginPage *plugin_page, Account *account, gpointer user_data);
63 
64 /* Auxiliary functions */
65 static Account *main_window_to_account(GncMainWindow *window);
66 
67 /* Command callbacks */
68 static void gnc_plugin_ab_cmd_setup (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
69 static void gnc_plugin_ab_cmd_get_balance (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
70 static void gnc_plugin_ab_cmd_get_transactions (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
71 static void gnc_plugin_ab_cmd_issue_sepatransaction (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
72 static void gnc_plugin_ab_cmd_issue_sepainternaltransaction (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
73 static void gnc_plugin_ab_cmd_issue_inttransaction (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
74 static void gnc_plugin_ab_cmd_issue_sepa_direct_debit (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
75 static void gnc_plugin_ab_cmd_view_logwindow (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
76 static void gnc_plugin_ab_cmd_aqb_import (GSimpleAction *simple, GVariant *parameter, gpointer user_data);
77 
78 #define PLUGIN_ACTIONS_NAME "gnc-plugin-aqbanking-actions"
79 #define PLUGIN_UI_FILENAME "gnc-plugin-aqbanking.ui"
80 
81 #define MENU_TOGGLE_ACTION_AB_VIEW_LOGWINDOW "ABViewLogwindowAction"
82 
83 static GActionEntry gnc_plugin_actions [] =
84 {
85  { "OnlineActionsAction", NULL, NULL, NULL, NULL },
86  { "ABSetupAction", gnc_plugin_ab_cmd_setup, NULL, NULL, NULL },
87  { "ABGetBalanceAction", gnc_plugin_ab_cmd_get_balance, NULL, NULL, NULL },
88  { "ABGetTransAction", gnc_plugin_ab_cmd_get_transactions, NULL, NULL, NULL },
89  { "ABIssueSepaTransAction", gnc_plugin_ab_cmd_issue_sepatransaction, NULL, NULL, NULL },
90  { "ABIssueSepaIntTransAction", gnc_plugin_ab_cmd_issue_sepainternaltransaction, NULL, NULL, NULL },
91  { "ABIssueIntTransAction", gnc_plugin_ab_cmd_issue_inttransaction, NULL, NULL, NULL },
92  { "ABIssueSepaDirectDebitAction", gnc_plugin_ab_cmd_issue_sepa_direct_debit, NULL, NULL, NULL },
93  { "AQBankingImportAction", gnc_plugin_ab_cmd_aqb_import, NULL, NULL, NULL },
94  { MENU_TOGGLE_ACTION_AB_VIEW_LOGWINDOW, gnc_plugin_ab_cmd_view_logwindow, NULL, "true", NULL },
95 };
97 static guint gnc_plugin_n_actions = G_N_ELEMENTS(gnc_plugin_actions);
98 
100 static const gchar *gnc_plugin_load_ui_items [] =
101 {
102  "FilePlaceholder1",
103  "ToolsPlaceholder0",
104  "ActionsPlaceholder1",
105  NULL,
106 };
107 
108 static const gchar *need_account_actions[] =
109 {
110  "ABGetBalanceAction",
111  "ABGetTransAction",
112  "ABIssueSepaTransAction",
113 #if (AQBANKING_VERSION_INT >= 60400)
114  "ABIssueSepaIntTransAction",
115 #endif
116  "ABIssueIntTransAction",
117  "ABIssueSepaDirectDebitAction",
118  NULL
119 };
120 
121 #if (AQBANKING_VERSION_INT < 60400)
122 static const gchar *inactive_account_actions[] =
123 {
124  "ABIssueSepaIntTransAction",
125  NULL
126 };
127 #endif
128 
129 static const gchar *readonly_inactive_actions[] =
130 {
131  "OnlineActionsAction",
132  "ABSetupAction",
133  NULL
134 };
135 
136 static GncMainWindow *gnc_main_window = NULL;
137 
138 /************************************************************
139  * Object Implementation *
140  ************************************************************/
141 
143 {
144  GncPlugin gnc_plugin;
145 };
146 
147 G_DEFINE_TYPE(GncPluginAqBanking, gnc_plugin_aqbanking, GNC_TYPE_PLUGIN)
148 
149 GncPlugin *
151 {
152  return GNC_PLUGIN(g_object_new(GNC_TYPE_PLUGIN_AQBANKING, (gchar*) NULL));
153 }
154 
155 static void
156 gnc_plugin_aqbanking_class_init(GncPluginAqBankingClass *klass)
157 {
158  GncPluginClass *plugin_class = GNC_PLUGIN_CLASS(klass);
159 
160  /* plugin info */
161  plugin_class->plugin_name = GNC_PLUGIN_AQBANKING_NAME;
162 
163  /* widget addition/removal */
164  plugin_class->actions_name = PLUGIN_ACTIONS_NAME;
165  plugin_class->actions = gnc_plugin_actions;
166  plugin_class->n_actions = gnc_plugin_n_actions;
167  plugin_class->ui_filename = PLUGIN_UI_FILENAME;
168  plugin_class->ui_updates = gnc_plugin_load_ui_items;
169  plugin_class->add_to_window = gnc_plugin_aqbanking_add_to_window;
170  plugin_class->remove_from_window = gnc_plugin_aqbanking_remove_from_window;
171 }
172 
173 static void
174 gnc_plugin_aqbanking_init(GncPluginAqBanking *plugin)
175 {
176 }
177 
182 static void
183 gnc_plugin_aqbanking_add_to_window(GncPlugin *plugin, GncMainWindow *window,
184  GQuark type)
185 {
186  GAction *action;
187 
188  gnc_main_window = window;
189 
190  g_signal_connect (window, "page_added",
191  G_CALLBACK(gnc_plugin_ab_main_window_page_added),
192  plugin);
193  g_signal_connect (window, "page_changed",
194  G_CALLBACK(gnc_plugin_ab_main_window_page_changed),
195  plugin);
196 
198  MENU_TOGGLE_ACTION_AB_VIEW_LOGWINDOW);
199 
200  if (action)
201  {
202  GVariant *state = g_action_get_state (G_ACTION(action));
203  g_action_change_state (G_ACTION(action), g_variant_new_boolean (FALSE));
204  g_variant_unref (state);
205  }
206 }
207 
208 static void
209 gnc_plugin_aqbanking_remove_from_window(GncPlugin *plugin, GncMainWindow *window,
210  GQuark type)
211 {
212  g_signal_handlers_disconnect_by_func(
213  window, G_CALLBACK(gnc_plugin_ab_main_window_page_changed), plugin);
214  g_signal_handlers_disconnect_by_func(
215  window, G_CALLBACK(gnc_plugin_ab_main_window_page_added), plugin);
216 }
217 
218 /************************************************************
219  * Object Callbacks *
220  ************************************************************/
221 
226 static void
227 gnc_plugin_ab_main_window_page_added(GncMainWindow *window, GncPluginPage *page,
228  gpointer user_data)
229 {
230  const gchar *page_name;
231 
232  ENTER("main window %p, page %p", window, page);
233  if (!GNC_IS_PLUGIN_PAGE(page))
234  {
235  LEAVE("no plugin_page");
236  return;
237  }
238 
239  page_name = gnc_plugin_page_get_plugin_name(page);
240  if (!page_name)
241  {
242  LEAVE("no page_name of plugin_page");
243  return;
244  }
245 
246  if (strcmp(page_name, GNC_PLUGIN_PAGE_ACCOUNT_TREE_NAME) == 0)
247  {
248  DEBUG("account tree page, adding signal");
249  g_signal_connect(page, "account_selected",
250  G_CALLBACK(gnc_plugin_ab_account_selected), NULL);
251  }
252 
253  gnc_plugin_ab_main_window_page_changed(window, page, user_data);
254 
255  LEAVE(" ");
256 }
257 
260 static void update_inactive_actions(GncPluginPage *plugin_page)
261 {
262  GncMainWindow *window;
263  GSimpleActionGroup *simple_action_group;
264 
265  // We are readonly - so we have to switch particular actions to inactive.
266  gboolean is_readwrite = !qof_book_is_readonly(gnc_get_current_book());
267 
268  // We continue only if the current page is a plugin page
269  if (!plugin_page || !GNC_IS_PLUGIN_PAGE(plugin_page))
270  return;
271 
272  window = GNC_MAIN_WINDOW(plugin_page->window);
273  g_return_if_fail (GNC_IS_MAIN_WINDOW(window));
274  simple_action_group = gnc_main_window_get_action_group (window, PLUGIN_ACTIONS_NAME);
275  g_return_if_fail (G_IS_SIMPLE_ACTION_GROUP(simple_action_group));
276 
277  /* Set the action's sensitivity */
278  gnc_plugin_set_actions_enabled (G_ACTION_MAP(simple_action_group), readonly_inactive_actions,
279  is_readwrite);
280 }
281 
282 
287 static void
288 gnc_plugin_ab_main_window_page_changed (GncMainWindow *window,
289  GncPluginPage *page, gpointer user_data)
290 {
291  Account *account = main_window_to_account (window);
292 
293  /* Make sure not to call this with a NULL GncPluginPage */
294  if (page)
295  {
296  // Update the menu items according to the selected account
297  gnc_plugin_ab_account_selected (page, account, user_data);
298 
299  // Also update the action sensitivity due to read-only
300  update_inactive_actions (page);
301  }
302 }
303 
308 static void
309 gnc_plugin_ab_account_selected (GncPluginPage *plugin_page, Account *account,
310  gpointer user_data)
311 {
312  GncMainWindow *window;
313  GSimpleActionGroup *simple_action_group;
314  const gchar *bankcode = NULL;
315  const gchar *accountid = NULL;
316 
317  g_return_if_fail(GNC_IS_PLUGIN_PAGE(plugin_page));
318  window = GNC_MAIN_WINDOW(plugin_page->window);
319  g_return_if_fail(GNC_IS_MAIN_WINDOW(window));
320  simple_action_group = gnc_main_window_get_action_group (window, PLUGIN_ACTIONS_NAME);
321  g_return_if_fail (G_IS_SIMPLE_ACTION_GROUP(simple_action_group));
322 
323  if (account)
324  {
325  bankcode = gnc_ab_get_account_bankcode(account);
326  accountid = gnc_ab_get_account_accountid(account);
327 
328  gnc_plugin_set_actions_enabled (G_ACTION_MAP(simple_action_group), need_account_actions,
329  (account && bankcode && *bankcode
330  && accountid && *accountid));
331  gnc_main_window_set_vis_of_items_by_action (window, need_account_actions,
332  TRUE);
333 
334 #if (AQBANKING_VERSION_INT < 60400)
335  gnc_plugin_set_actions_enabled (G_ACTION_MAP(simple_action_group),
336  inactive_account_actions, FALSE);
337  gnc_main_window_set_vis_of_items_by_action (window, inactive_account_actions,
338  FALSE);
339 #endif
340  }
341  else
342  {
343  gnc_plugin_set_actions_enabled (G_ACTION_MAP(simple_action_group),
344  need_account_actions, FALSE);
345  gnc_main_window_set_vis_of_items_by_action (window, need_account_actions,
346  FALSE);
347  }
348 
349 }
350 
351 /************************************************************
352  * Auxiliary Functions *
353  ************************************************************/
354 
366 static Account *
367 main_window_to_account(GncMainWindow *window)
368 {
369  GncPluginPage *page;
370  const gchar *page_name;
371  Account *account = NULL;
372  const gchar *account_name;
373 
374  ENTER("main window %p", window);
375  if (!GNC_IS_MAIN_WINDOW(window))
376  {
377  LEAVE("no main_window");
378  return NULL;
379  }
380 
381  page = gnc_main_window_get_current_page(window);
382  if (!GNC_IS_PLUGIN_PAGE(page))
383  {
384  LEAVE("no plugin_page");
385  return NULL;
386  }
387  page_name = gnc_plugin_page_get_plugin_name(page);
388  if (!page_name)
389  {
390  LEAVE("no page_name of plugin_page");
391  return NULL;
392  }
393 
394  if (strcmp(page_name, GNC_PLUGIN_PAGE_REGISTER_NAME) == 0)
395  {
396  DEBUG("register page");
398  GNC_PLUGIN_PAGE_REGISTER(page));
399  }
400  else if (strcmp(page_name, GNC_PLUGIN_PAGE_ACCOUNT_TREE_NAME) == 0)
401  {
402  DEBUG("account tree page");
404  GNC_PLUGIN_PAGE_ACCOUNT_TREE(page));
405  }
406  else
407  {
408  account = NULL;
409  }
410  account_name = account ? xaccAccountGetName(account) : NULL;
411  LEAVE("account %s(%p)", account_name ? account_name : "(null)", account);
412  return account;
413 }
414 
415 void
416 gnc_plugin_aqbanking_set_logwindow_visible (gboolean logwindow_visible)
417 {
418  GAction *action = gnc_main_window_find_action_in_group (gnc_main_window, PLUGIN_ACTIONS_NAME,
419  MENU_TOGGLE_ACTION_AB_VIEW_LOGWINDOW);
420 
421  if (action)
422  {
423  GVariant *state = g_action_get_state (G_ACTION(action));
424  g_action_change_state (G_ACTION(action), g_variant_new_boolean (logwindow_visible));
425  g_variant_unref (state);
426  }
427 }
428 
429 /************************************************************
430  * Command Callbacks *
431  ************************************************************/
432 
433 static void
434 gnc_plugin_ab_cmd_setup (GSimpleAction *simple,
435  GVariant *parameter,
436  gpointer user_data)
437 {
438  GncMainWindowActionData *data = user_data;
439  ENTER("action %p, main window data %p", simple, data);
440  gnc_main_window = data->window;
442  LEAVE(" ");
443 }
444 
445 static void
446 gnc_plugin_ab_cmd_get_balance (GSimpleAction *simple,
447  GVariant *parameter,
448  gpointer user_data)
449 {
450  GncMainWindowActionData *data = user_data;
451  Account *account;
452 
453  ENTER("action %p, main window data %p", simple, data);
454  account = main_window_to_account(data->window);
455  if (account == NULL)
456  {
457  PINFO("No AqBanking account selected");
458  LEAVE("no account");
459  return;
460  }
461 
462  gnc_main_window = data->window;
463  gnc_ab_getbalance(GTK_WIDGET(data->window), account);
464 
465  LEAVE(" ");
466 }
467 
468 static void
469 gnc_plugin_ab_cmd_get_transactions (GSimpleAction *simple,
470  GVariant *parameter,
471  gpointer user_data)
472 {
473  GncMainWindowActionData *data = user_data;
474  Account *account;
475 
476  ENTER("action %p, main window data %p", simple, data);
477  account = main_window_to_account(data->window);
478  if (account == NULL)
479  {
480  PINFO("No AqBanking account selected");
481  LEAVE("no account");
482  return;
483  }
484 
485  gnc_main_window = data->window;
486  gnc_ab_gettrans(GTK_WIDGET(data->window), account);
487 
488  LEAVE(" ");
489 }
490 
491 static void
492 gnc_plugin_ab_cmd_issue_sepatransaction (GSimpleAction *simple,
493  GVariant *parameter,
494  gpointer user_data)
495 {
496  GncMainWindowActionData *data = user_data;
497  Account *account;
498 
499  ENTER("action %p, main window data %p", simple, data);
500  account = main_window_to_account(data->window);
501  if (account == NULL)
502  {
503  PINFO("No AqBanking account selected");
504  LEAVE("no account");
505  return;
506  }
507 
508  gnc_main_window = data->window;
509  gnc_ab_maketrans(GTK_WIDGET(data->window), account, SEPA_TRANSFER);
510 
511  LEAVE(" ");
512 }
513 
514 #if (AQBANKING_VERSION_INT >= 60400)
515 static void
516 gnc_plugin_ab_cmd_issue_sepainternaltransaction (GSimpleAction *simple,
517  GVariant *parameter,
518  gpointer user_data)
519 {
520  GncMainWindowActionData *data = user_data;
521  Account *account;
522 
523  ENTER("action %p, main window data %p", simple, data);
524  account = main_window_to_account(data->window);
525  if (account == NULL)
526  {
527  PINFO("No AqBanking account selected");
528  LEAVE("no account");
529  return;
530  }
531 
532  gnc_main_window = data->window;
533  gnc_ab_maketrans(GTK_WIDGET(data->window), account, SEPA_INTERNAL_TRANSFER);
534 
535  LEAVE(" ");
536 }
537 #else
538 static void
539 gnc_plugin_ab_cmd_issue_sepainternaltransaction (GSimpleAction *simple,
540  GVariant *parameter,
541  gpointer user_data)
542 {
543  GncMainWindowActionData *data = user_data;
544 
545  ENTER("action %p, main window data %p", simple, data);
546  PINFO("Sepa Internal Transfer not supported by your aqbanking version!");
547  LEAVE("Sepa Internal Transfer not supported!");
548 }
549 #endif
550 
551 static void
552 gnc_plugin_ab_cmd_issue_inttransaction (GSimpleAction *simple,
553  GVariant *parameter,
554  gpointer user_data)
555 {
556  GncMainWindowActionData *data = user_data;
557  Account *account;
558 
559  ENTER("action %p, main window data %p", simple, data);
560  account = main_window_to_account(data->window);
561  if (account == NULL)
562  {
563  PINFO("No AqBanking account selected");
564  LEAVE("no account");
565  return;
566  }
567 
568  gnc_main_window = data->window;
569  gnc_ab_maketrans(GTK_WIDGET(data->window), account,
570  SINGLE_INTERNAL_TRANSFER);
571 
572  LEAVE(" ");
573 }
574 
575 static void
576 gnc_plugin_ab_cmd_issue_sepa_direct_debit (GSimpleAction *simple,
577  GVariant *parameter,
578  gpointer user_data)
579 {
580  GncMainWindowActionData *data = user_data;
581  Account *account;
582 
583  ENTER("action %p, main window data %p", simple, data);
584  account = main_window_to_account(data->window);
585  if (account == NULL)
586  {
587  PINFO("No AqBanking account selected");
588  LEAVE("no account");
589  return;
590  }
591 
592  gnc_main_window = data->window;
593  gnc_ab_maketrans(GTK_WIDGET(data->window), account, SEPA_DEBITNOTE);
594 
595  LEAVE(" ");
596 }
597 
598 static void
599 gnc_plugin_ab_cmd_view_logwindow (GSimpleAction *simple,
600  GVariant *parameter,
601  gpointer user_data)
602 {
603  GVariant *state = g_action_get_state (G_ACTION(simple));
604  gboolean toggle = g_variant_get_boolean (state);
605  g_variant_unref (state);
606 
607  gboolean new_toggle = !toggle;
608  g_action_change_state (G_ACTION(simple), g_variant_new_boolean (new_toggle));
609 
610  if (new_toggle)
611  {
613  {
614  /* Log window could not be made visible */
615  g_action_change_state (G_ACTION(simple), g_variant_new_boolean (FALSE));
616  }
617  }
618  else
619  {
621  }
622 }
623 
624 static void
625 gnc_plugin_ab_cmd_aqb_import (GSimpleAction *simple,
626  GVariant *parameter,
627  gpointer user_data)
628 {
629  GncMainWindowActionData *data = user_data;
630  gnc_main_window = data->window;
631  gnc_file_aqbanking_import_dialog (GTK_WINDOW (gnc_main_window));
632 }
633 
634 /************************************************************
635  * Plugin Bootstrapping *
636  ************************************************************/
637 
638 void
640 {
641  GncPlugin *plugin = gnc_plugin_aqbanking_new();
642 
644 }
Dialog for AqBanking transaction data.
gboolean gnc_GWEN_Gui_show_dialog()
Unhides Online Banking Connection Window (Make log visible)
Definition: gnc-gwen-gui.c:350
Account * gnc_plugin_page_account_tree_get_current_account(GncPluginPageAccountTree *page)
Given a pointer to an account tree plugin page, return the selected account (if any).
The instance data structure for a content plugin.
utility functions for the GnuCash UI
#define G_LOG_DOMAIN
Functions providing the SX List as a plugin page.
#define PINFO(format, args...)
Print an informational note.
Definition: qoflog.h:256
void gnc_main_window_set_vis_of_items_by_action(GncMainWindow *window, const gchar **action_names, gboolean vis)
Show or hide menu and toolbar items based on a NULL terminated list of action names.
AqBanking setup functionality.
STRUCTS.
#define DEBUG(format, args...)
Print a debugging message.
Definition: qoflog.h:264
Plugin management functions for the GnuCash UI.
GtkWidget * window
The window that contains the display widget for this plugin.
void gnc_plugin_manager_add_plugin(GncPluginManager *manager, GncPlugin *plugin)
Add a plugin to the list maintained by the plugin manager.
const gchar * gnc_ab_get_account_bankcode(const Account *a)
Return the bankcode string in the Account a.
Definition: gnc-ab-kvp.c:59
#define ENTER(format, args...)
Print a function entry debugging message.
Definition: qoflog.h:272
GncPluginPage * gnc_main_window_get_current_page(GncMainWindow *window)
Retrieve a pointer to the page that is currently at the front of the specified window.
Functions for adding content to a window.
AqBanking getbalance functions.
GAction * gnc_main_window_find_action_in_group(GncMainWindow *window, const gchar *group_name, const gchar *action_name)
Find the GAction in a specific action group for window.
Functions providing a register page for the GnuCash UI.
Account handling public routines.
Dialog for AqBanking transaction data.
void gnc_plugin_aqbanking_set_logwindow_visible(gboolean logwindow_visible)
Set MENU_TOGGLE_ACTION_AB_VIEW_LOGWINDOW.
GncPluginManager * gnc_plugin_manager_get(void)
Retrieve a pointer to the plugin manager.
void gnc_plugin_set_actions_enabled(GActionMap *action_map, const gchar **action_names, gboolean enable)
This function sets the sensitivity of a GAction in a specific group.
Definition: gnc-plugin.c:250
Generic api to store and retrieve preferences.
Functions providing a chart of account page.
gboolean qof_book_is_readonly(const QofBook *book)
Return whether the book is read only.
Definition: qofbook.cpp:497
Plugin registration of the AqBanking module.
#define PLUGIN_ACTIONS_NAME
The label given to the main window for this plugin.
#define LEAVE(format, args...)
Print a function exit debugging message.
Definition: qoflog.h:282
GncPlugin * gnc_plugin_aqbanking_new(void)
Account * gnc_plugin_page_register_get_account(GncPluginPageRegister *page)
Get the Account associated with this register page.
void gnc_ab_initial_assistant(void)
Create and show an assistant for the aqbanking setup.
GSimpleActionGroup * gnc_main_window_get_action_group(GncMainWindow *window, const gchar *group_name)
Retrieve a specific set of user interface actions from a window.
void gnc_plugin_aqbanking_create_plugin(void)
Create a new GncPluginAqBanking object and register it.
const gchar * gnc_ab_get_account_accountid(const Account *a)
Return accountid string in the Account a.
Definition: gnc-ab-kvp.c:39
void gnc_file_aqbanking_import_dialog(GtkWindow *parent)
Import files via AQBanking&#39;s Import Dialog.
void gnc_ab_getbalance(GtkWidget *parent, Account *gnc_acc)
Execute a GetBalance job, show the resulting balance and offer to reconcile the GnuCash account...
const char * xaccAccountGetName(const Account *acc)
Get the account&#39;s name.
Definition: Account.cpp:3239
AqBanking KVP handling.
GUI callbacks for AqBanking.
void gnc_ab_gettrans(GtkWidget *parent, Account *gnc_acc)
Execute a GetTransactions job.
AqBanking utility functions.
#define PLUGIN_UI_FILENAME
The name of the UI description file for this plugin.
void gnc_GWEN_Gui_hide_dialog()
Hides Online Banking Connection Window (Close log window)
Definition: gnc-gwen-gui.c:381
const gchar * gnc_plugin_page_get_plugin_name(GncPluginPage *plugin_page)
Retrieve the textual name of a plugin.
void gnc_ab_maketrans(GtkWidget *parent, Account *gnc_acc, GncABTransType trans_type)
Create SEPA transfers.