Revision 6b576561
Von martin vor fast 17 Jahren hinzugefügt
src/plugins/backends/aqofxconnect/plugin/provider.c | ||
---|---|---|
GWEN_Buffer_ReserveBytes(reqbuf, 1024);
|
||
|
||
/* add actual request */
|
||
rv=AO_Provider__AddAccountInfoReq(pro, guiid, reqbuf);
|
||
rv=AO_Provider__AddAccountInfoReq(pro, u, guiid, reqbuf);
|
||
if (rv<0) {
|
||
DBG_ERROR(AQOFXCONNECT_LOGDOMAIN,
|
||
"Error adding request element (%d)", rv);
|
src/plugins/backends/aqofxconnect/plugin/provider_p.h | ||
---|---|---|
uint32_t guiid);
|
||
|
||
static int AO_Provider__WrapRequest(AB_PROVIDER *pro,
|
||
AB_USER *u,
|
||
const char *mTypeName,
|
||
const char *tTypeName,
|
||
GWEN_BUFFER *buf);
|
||
... | ... | |
|
||
|
||
int AO_Provider__AddAccountInfoReq(AB_PROVIDER *pro,
|
||
AB_USER *u,
|
||
uint32_t guiid,
|
||
GWEN_BUFFER *buf);
|
||
|
src/plugins/backends/aqofxconnect/plugin/r_accountinfo.c | ||
---|---|---|
|
||
|
||
int AO_Provider__AddAccountInfoReq(AB_PROVIDER *pro,
|
||
AB_USER *u,
|
||
uint32_t guiid,
|
||
GWEN_BUFFER *buf) {
|
||
int rv;
|
||
... | ... | |
GWEN_Buffer_AppendString(buf, "</ACCTINFORQ>");
|
||
|
||
/* wrap into request */
|
||
rv=AO_Provider__WrapRequest(pro, "SIGNUP", "ACCTINFO", buf);
|
||
rv=AO_Provider__WrapRequest(pro, u, "SIGNUP", "ACCTINFO", buf);
|
||
if (rv<0) {
|
||
DBG_INFO(AQOFXCONNECT_LOGDOMAIN, "here (%d)", rv);
|
||
return rv;
|
src/plugins/backends/aqofxconnect/plugin/r_statements.c | ||
---|---|---|
GWEN_Buffer_AppendString(buf, "</STMTRQ>");
|
||
|
||
/* wrap into request */
|
||
rv=AO_Provider__WrapRequest(pro, "BANK", "STMT", buf);
|
||
rv=AO_Provider__WrapRequest(pro, u, "BANK", "STMT", buf);
|
||
if (rv<0) {
|
||
DBG_INFO(AQOFXCONNECT_LOGDOMAIN, "here (%d)", rv);
|
||
return rv;
|
||
... | ... | |
GWEN_Buffer_AppendString(buf, "</CCSTMTRQ>");
|
||
|
||
/* wrap into request */
|
||
rv=AO_Provider__WrapRequest(pro, "CREDITCARD", "CCSTMT", buf);
|
||
rv=AO_Provider__WrapRequest(pro, u, "CREDITCARD", "CCSTMT", buf);
|
||
if (rv<0) {
|
||
DBG_INFO(AQOFXCONNECT_LOGDOMAIN, "here (%d)", rv);
|
||
return rv;
|
||
... | ... | |
GWEN_Buffer_AppendString(buf, "</INVSTMTRQ>");
|
||
|
||
/* wrap into request */
|
||
rv=AO_Provider__WrapRequest(pro, "INVSTMT", "INVSTMT", buf);
|
||
rv=AO_Provider__WrapRequest(pro, u, "INVSTMT", "INVSTMT", buf);
|
||
if (rv<0) {
|
||
DBG_INFO(AQOFXCONNECT_LOGDOMAIN, "here (%d)", rv);
|
||
return rv;
|
src/plugins/backends/aqofxconnect/plugin/request.c | ||
---|---|---|
GWEN_Buffer_AppendString(buf, "<SIGNONMSGSRQV1>");
|
||
GWEN_Buffer_AppendString(buf, "<SONRQ>");
|
||
GWEN_Buffer_AppendString(buf, "<DTCLIENT>");
|
||
GWEN_Time_toString(ti, "YYYYMMDDhhmmss.000", buf);
|
||
if (AO_User_GetFlags(u) & AO_USER_FLAGS_SEND_SHORT_DATE)
|
||
GWEN_Time_toString(ti, "YYYYMMDDhhmmss", buf);
|
||
else
|
||
GWEN_Time_toString(ti, "YYYYMMDDhhmmss.000", buf);
|
||
|
||
s=AB_User_GetUserId(u);
|
||
if (s) {
|
||
... | ... | |
GWEN_Buffer_AppendString(buf, "<APPVER>");
|
||
GWEN_Buffer_AppendString(buf, s);
|
||
|
||
/* add CLIENTUID, if known */
|
||
s=AO_User_GetClientUid(u);
|
||
if (s && *s) {
|
||
GWEN_Buffer_AppendString(buf, "<CLIENTUID>");
|
||
GWEN_Buffer_AppendString(buf, s);
|
||
}
|
||
|
||
/* close elements */
|
||
GWEN_Buffer_AppendString(buf, "</SONRQ>");
|
||
GWEN_Buffer_AppendString(buf, "</SIGNONMSGSRQV1>");
|
||
... | ... | |
|
||
|
||
int AO_Provider__WrapRequest(AB_PROVIDER *pro,
|
||
AB_USER *u,
|
||
const char *mTypeName,
|
||
const char *tTypeName,
|
||
GWEN_BUFFER *buf) {
|
||
... | ... | |
ti=GWEN_CurrentTime();
|
||
assert(ti);
|
||
GWEN_Buffer_AppendString(tbuf, "<TRNUID>");
|
||
GWEN_Time_toString(ti, "YYYYMMDDhhmmss.000", tbuf);
|
||
if (AO_User_GetFlags(u) & AO_USER_FLAGS_SEND_SHORT_DATE)
|
||
GWEN_Time_toString(ti, "YYYYMMDDhhmmss", tbuf);
|
||
else
|
||
GWEN_Time_toString(ti, "YYYYMMDDhhmmss.000", tbuf);
|
||
GWEN_Buffer_AppendString(tbuf, "<CLTCOOKIE>1");
|
||
|
||
/* append ends of elements to original buffer */
|
src/plugins/backends/aqofxconnect/plugin/user.c | ||
---|---|---|
f|=AO_USER_FLAGS_EMPTY_FID;
|
||
else if (strcasecmp(s, "forceSsl3")==0)
|
||
f|=AO_USER_FLAGS_FORCE_SSL3;
|
||
else if (strcasecmp(s, "sendShortDate")==0)
|
||
f|=AO_USER_FLAGS_SEND_SHORT_DATE;
|
||
else {
|
||
DBG_ERROR(AQOFXCONNECT_LOGDOMAIN,
|
||
"Unknown user flag \"%s\"", s);
|
||
... | ... | |
if (f & AO_USER_FLAGS_FORCE_SSL3)
|
||
GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_DEFAULT, name,
|
||
"forceSsl3");
|
||
if (f & AO_USER_FLAGS_SEND_SHORT_DATE)
|
||
GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_DEFAULT, name,
|
||
"sendShortDate");
|
||
}
|
||
|
||
|
||
... | ... | |
ue->headerVer=strdup(s);
|
||
else
|
||
ue->headerVer=NULL;
|
||
|
||
free(ue->clientUid);
|
||
s=GWEN_DB_GetCharValue(db, "clientUid", 0, NULL);
|
||
if (s)
|
||
ue->clientUid=strdup(s);
|
||
else
|
||
ue->clientUid=NULL;
|
||
}
|
||
|
||
}
|
||
... | ... | |
if (ue->headerVer)
|
||
GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS,
|
||
"headerVer", ue->headerVer);
|
||
if (ue->clientUid)
|
||
GWEN_DB_SetCharValue(db, GWEN_DB_FLAGS_OVERWRITE_VARS,
|
||
"clientUid", ue->clientUid);
|
||
}
|
||
}
|
||
}
|
||
... | ... | |
free(ue->appId);
|
||
free(ue->appVer);
|
||
free(ue->headerVer);
|
||
free(ue->clientUid);
|
||
|
||
GWEN_FREE_OBJECT(ue);
|
||
}
|
||
... | ... | |
|
||
|
||
|
||
const char *AO_User_GetClientUid(const AB_USER *u) {
|
||
AO_USER *ue;
|
||
|
||
assert(u);
|
||
ue=GWEN_INHERIT_GETDATA(AB_USER, AO_USER, u);
|
||
assert(ue);
|
||
|
||
return ue->clientUid;
|
||
}
|
||
|
||
|
||
|
||
void AO_User_SetClientUid(AB_USER *u, const char *s) {
|
||
AO_USER *ue;
|
||
|
||
assert(u);
|
||
ue=GWEN_INHERIT_GETDATA(AB_USER, AO_USER, u);
|
||
assert(ue);
|
||
|
||
free(ue->clientUid);
|
||
if (s) ue->clientUid=strdup(s);
|
||
else ue->clientUid=NULL;
|
||
}
|
||
|
||
|
||
|
||
|
||
|
||
|
src/plugins/backends/aqofxconnect/plugin/user.h | ||
---|---|---|
#include <gwenhywfar/db.h>
|
||
|
||
|
||
#define AO_USER_FLAGS_ACCOUNT_LIST 0x00000001
|
||
#define AO_USER_FLAGS_STATEMENTS 0x00000002
|
||
#define AO_USER_FLAGS_INVESTMENT 0x00000004
|
||
#define AO_USER_FLAGS_BILLPAY 0x00000008
|
||
#define AO_USER_FLAGS_EMPTY_BANKID 0x00000010
|
||
#define AO_USER_FLAGS_EMPTY_FID 0x00000020
|
||
#define AO_USER_FLAGS_FORCE_SSL3 0x00000040
|
||
#define AO_USER_FLAGS_ACCOUNT_LIST 0x00000001
|
||
#define AO_USER_FLAGS_STATEMENTS 0x00000002
|
||
#define AO_USER_FLAGS_INVESTMENT 0x00000004
|
||
#define AO_USER_FLAGS_BILLPAY 0x00000008
|
||
#define AO_USER_FLAGS_EMPTY_BANKID 0x00000010
|
||
#define AO_USER_FLAGS_EMPTY_FID 0x00000020
|
||
#define AO_USER_FLAGS_FORCE_SSL3 0x00000040
|
||
#define AO_USER_FLAGS_SEND_SHORT_DATE 0x00000080
|
||
|
||
|
||
|
||
... | ... | |
AQOFXCONNECT_API
|
||
void AO_User_SetHeaderVer(AB_USER *u, const char *s);
|
||
|
||
AQOFXCONNECT_API
|
||
const char *AO_User_GetClientUid(const AB_USER *u);
|
||
|
||
AQOFXCONNECT_API
|
||
void AO_User_SetClientUid(AB_USER *u, const char *s);
|
||
|
||
|
||
#ifdef __cplusplus
|
||
}
|
src/plugins/backends/aqofxconnect/plugin/user_p.h | ||
---|---|---|
char *appId;
|
||
char *appVer;
|
||
char *headerVer;
|
||
char *clientUid;
|
||
};
|
||
|
||
static void GWENHYWFAR_CB AO_User_FreeData(void *bp, void *p);
|
src/plugins/backends/aqofxconnect/ui/qt3/libs/cfgtabpageuserofx.cpp | ||
---|---|---|
else
|
||
AO_User_SetHeaderVer(u, s.c_str());
|
||
|
||
s=QBanking::QStringToUtf8String(_realPage->clientUidEdit->text());
|
||
if (s.empty())
|
||
AO_User_SetClientUid(u, 0);
|
||
else
|
||
AO_User_SetClientUid(u, s.c_str());
|
||
|
||
s=QBanking::QStringToUtf8String(_realPage->urlEdit->text());
|
||
url=GWEN_Url_fromString(s.c_str());
|
||
t=GWEN_Url_GetProtocol(url);
|
||
... | ... | |
f|=AO_USER_FLAGS_EMPTY_FID;
|
||
if (_realPage->forceSsl3Check->isChecked())
|
||
f|=AO_USER_FLAGS_FORCE_SSL3;
|
||
if (_realPage->sendShortDateCheck->isChecked())
|
||
f|=AO_USER_FLAGS_SEND_SHORT_DATE;
|
||
AO_User_SetFlags(u, f);
|
||
|
||
return true;
|
||
... | ... | |
s=AO_User_GetHeaderVer(u);
|
||
if (s)
|
||
_realPage->headerVerEdit->setText(QString::fromUtf8(s));
|
||
s=AO_User_GetClientUid(u);
|
||
if (s)
|
||
_realPage->clientUidEdit->setText(QString::fromUtf8(s));
|
||
|
||
f=AO_User_GetFlags(u);
|
||
_realPage->accountListCheck->setChecked(f & AO_USER_FLAGS_ACCOUNT_LIST);
|
||
... | ... | |
_realPage->emptyBankIdCheck->setChecked(f & AO_USER_FLAGS_EMPTY_BANKID);
|
||
_realPage->emptyFidCheck->setChecked(f & AO_USER_FLAGS_EMPTY_FID);
|
||
_realPage->forceSsl3Check->setChecked(f & AO_USER_FLAGS_FORCE_SSL3);
|
||
_realPage->sendShortDateCheck->setChecked(f & AO_USER_FLAGS_SEND_SHORT_DATE);
|
||
|
||
return true;
|
||
}
|
src/plugins/backends/aqofxconnect/ui/qt3/libs/cfgtabpageuserofx.ui | ||
---|---|---|
<rect>
|
||
<x>0</x>
|
||
<y>0</y>
|
||
<width>418</width>
|
||
<height>437</height>
|
||
<width>385</width>
|
||
<height>551</height>
|
||
</rect>
|
||
</property>
|
||
<property name="caption">
|
||
... | ... | |
<cstring>groupBox8</cstring>
|
||
</property>
|
||
<property name="title">
|
||
<string>Server Options</string>
|
||
<string>Server Capabilities</string>
|
||
</property>
|
||
<grid>
|
||
<property name="name">
|
||
<cstring>unnamed</cstring>
|
||
</property>
|
||
<widget class="QLayoutWidget" row="0" column="0" rowspan="1" colspan="3">
|
||
<widget class="QLayoutWidget" row="0" column="0" rowspan="1" colspan="2">
|
||
<property name="name">
|
||
<cstring>layout4</cstring>
|
||
</property>
|
||
... | ... | |
<string>Supports Statement Download</string>
|
||
</property>
|
||
</widget>
|
||
<widget class="QCheckBox" row="2" column="0">
|
||
<widget class="QCheckBox" row="1" column="1">
|
||
<property name="name">
|
||
<cstring>investmentCheck</cstring>
|
||
</property>
|
||
... | ... | |
<string>Supports Investments</string>
|
||
</property>
|
||
</widget>
|
||
<widget class="QCheckBox" row="1" column="1" rowspan="1" colspan="2">
|
||
<widget class="QCheckBox" row="2" column="0">
|
||
<property name="name">
|
||
<cstring>billPayCheck</cstring>
|
||
</property>
|
||
<property name="text">
|
||
<string>Supports Bill Pay</string>
|
||
</property>
|
||
</widget>
|
||
</grid>
|
||
</widget>
|
||
<widget class="QGroupBox">
|
||
<property name="name">
|
||
<cstring>groupBox5</cstring>
|
||
</property>
|
||
<property name="title">
|
||
<string>Server Options</string>
|
||
</property>
|
||
<grid>
|
||
<property name="name">
|
||
<cstring>unnamed</cstring>
|
||
</property>
|
||
<widget class="QCheckBox" row="0" column="0">
|
||
<property name="name">
|
||
<cstring>emptyBankIdCheck</cstring>
|
||
</property>
|
||
... | ... | |
</qt></string>
|
||
</property>
|
||
</widget>
|
||
<widget class="QCheckBox" row="2" column="1">
|
||
<widget class="QCheckBox" row="1" column="0">
|
||
<property name="name">
|
||
<cstring>emptyFidCheck</cstring>
|
||
</property>
|
||
... | ... | |
</qt></string>
|
||
</property>
|
||
</widget>
|
||
<widget class="QCheckBox" row="3" column="1">
|
||
<widget class="QCheckBox" row="1" column="1">
|
||
<property name="name">
|
||
<cstring>forceSsl3Check</cstring>
|
||
</property>
|
||
... | ... | |
</qt></string>
|
||
</property>
|
||
</widget>
|
||
<widget class="QCheckBox" row="3" column="0">
|
||
<widget class="QCheckBox" row="0" column="1">
|
||
<property name="name">
|
||
<cstring>billPayCheck</cstring>
|
||
<cstring>sendShortDateCheck</cstring>
|
||
</property>
|
||
<property name="text">
|
||
<string>Supports Bill Pay</string>
|
||
<string>Send Short Date</string>
|
||
</property>
|
||
<property name="toolTip" stdset="0">
|
||
<string>Force use of SSL v3</string>
|
||
</property>
|
||
<property name="whatsThis" stdset="0">
|
||
<string><qt>
|
||
Use this if you have problems connecting to your bank.
|
||
</qt></string>
|
||
</property>
|
||
</widget>
|
||
</grid>
|
||
... | ... | |
<string>APPVER</string>
|
||
</property>
|
||
</widget>
|
||
<widget class="QLabel" row="2" column="0">
|
||
<property name="name">
|
||
<cstring>textLabel5_2_2</cstring>
|
||
</property>
|
||
<property name="text">
|
||
<string>Header Version</string>
|
||
</property>
|
||
</widget>
|
||
<widget class="QLineEdit" row="0" column="1">
|
||
<property name="name">
|
||
<cstring>appIdEdit</cstring>
|
||
... | ... | |
</qt></string>
|
||
</property>
|
||
</widget>
|
||
<widget class="QLabel" row="2" column="0">
|
||
<property name="name">
|
||
<cstring>textLabel5_2_2</cstring>
|
||
</property>
|
||
<property name="text">
|
||
<string>Header Version</string>
|
||
</property>
|
||
</widget>
|
||
<widget class="QLineEdit" row="2" column="1">
|
||
<property name="name">
|
||
<cstring>headerVerEdit</cstring>
|
||
... | ... | |
<property name="whatsThis" stdset="0">
|
||
<string><qt>
|
||
Freely selectable name for your account. This field is not used by AqOfxConnect.
|
||
</qt></string>
|
||
</property>
|
||
</widget>
|
||
<widget class="QLabel" row="3" column="0">
|
||
<property name="name">
|
||
<cstring>textLabel5_2_2_2</cstring>
|
||
</property>
|
||
<property name="text">
|
||
<string>CLIENTUID</string>
|
||
</property>
|
||
</widget>
|
||
<widget class="QLineEdit" row="3" column="1">
|
||
<property name="name">
|
||
<cstring>clientUidEdit</cstring>
|
||
</property>
|
||
<property name="whatsThis" stdset="0">
|
||
<string><qt>
|
||
Freely selectable name for your account. This field is not used by AqOfxConnect.
|
||
</qt></string>
|
||
</property>
|
||
</widget>
|
||
... | ... | |
<tabstop>accountListCheck</tabstop>
|
||
<tabstop>getAccountsButton</tabstop>
|
||
<tabstop>statementCheck</tabstop>
|
||
<tabstop>emptyBankIdCheck</tabstop>
|
||
<tabstop>investmentCheck</tabstop>
|
||
<tabstop>emptyFidCheck</tabstop>
|
||
<tabstop>billPayCheck</tabstop>
|
||
<tabstop>emptyBankIdCheck</tabstop>
|
||
<tabstop>sendShortDateCheck</tabstop>
|
||
<tabstop>emptyFidCheck</tabstop>
|
||
<tabstop>forceSsl3Check</tabstop>
|
||
<tabstop>appIdEdit</tabstop>
|
||
<tabstop>appVerEdit</tabstop>
|
||
<tabstop>headerVerEdit</tabstop>
|
||
<tabstop>clientUidEdit</tabstop>
|
||
</tabstops>
|
||
<layoutdefaults spacing="6" margin="11"/>
|
||
</UI>
|
Auch abrufbar als: Unified diff
Added handling of CLIENTUID and short dates.
Some servers require a shorter date specification, so this is now controlled
by a user flag.
The CLIENTUID is required by some servers. We currently don't know how to come by
this except by copying it from quicken requests.
git-svn-id: https://devel.aqbanking.de/svn/aqbanking/trunk@1603 5c42a225-8b10-0410-9873-89b7810ad06e