mymoneyofxconnector.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef MYMONEYOFXCONNECTOR_H
00019 #define MYMONEYOFXCONNECTOR_H
00020
00021 #ifdef HAVE_CONFIG_H
00022 #include "config.h"
00023 #endif
00024
00025
00026
00027
00028
00029 #include <libofx/libofx.h>
00030
00031
00032
00033 #ifdef LIBOFX_MAJOR_VERSION
00034 #define LIBOFX_VERSION KDE_MAKE_VERSION(LIBOFX_MAJOR_VERSION, LIBOFX_MINOR_VERSION, LIBOFX_MICRO_VERSION)
00035 #else
00036 #define LIBOFX_VERSION KDE_MAKE_VERSION(0,8,3)
00037 #endif
00038 #define LIBOFX_IS_VERSION(a,b,c) (LIBOFX_VERSION >= KDE_MAKE_VERSION(a,b,c))
00039
00040
00041
00042
00043 class QDate;
00044
00045
00046
00047 class KComboBox;
00048
00049
00050
00051
00052 #include <kmymoney/mymoneykeyvaluecontainer.h>
00053
00054 class MyMoneyAccount;
00055 class MyMoneyInstitution;
00056 class MyMoneyTransaction;
00057
00061 class OfxAppVersion
00062 {
00063 public:
00064 OfxAppVersion(KComboBox* combo, const QString& appId);
00071 const QString& appId(void) const;
00072
00073 private:
00074 QMap<QString, QString> m_appMap;
00075 KComboBox* m_combo;
00076 };
00077
00081 class OfxHeaderVersion
00082 {
00083 public:
00084 OfxHeaderVersion(KComboBox* combo, const QString& headerVersion);
00085 QString headerVersion(void) const;
00086
00087 private:
00088 KComboBox* m_combo;
00089 };
00090
00094 class MyMoneyOfxConnector
00095 {
00096 public:
00097 MyMoneyOfxConnector(const MyMoneyAccount& _account);
00098 QString url(void) const;
00099
00105 const QByteArray statementRequest(void) const;
00106 const QByteArray statementResponse(const QDate& _dtstart) const;
00107
00108 private:
00109 void initRequest(OfxFiLogin* fi) const;
00110 QDate statementStartDate(void) const;
00111 QString iban(void) const;
00112 QString fiorg(void) const;
00113 QString fiid(void) const;
00114 QString username(void) const;
00115 QString password(void) const;
00116 QString accountnum(void) const;
00117 #if LIBOFX_IS_VERSION(0,9,0)
00118 OfxAccountData::AccountType accounttype(void) const;
00119 #else
00120 AccountType accounttype(void) const;
00121 #endif
00122
00123 private:
00124 const MyMoneyAccount& m_account;
00125 MyMoneyKeyValueContainer m_fiSettings;
00126 };
00127
00128 #endif // OFXCONNECTOR_H