ktoblzcheck
1.52.0
|
Checking of German BLZ and account numbers. More...
#include <string>
#include <map>
#include <vector>
#include <ctime>
Go to the source code of this file.
Classes | |
class | AccountNumberCheck |
German bank information database and account code verification. More... | |
class | AccountNumberCheck::Record |
Available information about one bank. More... | |
Macros | |
#define | KTOBLZCHECK_VERSION_MAJOR 1 |
#define | KTOBLZCHECK_VERSION_MINOR 52 |
Typedefs | |
typedef AccountNumberCheck::Result | AccountNumberCheck_Result |
typedef AccountNumberCheck::Record | AccountNumberCheck_Record |
Checking of German BLZ and account numbers.
This file contains the classes and C wrappers for checking German BLZ (bank codes) and account numbers.
#define KTOBLZCHECK_VERSION_MAJOR 1 |
-*-c++-*-****************************************************************
This file is AUTO-GENERATED from ktoblzcheck.h.in! All changes here will be lost!
cvs : $Id$ begin : Sat Aug 10 2002 copyright : (C) 2002, 2003 by Fabian Kaiser and Christian Stimming email : fabia n@op enhbc i.de
*
This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. *
Introduced in ktoblzcheck-1.10.
#define KTOBLZCHECK_VERSION_MINOR 52 |
The minor version number of this library.
Introduced in ktoblzcheck-1.10.
unsigned int AccountNumberCheck_bankCount | ( | const AccountNumberCheck * | a | ) |
Returns the number of bank-records currently loaded.
char* AccountNumberCheck_bankdata_dir | ( | ) |
Returns the directory where the bankdata file is stored. The returned value is owned by the caller and must be free'd when no longer being used.
This function was introduced in ktoblzcheck-1.13.
AccountNumberCheck_Result AccountNumberCheck_check | ( | const AccountNumberCheck * | a, |
const char * | bankId, | ||
const char * | accountId | ||
) |
Check if bankId
and accountId
form a valid combination.
The returned value is simply an integer. The meanings of each integer values are defined in the AccountNumberCheck::Result enum, which is the following:
a | The AccountNumberCheck object |
bankId | The bank code (BLZ) of the bank to test |
accountId | The account id to check |
void AccountNumberCheck_createIndex | ( | AccountNumberCheck * | a | ) |
Generates an index over the bankIds.
Currently not implemented.
void AccountNumberCheck_delete | ( | AccountNumberCheck * | a | ) |
Destructor. All entries of the bank database are deleted as well.
const AccountNumberCheck_Record* AccountNumberCheck_findBank | ( | const AccountNumberCheck * | a, |
const char * | bankId | ||
) |
Find the info-record for a bank specified by bankId
or otherwise return NULL.
const char* AccountNumberCheck_libraryVersion | ( | ) |
Returns the value of ktoblzcheck's configuration variable VERSION as a string, which can be "1.6" or something similar.
This function was introduced in ktoblzcheck-1.7.
AccountNumberCheck* AccountNumberCheck_new | ( | ) |
Default Constructor.
This constructor also initializes the bank-database. The bank data is obtained from several files which are located in a directory looked up at run-time (with a fallback check for a compile-time path). Default is $prefix/share/ktoblzcheck (set in configure.in) where default for $prefix is /usr/local.
Inside the data directory, all bankdata files with a date in the filename are processed, according to the three-month validity periods, because each bankdata file is valid for three months. See README for a more detailed explanation.
AccountNumberCheck* AccountNumberCheck_new_file | ( | const char * | filename | ) |
Constructor that initialize the bank-database from a data file at filename
.
If the file could not be found, then the resulting AccountNumberCheck object simply has an empty bank database and a message is printed to stderr.
filename | The absolute location of the KTOBLZCheck-database |
unsigned long AccountNumberCheck_Record_bankId | ( | const AccountNumberCheck_Record * | a | ) |
Returns the id of the bank (german BLZ)
const char* AccountNumberCheck_Record_bankName | ( | const AccountNumberCheck_Record * | a | ) |
Returns the name of the bank as listed in the file of the Deutsche Bundesbank
AccountNumberCheck_Record* AccountNumberCheck_Record_copy | ( | const AccountNumberCheck_Record * | a | ) |
Copy constructor. The returned object will be owned by the caller and has to be deleted by the caller when no longer used. FIXME: Needs to be tested whether it works correctly – internally it uses the automatically synthetized copy constructor of the C++ compiler.
void AccountNumberCheck_Record_delete | ( | AccountNumberCheck_Record * | a | ) |
Destructor
const char* AccountNumberCheck_Record_location | ( | const AccountNumberCheck_Record * | a | ) |
Returns the city where the bank is located
const char* AccountNumberCheck_stringEncoding | ( | ) |
Returns the character encoding that is used when strings are returned. So far this has been "ISO-8859-15" (up to and including version ktoblzcheck-1.15) but at some point in the future it might change into "UTF-8".
To obtain the encoding string in your application in a form that is backward-compatible to all ktoblzcheck-versions, do the following:
const char *ktoblzcheck_encoding = #ifdef KTOBLZCHECK_VERSION_MAJOR AccountNumberCheck_stringEncoding() #else "ISO-8859-15" #endif ;
This function was introduced in ktoblzcheck-1.7.