Warning, file /office/kmymoney/kmymoney/plugins/onlinepluginextended.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002     This file is part of KMyMoney, A Personal Finance Manager f*or KDE
0003     SPDX-FileCopyrightText: 2014 Christian Dávid <christian-david@web.de>
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef ONLINEPLUGINEXTENDED_H
0008 #define ONLINEPLUGINEXTENDED_H
0009 
0010 #include "kmymoneyplugin.h"
0011 
0012 #include "mymoney/onlinejob.h"
0013 #include "onlinetasks/interfaces/tasks/ionlinetasksettings.h"
0014 
0015 class onlineJob;
0016 class onlineTask;
0017 class payeeIdentifierData;
0018 
0019 namespace KMyMoneyPlugin
0020 {
0021 
0022 /**
0023  * @brief Interface between KMyMoney and Online Banking plugins for executing transactions
0024  *
0025  * This interface is under active development and will change often! Do not use it at the moment!
0026  *
0027  * @author Christian David (christian-david@web.de)
0028  */
0029 class KMM_PLUGIN_EXPORT OnlinePluginExtended : public Plugin, public OnlinePlugin
0030 {
0031     Q_OBJECT
0032 
0033 public:
0034     OnlinePluginExtended(QObject* parent, const char* name);
0035     virtual ~OnlinePluginExtended() {}
0036 
0037     /**
0038      * @brief List onlineJobs supported by an account
0039      *
0040      * KMyMoney will use this function to ask the online plugin which online jobs it supports.
0041      * Later changes can be made public using the jobAvailable signals.
0042      *
0043      * @return A QStringList with supported onlineTask::name()s as values.
0044      */
0045     virtual QStringList availableJobs(QString accountId) = 0;
0046 
0047     /**
0048      * @brief Get settings for onlineTask
0049      *
0050      * @see onlineTask::settings
0051      */
0052     virtual IonlineTaskSettings::ptr settings(QString accountId, QString taskName) = 0;
0053 
0054     /**
0055      * @brief Send onlineJobs to bank
0056      *
0057      * @param jobs Do not delete the onlineJob objects. You can edit them but expect them to be deleted after
0058      * you returned from this function.
0059      */
0060     virtual void sendOnlineJob(QList<onlineJob>& jobs) = 0;
0061 
0062     virtual void plug() override = 0;
0063     virtual void unplug() override = 0;
0064 
0065 Q_SIGNALS:
0066     /**
0067      * @brief Emit to make onlineJob available
0068      *
0069      * In case a onlineJob got available during runtime, emit one of these signals.
0070      */
0071     void jobAvailable(QString accountId, QString);
0072     void jobAvailable(QString accountId, QStringList);
0073     void jobUnavailable(QString accountId, QString);
0074     //void jobUnavailable( QString accountId );
0075 };
0076 
0077 class KMM_PLUGIN_EXPORT onlineTaskFactory
0078 {
0079 public:
0080     virtual onlineTask* createOnlineTask(const QString& taskId) const = 0;
0081 
0082     // Make g++ happy
0083     virtual ~onlineTaskFactory() {}
0084 };
0085 
0086 class KMM_PLUGIN_EXPORT payeeIdentifierDataFactory
0087 {
0088 public:
0089     virtual payeeIdentifierData* createPayeeIdentifier(const QString& payeeIdentifierIid) const = 0;
0090     // Make g+ happy
0091     virtual ~payeeIdentifierDataFactory() {}
0092 };
0093 
0094 } // namespace KMyMoneyPlugin
0095 
0096 Q_DECLARE_INTERFACE(KMyMoneyPlugin::OnlinePluginExtended, "org.kmymoney.plugin.onlinepluginextended");
0097 Q_DECLARE_INTERFACE(KMyMoneyPlugin::onlineTaskFactory, "org.kmymoney.plugin.onlinetaskfactory");
0098 Q_DECLARE_INTERFACE(KMyMoneyPlugin::payeeIdentifierDataFactory, "org.kmymoney.plugin.payeeidentifierfactory");
0099 
0100 #endif // ONLINEPLUGINEXTENDED_H