本文整理汇总了C++中GWEN_DB_GetCharValue函数的典型用法代码示例。如果您正苦于以下问题:C++ GWEN_DB_GetCharValue函数的具体用法?C++ GWEN_DB_GetCharValue怎么用?C++ GWEN_DB_GetCharValue使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GWEN_DB_GetCharValue函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: gnc_hbci_printresult
/* Prints all results that can be found in the outbox into the interactor */
static void gnc_hbci_printresult(HBCI_Outbox *outbox, GNCInteractor *inter)
{
/* Got no sysid. */
GWEN_DB_NODE *rsp, *n;
g_assert(outbox);
if (!inter)
return;
rsp = HBCI_Outbox_response(outbox);
n = GWEN_DB_GetFirstGroup(rsp);
while (n)
{
if (strcasecmp(GWEN_DB_GroupName(n), "msgresult") == 0)
{
GWEN_DB_NODE *r = GWEN_DB_GetFirstGroup(n);
while (r)
{
if (strcasecmp(GWEN_DB_GroupName(r), "result") == 0)
{
gchar *logtext;
int resultcode;
const char *text, *elementref, *param;
resultcode = GWEN_DB_GetIntValue(r, "resultcode", 0, 0);
text = GWEN_DB_GetCharValue(r, "text", 0, "Response without text");
elementref = GWEN_DB_GetCharValue(r, "elementref", 0, "");
param = GWEN_DB_GetCharValue(r, "param", 0, "");
if (strlen(elementref) > 0 || strlen(param) > 0)
logtext = g_strdup_printf("%s (%d; Elementref %s; Param %s)", text,
resultcode, elementref, param);
else
logtext = g_strdup_printf("%s (%d)", text, resultcode);
GNCInteractor_add_log_text(inter, logtext);
g_free(logtext);
}
r = GWEN_DB_GetNextGroup(r);
}
}
else if (strcasecmp(GWEN_DB_GroupName(n), "segresult") == 0)
{
GWEN_DB_NODE *r = GWEN_DB_GetFirstGroup(n);
while (r)
{
if (strcasecmp(GWEN_DB_GroupName(r), "result") == 0)
{
}
r = GWEN_DB_GetNextGroup(r);
}
}
n = GWEN_DB_GetNextGroup(n);
} /* while */
GWEN_DB_Group_free(rsp);
}
示例2: LC_Client_GetReaderAndDriverType
int LC_Client_GetReaderAndDriverType(const LC_CLIENT *cl,
const char *readerName,
GWEN_BUFFER *driverType,
GWEN_BUFFER *readerType,
uint32_t *pReaderFlags) {
GWEN_DB_NODE *dbDriver;
dbDriver=GWEN_DB_FindFirstGroup(lc_client__driver_db, "driver");
while(dbDriver) {
const char *sDriverName;
sDriverName=GWEN_DB_GetCharValue(dbDriver, "driverName", 0, NULL);
if (sDriverName) {
GWEN_DB_NODE *dbReader;
dbReader=GWEN_DB_FindFirstGroup(dbDriver, "reader");
while(dbReader) {
const char *sReaderName;
const char *sTmpl;
sReaderName=GWEN_DB_GetCharValue(dbReader, "readerType", 0, NULL);
sTmpl=GWEN_DB_GetCharValue(dbReader, "devicePathTmpl", 0, NULL);
if (sReaderName && sTmpl) {
if (-1!=GWEN_Text_ComparePattern(readerName, sTmpl, 1)) {
/* reader found */
GWEN_Buffer_AppendString(driverType, sDriverName);
GWEN_Buffer_AppendString(readerType, sReaderName);
*pReaderFlags=LC_ReaderFlags_fromDb(dbReader, "flags");
DBG_INFO(LC_LOGDOMAIN,
"Reader [%s] is [%s]/[%s], %08x",
readerName,
sDriverName, sReaderName, *pReaderFlags);
return 0;
}
}
else {
DBG_INFO(LC_LOGDOMAIN,
"Either reader name or template missing");
}
dbReader=GWEN_DB_FindNextGroup(dbReader, "reader");
}
}
else {
DBG_INFO(LC_LOGDOMAIN,
"Driver name is missing");
}
dbDriver=GWEN_DB_FindNextGroup(dbDriver, "driver");
}
return GWEN_ERROR_NOT_FOUND;
}
示例3: assert
GWEN_CRYPT_PADDALGO *GWEN_Crypt_PaddAlgo_fromDb(GWEN_DB_NODE *db)
{
const char *s;
assert(db);
s=GWEN_DB_GetCharValue(db, "id", 0, NULL);
if (s) {
GWEN_CRYPT_PADDALGO *a;
GWEN_CRYPT_PADDALGOID id;
id=GWEN_Crypt_PaddAlgoId_fromString(s);
if (id==GWEN_Crypt_PaddAlgoId_Unknown) {
DBG_INFO(GWEN_LOGDOMAIN, "Unknown paddalgo id [%s]", s);
return NULL;
}
a=GWEN_Crypt_PaddAlgo_new(id);
assert(a);
a->paddSize=GWEN_DB_GetIntValue(db, "paddSize", 0, 0);
return a;
}
else {
DBG_INFO(GWEN_LOGDOMAIN, "Missing paddalgo id");
return NULL;
}
}
示例4: LC_DriverFlags_fromDb
uint32_t LC_DriverFlags_fromDb(GWEN_DB_NODE *db, const char *name) {
const char *p;
int i;
uint32_t flags=0;
for (i=0; ; i++) {
p=GWEN_DB_GetCharValue(db, name, i, 0);
if (!p)
break;
if (strcasecmp(p, "auto")==0)
flags|=LC_DRIVER_FLAGS_AUTO;
else if (strcasecmp(p, "remote")==0)
flags|=LC_DRIVER_FLAGS_REMOTE;
else if (strcasecmp(p, "has_verify_fn")==0)
flags|=LC_DRIVER_FLAGS_HAS_VERIFY_FN;
else if (strcasecmp(p, "has_modify_fn")==0)
flags|=LC_DRIVER_FLAGS_HAS_MODIFY_FN;
else if (strcasecmp(p, "config")==0)
flags|=LC_DRIVER_FLAGS_CONFIG;
else {
DBG_WARN(0, "Unknown driver flag \"%s\"", p);
}
}
return flags;
}
示例5: AH_Job_SepaStandingOrdersGet_Process
/* --------------------------------------------------------------- FUNCTION */
int AH_Job_SepaStandingOrdersGet_Process(AH_JOB *j, AB_IMEXPORTER_CONTEXT *ctx){
GWEN_DB_NODE *dbResponses;
GWEN_DB_NODE *dbCurr;
const char *responseName;
int rv;
DBG_INFO(AQHBCI_LOGDOMAIN, "Processing JobSepaStandingOrdersGet");
assert(j);
responseName=AH_Job_GetResponseName(j);
dbResponses=AH_Job_GetResponses(j);
assert(dbResponses);
/* search for "Transactions" */
dbCurr=GWEN_DB_GetFirstGroup(dbResponses);
while(dbCurr) {
rv=AH_Job_CheckEncryption(j, dbCurr);
if (rv) {
DBG_INFO(AQHBCI_LOGDOMAIN, "Compromised security (encryption)");
AH_Job_SetStatus(j, AH_JobStatusError);
return rv;
}
rv=AH_Job_CheckSignature(j, dbCurr);
if (rv) {
DBG_INFO(AQHBCI_LOGDOMAIN, "Compromised security (signature)");
AH_Job_SetStatus(j, AH_JobStatusError);
return rv;
}
if (responseName && *responseName) {
GWEN_DB_NODE *dbXA;
dbXA=GWEN_DB_GetGroup(dbCurr, GWEN_PATH_FLAGS_NAMEMUSTEXIST, "data");
if (dbXA)
dbXA=GWEN_DB_GetGroup(dbXA, GWEN_PATH_FLAGS_NAMEMUSTEXIST, responseName);
if (dbXA) {
const void *p;
unsigned int bs;
const char *fiId;
fiId=GWEN_DB_GetCharValue(dbXA, "fiId", 0, NULL);
p=GWEN_DB_GetBinValue(dbXA, "transfer", 0, 0, 0, &bs);
if (p && bs) {
rv=AH_Job_SepaStandingOrdersGet__ReadSto(j, ctx, p, bs, fiId);
if (rv<0) {
DBG_INFO(AQHBCI_LOGDOMAIN, "here (%d)", rv);
DBG_WARN(AQHBCI_LOGDOMAIN, "Error reading standing order from data, ignoring (%d)", rv);
}
}
}
}
dbCurr=GWEN_DB_GetNextGroup(dbCurr);
}
return 0;
}
示例6: AH_Job_SepaStandingOrderGet_Prepare
/* --------------------------------------------------------------- FUNCTION */
int AH_Job_SepaStandingOrderGet_Prepare(AH_JOB *j) {
GWEN_DB_NODE *dbArgs;
GWEN_DB_NODE *profile;
DBG_INFO(AQHBCI_LOGDOMAIN, "Preparing job");
dbArgs=AH_Job_GetArguments(j);
/* find the right profile to produce pain.001 messages */
profile=AH_Job_FindSepaProfile(j, "001*", AH_User_GetSepaTransferProfile(AH_Job_GetUser(j)));
if (!profile) {
DBG_ERROR(AQHBCI_LOGDOMAIN, "No suitable profile found");
return GWEN_ERROR_GENERIC;
}
else {
const char *s;
s=GWEN_DB_GetCharValue(profile, "descriptor", 0, 0);
if (s) {
GWEN_DB_SetCharValue(dbArgs,
GWEN_DB_FLAGS_OVERWRITE_VARS,
"SupportedSepaFormats/Format",
s);
}
else {
DBG_ERROR(AQHBCI_LOGDOMAIN, "No matching SEPA descriptor found");
return GWEN_ERROR_GENERIC;
}
}
return 0;
}
示例7: GWEN_PathManager_FindFile
int GWEN_PathManager_FindFile(const char *destLib,
const char *pathName,
const char *fileName,
GWEN_BUFFER *fbuf) {
GWEN_DB_NODE *dbT;
assert(gwen__paths);
dbT=GWEN_DB_GetGroup(gwen__paths, GWEN_PATH_FLAGS_NAMEMUSTEXIST,
destLib);
if (dbT) {
dbT=GWEN_DB_GetGroup(dbT, GWEN_PATH_FLAGS_NAMEMUSTEXIST,
pathName);
if (dbT) {
int i;
const char *s;
GWEN_DB_NODE *dbN;
GWEN_BUFFER *tbuf;
tbuf=GWEN_Buffer_new(0, 256, 0, 1);
/* check all paths */
dbN=GWEN_DB_FindFirstGroup(dbT, "pair");
while(dbN) {
for (i=0; ; i++) {
s=GWEN_DB_GetCharValue(dbN, "path", i, 0);
if (!s)
break;
else {
FILE *f;
GWEN_Buffer_AppendString(tbuf, s);
GWEN_Buffer_AppendString(tbuf, GWEN_DIR_SEPARATOR_S);
GWEN_Buffer_AppendString(tbuf, fileName);
DBG_DEBUG(GWEN_LOGDOMAIN, "Trying \"%s\"",
GWEN_Buffer_GetStart(tbuf));
f=fopen(GWEN_Buffer_GetStart(tbuf), "r");
if (f) {
fclose(f);
DBG_DEBUG(GWEN_LOGDOMAIN,
"File \"%s\" found in folder \"%s\"",
fileName,
s);
GWEN_Buffer_AppendBuffer(fbuf, tbuf);
GWEN_Buffer_free(tbuf);
return 0;
}
GWEN_Buffer_Reset(tbuf);
}
}
dbN=GWEN_DB_FindNextGroup(dbN, "pair");
}
GWEN_Buffer_free(tbuf);
}
}
DBG_INFO(GWEN_LOGDOMAIN, "File \"%s\" not found", fileName);
return GWEN_ERROR_NOT_FOUND;
}
示例8: GWEN_DBIO_XmlDb_Import
int GWEN_DBIO_XmlDb_Import(GWEN_DBIO *dbio,
GWEN_SYNCIO *sio,
GWEN_DB_NODE *data,
GWEN_DB_NODE *cfg,
uint32_t flags) {
int rv;
GWEN_XMLNODE *root;
GWEN_XMLNODE *n;
const char *rootName=0;
GWEN_XML_CONTEXT *ctx;
assert(data);
if (cfg)
rootName=GWEN_DB_GetCharValue(cfg, "rootElement", 0, 0);
root=GWEN_XMLNode_new(GWEN_XMLNodeTypeTag, "root");
ctx=GWEN_XmlCtxStore_new(root,
GWEN_XML_FLAGS_DEFAULT |
GWEN_XML_FLAGS_HANDLE_HEADERS);
rv=GWEN_XMLContext_ReadFromIo(ctx, sio);
if (rv) {
DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv);
GWEN_XmlCtx_free(ctx);
GWEN_XMLNode_free(root);
return rv;
}
GWEN_XmlCtx_free(ctx);
if (rootName) {
n=GWEN_XMLNode_FindFirstTag(root, rootName, 0, 0);
if (!n) {
DBG_ERROR(GWEN_LOGDOMAIN,
"Root node in XML file is not \"%s\"", rootName);
GWEN_XMLNode_free(root);
return GWEN_ERROR_BAD_DATA;
}
}
else {
n=GWEN_XMLNode_GetFirstTag(root);
if (!n) {
DBG_ERROR(GWEN_LOGDOMAIN,
"No root node in XML file");
GWEN_XMLNode_free(root);
return GWEN_ERROR_BAD_DATA;
}
}
rv=GWEN_DBIO__XmlDb_ImportGroup(dbio, flags, data, cfg, n);
if (rv) {
DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv);
GWEN_XMLNode_free(root);
return rv;
}
GWEN_XMLNode_free(root);
return 0;
}
示例9: AH_User_LoadSepaDescriptors
void AH_User_LoadSepaDescriptors(AB_USER *u) {
AH_USER *ue;
GWEN_DB_NODE *db;
int rv;
assert(u);
ue=GWEN_INHERIT_GETDATA(AB_USER, AH_USER, u);
assert(ue);
/* read directly from BPD */
GWEN_StringList_Clear(ue->sepaDescriptors);
db=GWEN_DB_Group_new("bpd");
rv=AH_Job_SampleBpdVersions("JobGetAccountSepaInfo", u, db);
if (rv<0) {
DBG_INFO(AQHBCI_LOGDOMAIN, "No BPD for TAN job");
}
else {
GWEN_DB_NODE *dbV;
dbV=GWEN_DB_GetFirstGroup(db);
while(dbV) {
int version;
version=atoi(GWEN_DB_GroupName(dbV));
if (version>0) {
GWEN_DB_NODE *dbT;
/* always overwrite with latest version received */
GWEN_StringList_Clear(ue->sepaDescriptors);
dbT=GWEN_DB_FindFirstGroup(dbV, "SupportedSepaFormats");
if (!dbT) {
DBG_INFO(AQHBCI_LOGDOMAIN, "No SEPA descriptor found");
}
while(dbT) {
int i;
for (i=0; i<100; i++) {
const char *s;
s=GWEN_DB_GetCharValue(dbT, "format", i, NULL);
if (! (s && *s))
break;
GWEN_StringList_AppendString(ue->sepaDescriptors, s, 0, 1);
DBG_INFO(AQHBCI_LOGDOMAIN,
"Adding SEPA descriptor [%s] for GV version %d",
s, version);
}
dbT=GWEN_DB_FindNextGroup(dbT, "SupportedSepaFormats");
}
}
dbV=GWEN_DB_GetNextGroup(dbV);
}
}
GWEN_DB_Group_free(db);
}
示例10:
AB_VALUE *AB_Value_fromDb(GWEN_DB_NODE *db){
AB_VALUE *vc;
const char *p;
/* read and parse value */
p=GWEN_DB_GetCharValue(db, "value", 0, 0);
if (!p)
return NULL;
vc=AB_Value_fromString(p);
if (vc==NULL)
return NULL;
/* read currency (if any) */
p=GWEN_DB_GetCharValue(db, "currency", 0, "EUR");
if (p)
AB_Value_SetCurrency(vc, p);
return vc;
}
示例11: GWEN_PathManager_RemovePath
int GWEN_PathManager_RemovePath(const char *callingLib,
const char *destLib,
const char *pathName,
const char *pathValue) {
GWEN_DB_NODE *dbT;
const char *s;
const char *p;
assert(gwen__paths);
dbT=GWEN_DB_GetGroup(gwen__paths, GWEN_PATH_FLAGS_NAMEMUSTEXIST,
destLib);
if (!dbT)
return GWEN_ERROR_NOT_FOUND;
dbT=GWEN_DB_GetGroup(dbT, GWEN_PATH_FLAGS_NAMEMUSTEXIST,
pathName);
if (!dbT)
return GWEN_ERROR_NOT_FOUND;
dbT=GWEN_DB_FindFirstGroup(dbT, "pair");
while(dbT) {
p=GWEN_DB_GetCharValue(dbT, "path", 0, 0);
assert(p);
s=GWEN_DB_GetCharValue(dbT, "lib", 0, 0);
if (
(
(!callingLib && !s) ||
(callingLib && s && strcasecmp(s, callingLib)==0)
) &&
strcasecmp(p, pathValue)==0
)
break;
dbT=GWEN_DB_FindNextGroup(dbT, "pair");
}
if (dbT) {
GWEN_DB_UnlinkGroup(dbT);
GWEN_DB_Group_free(dbT);
return 0;
}
else
return 1;
}
示例12: while
/* --------------------------------------------------------------- FUNCTION */
AH_JOB *AH_Job_GetTransactions_new(AB_PROVIDER *pro, AB_USER *u, AB_ACCOUNT *account)
{
AH_JOB *j;
AH_JOB_GETTRANSACTIONS *aj;
GWEN_DB_NODE *dbArgs;
GWEN_DB_NODE *updgroup;
int useCreditCardJob = 0;
//Check if we should use DKKKU
updgroup=AH_User_GetUpdForAccount(u, account);
if (updgroup) {
GWEN_DB_NODE *n;
n=GWEN_DB_GetFirstGroup(updgroup);
while (n) {
if (strcasecmp(GWEN_DB_GetCharValue(n, "job", 0, ""), "DKKKU")==0) {
useCreditCardJob = 1;
break;
}
n=GWEN_DB_GetNextGroup(n);
} /* while */
} /* if updgroup for the given account found */
if (useCreditCardJob)
j=AH_AccountJob_new("JobGetTransactionsCreditCard", pro, u, account);
else
j=AH_AccountJob_new("JobGetTransactions", pro, u, account);
if (!j)
return 0;
GWEN_NEW_OBJECT(AH_JOB_GETTRANSACTIONS, aj);
GWEN_INHERIT_SETDATA(AH_JOB, AH_JOB_GETTRANSACTIONS, j, aj, AH_Job_GetTransactions_FreeData);
AH_Job_SetSupportedCommand(j, AB_Transaction_CommandGetTransactions);
/* overwrite some virtual functions */
if (useCreditCardJob)
AH_Job_SetProcessFn(j, AH_Job_GetTransactionsCreditCard_Process);
else
AH_Job_SetProcessFn(j, AH_Job_GetTransactions_Process);
AH_Job_SetGetLimitsFn(j, AH_Job_GetTransactions_GetLimits);
AH_Job_SetHandleCommandFn(j, AH_Job_GetTransactions_HandleCommand);
AH_Job_SetHandleResultsFn(j, AH_Job_HandleResults_Empty);
/* set some known arguments */
dbArgs=AH_Job_GetArguments(j);
assert(dbArgs);
if (useCreditCardJob)
GWEN_DB_SetCharValue(dbArgs, GWEN_DB_FLAGS_DEFAULT,
"accountNumber", AB_Account_GetAccountNumber(account));
else
GWEN_DB_SetCharValue(dbArgs, GWEN_DB_FLAGS_DEFAULT,
"allAccounts", "N");
return j;
}
示例13: AB_ImExporterContext_ReadDb
int AB_ImExporterContext_ReadDb(AB_IMEXPORTER_CONTEXT *iec,
GWEN_DB_NODE *db) {
GWEN_DB_NODE *dbT;
int i;
dbT=GWEN_DB_GetGroup(db, GWEN_PATH_FLAGS_NAMEMUSTEXIST,
"accountInfoList");
if (dbT) {
dbT=GWEN_DB_FindFirstGroup(dbT, "accountInfo");
while(dbT) {
AB_IMEXPORTER_ACCOUNTINFO *iea;
iea=AB_ImExporterAccountInfo_fromDb(dbT);
assert(iea);
AB_ImExporterAccountInfo_List_Add(iea, iec->accountInfoList);
dbT=GWEN_DB_FindNextGroup(dbT, "accountInfo");
}
}
dbT=GWEN_DB_GetGroup(db, GWEN_PATH_FLAGS_NAMEMUSTEXIST,
"securityList");
if (dbT) {
dbT=GWEN_DB_FindFirstGroup(dbT, "security");
while(dbT) {
AB_SECURITY *sec;
sec=AB_Security_fromDb(dbT);
assert(sec);
AB_Security_List_Add(sec, iec->securityList);
dbT=GWEN_DB_FindNextGroup(dbT, "security");
}
}
dbT=GWEN_DB_GetGroup(db, GWEN_PATH_FLAGS_NAMEMUSTEXIST,
"messageList");
if (dbT) {
dbT=GWEN_DB_FindFirstGroup(dbT, "message");
while(dbT) {
AB_MESSAGE *msg;
msg=AB_Message_fromDb(dbT);
assert(msg);
AB_Message_List_Add(msg, iec->messageList);
dbT=GWEN_DB_FindNextGroup(dbT, "message");
}
}
for (i=0; ; i++) {
const char *s;
s=GWEN_DB_GetCharValue(db, "logs", i, NULL);
if (!s)
break;
GWEN_Buffer_AppendString(iec->logs, s);
}
return 0;
}
示例14: GWEN_PathManager_GetMatchingFilesRecursively
int GWEN_PathManager_GetMatchingFilesRecursively(const char *destLib,
const char *pathName,
const char *subFolderName,
GWEN_STRINGLIST *sl,
const char *mask) {
GWEN_DB_NODE *dbT;
assert(gwen__paths);
dbT=GWEN_DB_GetGroup(gwen__paths, GWEN_PATH_FLAGS_NAMEMUSTEXIST,
destLib);
if (dbT) {
dbT=GWEN_DB_GetGroup(dbT, GWEN_PATH_FLAGS_NAMEMUSTEXIST,
pathName);
if (dbT) {
int i;
const char *s;
GWEN_DB_NODE *dbN;
GWEN_BUFFER *tbuf;
tbuf=GWEN_Buffer_new(0, 256, 0, 1);
/* check all paths */
dbN=GWEN_DB_FindFirstGroup(dbT, "pair");
while(dbN) {
for (i=0; ; i++) {
s=GWEN_DB_GetCharValue(dbN, "path", i, 0);
if (!s)
break;
else {
GWEN_Buffer_AppendString(tbuf, s);
if (subFolderName && *subFolderName) {
GWEN_Buffer_AppendString(tbuf, GWEN_DIR_SEPARATOR_S);
GWEN_Buffer_AppendString(tbuf, subFolderName);
}
DBG_DEBUG(GWEN_LOGDOMAIN, "Trying \"%s\"",
GWEN_Buffer_GetStart(tbuf));
GWEN_Directory_GetMatchingFilesRecursively(GWEN_Buffer_GetStart(tbuf), sl, mask);
GWEN_Buffer_Reset(tbuf);
}
}
dbN=GWEN_DB_FindNextGroup(dbN, "pair");
}
GWEN_Buffer_free(tbuf);
}
}
return 0;
}
示例15: while
/* --------------------------------------------------------------- FUNCTION */
AH_JOB *AH_Job_GetBalance_new(AB_USER *u, AB_ACCOUNT *account) {
AH_JOB *j;
AH_JOB_GETBALANCE *aj;
GWEN_DB_NODE *dbArgs;
int useCreditCardJob=0;
GWEN_DB_NODE *updgroup;
//Check if we should use DKKKS
updgroup=AH_User_GetUpdForAccount(u, account);
if (updgroup) {
GWEN_DB_NODE *n;
n=GWEN_DB_GetFirstGroup(updgroup);
while(n) {
if (strcasecmp(GWEN_DB_GetCharValue(n, "job", 0, ""),
"DKKKS")==0) {
useCreditCardJob = 1;
break;
}
n=GWEN_DB_GetNextGroup(n);
} /* while */
} /* if updgroup for the given account found */
if(useCreditCardJob)
j=AH_AccountJob_new("JobGetBalanceCreditCard", u, account);
else
j=AH_AccountJob_new("JobGetBalance", u, account);
if (!j)
return 0;
GWEN_NEW_OBJECT(AH_JOB_GETBALANCE, aj);
GWEN_INHERIT_SETDATA(AH_JOB, AH_JOB_GETBALANCE, j, aj, AH_Job_GetBalance_FreeData);
/* overwrite some virtual functions */
AH_Job_SetProcessFn(j, AH_Job_GetBalance_Process);
AH_Job_SetExchangeFn(j, AH_Job_GetBalance_Exchange);
/* set some known arguments */
dbArgs=AH_Job_GetArguments(j);
assert(dbArgs);
if(useCreditCardJob)
GWEN_DB_SetCharValue(dbArgs, GWEN_DB_FLAGS_DEFAULT,
"accountNumber", AB_Account_GetAccountNumber(account));
else
GWEN_DB_SetCharValue(dbArgs, GWEN_DB_FLAGS_DEFAULT,
"allAccounts", "N");
return j;
}