Working with jobs.
More...
Working with jobs.
This tutorial shows how to use jobs in AqBanking. In this example we retrieve transaction statements for a given account.
You must either choose a frontend to be used with AqBanking or create one yourself by implementing the user interface callbacks of AqBanking.
However, for simplicity reasons we use the console frontend CBanking which implements these callbacks for you.
There are other frontends, e.g. G2Banking for GTK2/Gnome, QBanking for QT3 or KDE3 or KBanking for KDE3.
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <gwenhywfar/cgui.h>
int main(int argc, char **argv) {
int rv;
GWEN_GUI *gui;
gui=GWEN_Gui_CGui_new();
GWEN_Gui_SetGui(gui);
if (rv) {
fprintf(stderr, "Error on init (%d)\n", rv);
return 2;
}
fprintf(stderr, "AqBanking successfully initialized.\n");
if (rv) {
fprintf(stderr, "Error on init of online modules (%d)\n", rv);
return 2;
}
"aqhbci",
"de",
"200*",
"*",
"*");
if (a) {
if (rv) {
fprintf(stderr, "Job is not available (%d)\n", rv);
return 2;
}
if (rv) {
fprintf(stderr, "Error on executeQueue (%d)\n", rv);
return 2;
}
else {
while(ai) {
while(t) {
if (v) {
const GWEN_STRINGLIST *sl;
const char *purpose;
if (sl)
purpose=GWEN_StringList_FirstString(sl);
else
purpose="";
fprintf(stderr, " %-32s (%.2f %s)\n",
purpose,
}
}
}
}
}
else {
fprintf(stderr, "No account found.\n");
}
if (rv) {
fprintf(stderr, "ERROR: Error on deinit online modules (%d)\n", rv);
return 3;
}
if (rv) {
fprintf(stderr, "ERROR: Error on deinit (%d)\n", rv);
return 3;
}
return 0;
}