summaryrefslogtreecommitdiffstats
path: root/kmymoney2/plugins/ofximport/ofxpartner.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-04 22:38:03 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-04 22:38:03 +0000
commitdadc34655c3ab961b0b0b94a10eaaba710f0b5e8 (patch)
tree99e72842fe687baea16376a147619b6048d7e441 /kmymoney2/plugins/ofximport/ofxpartner.h
downloadkmymoney-dadc34655c3ab961b0b0b94a10eaaba710f0b5e8.tar.gz
kmymoney-dadc34655c3ab961b0b0b94a10eaaba710f0b5e8.zip
Added kmymoney
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmymoney@1239792 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmymoney2/plugins/ofximport/ofxpartner.h')
-rw-r--r--kmymoney2/plugins/ofximport/ofxpartner.h102
1 files changed, 102 insertions, 0 deletions
diff --git a/kmymoney2/plugins/ofximport/ofxpartner.h b/kmymoney2/plugins/ofximport/ofxpartner.h
new file mode 100644
index 0000000..e624282
--- /dev/null
+++ b/kmymoney2/plugins/ofximport/ofxpartner.h
@@ -0,0 +1,102 @@
+/***************************************************************************
+ ofxpartner.h
+ ----------
+ begin : Fri Jan 23 2009
+ copyright : (C) 2009 by Thomas Baumgart
+ email : Thomas Baumgart <[email protected]>
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef OFXPARTNER_H
+#define OFXPARTNER_H
+
+// ----------------------------------------------------------------------------
+// QT Includes
+
+
+#include <qobject.h>
+#include <qhttp.h>
+
+// ----------------------------------------------------------------------------
+// KDE Includes
+
+#include <kurl.h>
+namespace KIO
+{
+ class Job;
+ class TransferJob;
+}
+
+// ----------------------------------------------------------------------------
+// Project Includes
+
+#include <libofx/libofx.h>
+
+namespace OfxPartner
+{
+ /**
+ * setup the directory where the files will be stored.
+ * @a dir must end with a '/' and must exist. Call this
+ * before any other of the functions of OfxPartner. The
+ * default will be to store the files in the current
+ * directory.
+ */
+ void setDirectory(const QString& dir);
+
+ void ValidateIndexCache(void);
+ OfxFiServiceInfo ServiceInfo(const QString& fipid);
+ QValueList<QString> BankNames(void);
+ QValueList<QString> FipidForBank(const QString& bank);
+
+}
+
+class OfxHttpRequest : public QObject
+{
+ Q_OBJECT
+public:
+ OfxHttpRequest(const QString& method, const KURL &url, const QByteArray &postData, const QMap<QString, QString>& metaData, const KURL& dst, bool showProgressInfo=true);
+ virtual ~OfxHttpRequest() {}
+
+ QHttp::Error error(void) const { return m_error; }
+
+protected slots:
+ void slotOfxFinished(int, bool);
+
+private:
+ QHttp* m_job;
+ KURL m_dst;
+ QHttp::Error m_error;
+
+};
+
+class OfxHttpsRequest : public QObject
+{
+Q_OBJECT
+public:
+ OfxHttpsRequest(const QString& method, const KURL &url, const QByteArray &postData, const QMap<QString, QString>& metaData, const KURL& dst, bool showProgressInfo=true);
+ virtual ~OfxHttpsRequest();
+
+ QHttp::Error error(void) const { return m_error; }
+
+protected slots:
+ void slotOfxFinished(KIO::Job*);
+ void slotOfxData(KIO::Job*,const QByteArray&);
+ void slotOfxConnected(KIO::Job*);
+
+private:
+ class Private;
+ Private* d;
+ KURL m_dst;
+ QFile m_file;
+ QHttp::Error m_error;
+ KIO::TransferJob* m_job;
+};
+#endif // OFXPARTNER_H