mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Some more work, including adapting to the latest openhbci changes.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7136 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
/* #include "Group.h" */
|
||||
#include "dialog-utils.h"
|
||||
#include "druid-utils.h"
|
||||
#include <openhbci/hbciapi.h>
|
||||
#include <openhbci/api.h>
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
/* #include "gnc-ui-util.h" */
|
||||
/* #include "io-example-account.h" */
|
||||
/* #include "top-level.h" */
|
||||
#include <openhbci/hbciapi.h>
|
||||
#include <openhbci/api.h>
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
||||
@@ -26,8 +26,7 @@
|
||||
#define HBCI_ACCOUNT_ID "account-id"
|
||||
#define HBCI_BANK_CODE "bank-code"
|
||||
#define HBCI_COUNTRY_CODE "country-code"
|
||||
#define HBCI_USERID_LIST "user-id-list"
|
||||
#define HBCI_BANK_LIST "bank-list"
|
||||
#define HBCI_CONFIGFILE "config-filename"
|
||||
|
||||
/* Account */
|
||||
gchar *gnc_hbci_get_account_accountid (Account *a)
|
||||
@@ -69,49 +68,18 @@ void gnc_hbci_set_account_countrycode (Account *a, gint code)
|
||||
|
||||
|
||||
/* GNCBook */
|
||||
GList *gnc_hbci_get_book_bankframelist (GNCBook *b)
|
||||
gchar *gnc_hbci_get_book_configfile (GNCBook *b)
|
||||
{
|
||||
kvp_frame *frame = gnc_hbci_get_book_kvp (b);
|
||||
kvp_value *value = kvp_frame_get_slot (frame, HBCI_BANK_LIST);
|
||||
return kvp_value_get_glist (value);
|
||||
}
|
||||
void gnc_hbci_set_book_bankframelist_nc (GNCBook *b, GList *banklist)
|
||||
{
|
||||
kvp_frame *frame = gnc_hbci_get_book_kvp (b);
|
||||
kvp_value *value = kvp_value_new_glist_nc (banklist);
|
||||
kvp_frame_set_slot_nc (frame, HBCI_BANK_LIST, value);
|
||||
}
|
||||
gchar *gnc_hbci_get_bankframe_bankcode (kvp_frame *f)
|
||||
{
|
||||
kvp_value *value = kvp_frame_get_slot (f, HBCI_BANK_CODE);
|
||||
kvp_value *value = kvp_frame_get_slot (frame, HBCI_CONFIGFILE);
|
||||
return kvp_value_get_string (value);
|
||||
}
|
||||
gint gnc_hbci_get_bankframe_countrycode (kvp_frame *f)
|
||||
void gnc_hbci_set_book_configfile (GNCBook *b, const char *filename)
|
||||
{
|
||||
kvp_value *value = kvp_frame_get_slot (f, HBCI_COUNTRY_CODE);
|
||||
return kvp_value_get_gint64 (value);
|
||||
kvp_frame *frame = gnc_hbci_get_book_kvp (b);
|
||||
kvp_value *value = kvp_value_new_string (filename);
|
||||
kvp_frame_set_slot (frame, HBCI_CONFIGFILE, value);
|
||||
}
|
||||
GList *gnc_hbci_get_bankframe_userids (kvp_frame *f)
|
||||
{
|
||||
kvp_value *value = kvp_frame_get_slot (f, HBCI_USERID_LIST);
|
||||
return kvp_value_get_glist (value);
|
||||
}
|
||||
kvp_frame *gnc_hbci_bankframe_new (const char *bankcode,
|
||||
gint countrycode,
|
||||
const GList *userids)
|
||||
{
|
||||
kvp_frame *newframe = kvp_frame_new();
|
||||
kvp_frame_set_slot(newframe, HBCI_BANK_CODE,
|
||||
kvp_value_new_string (bankcode));
|
||||
kvp_frame_set_slot(newframe, HBCI_COUNTRY_CODE,
|
||||
kvp_value_new_gint64 (countrycode));
|
||||
kvp_frame_set_slot(newframe, HBCI_USERID_LIST,
|
||||
kvp_value_new_glist (userids));
|
||||
return newframe;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* lowlevel */
|
||||
/* getters for kvp frame in book */
|
||||
|
||||
@@ -40,16 +40,8 @@ gint gnc_hbci_get_account_countrycode (Account *a);
|
||||
void gnc_hbci_set_account_countrycode (Account *a, gint code);
|
||||
|
||||
/* GNCBook */
|
||||
GList *gnc_hbci_get_book_bankframelist (GNCBook *b);
|
||||
void gnc_hbci_set_book_bankframelist_nc (GNCBook *b, GList *banklist);
|
||||
|
||||
gchar *gnc_hbci_get_bankframe_bankcode (kvp_frame *f);
|
||||
gint gnc_hbci_get_bankframe_countrycode (kvp_frame *f);
|
||||
GList *gnc_hbci_get_bankframe_userids (kvp_frame *f);
|
||||
|
||||
kvp_frame *gnc_hbci_bankframe_new (const char *bankcode,
|
||||
gint countrycode,
|
||||
const GList *userids);
|
||||
gchar *gnc_hbci_get_book_configfile (GNCBook *b);
|
||||
void gnc_hbci_set_book_configfile (GNCBook *b, const char *filename);
|
||||
|
||||
/* lowlevel */
|
||||
/* getter for kvp frame in book */
|
||||
|
||||
Reference in New Issue
Block a user