ofxpartner.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                              ofxpartner.h
00003                              ----------
00004     begin                : Fri Jan 23 2009
00005     copyright            : (C) 2009 by Thomas Baumgart
00006     email                : Thomas Baumgart <ipwizard@users.sourceforge.net>
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef OFXPARTNER_H
00019 #define OFXPARTNER_H
00020 
00021 // ----------------------------------------------------------------------------
00022 // QT Includes
00023 
00024 
00025 #include <qobject.h>
00026 #include <qhttp.h>
00027 
00028 // ----------------------------------------------------------------------------
00029 // KDE Includes
00030 
00031 #include <kurl.h>
00032 namespace KIO
00033 {
00034   class Job;
00035   class TransferJob;
00036 }
00037 
00038 // ----------------------------------------------------------------------------
00039 // Project Includes
00040 
00041 #include <libofx/libofx.h>
00042 
00043 namespace OfxPartner
00044 {
00052   void setDirectory(const QString& dir);
00053 
00054   void ValidateIndexCache(void);
00055   OfxFiServiceInfo ServiceInfo(const QString& fipid);
00056   QValueList<QString> BankNames(void);
00057   QValueList<QString> FipidForBank(const QString& bank);
00058 
00059 }
00060 
00061 class OfxHttpRequest : public QObject
00062 {
00063   Q_OBJECT
00064 public:
00065   OfxHttpRequest(const QString& method, const KURL &url, const QByteArray &postData, const QMap<QString, QString>& metaData, const KURL& dst, bool showProgressInfo=true);
00066   virtual ~OfxHttpRequest() {}
00067 
00068   QHttp::Error error(void) const { return m_error; }
00069 
00070 protected slots:
00071   void slotOfxFinished(int, bool);
00072 
00073 private:
00074   QHttp*          m_job;
00075   KURL          m_dst;
00076   QHttp::Error  m_error;
00077 
00078 };
00079 
00080 class OfxHttpsRequest : public QObject
00081 {
00082 Q_OBJECT
00083 public:
00084   OfxHttpsRequest(const QString& method, const KURL &url, const QByteArray &postData, const QMap<QString, QString>& metaData, const KURL& dst, bool showProgressInfo=true);
00085   virtual ~OfxHttpsRequest();
00086 
00087   QHttp::Error error(void) const { return m_error; }
00088 
00089 protected slots:
00090   void slotOfxFinished(KIO::Job*);
00091   void slotOfxData(KIO::Job*,const QByteArray&);
00092   void slotOfxConnected(KIO::Job*);
00093 
00094 private:
00095   class Private;
00096   Private*          d;
00097   KURL              m_dst;
00098   QFile             m_file;
00099   QHttp::Error      m_error;
00100   KIO::TransferJob* m_job;
00101 };
00102 #endif // OFXPARTNER_H

Generated on Wed Jan 26 13:03:18 2011 for KMyMoney by  doxygen 1.5.6