diff options
Diffstat (limited to 'plugins/Listener/catchcopy-v0002/listener.h')
-rw-r--r--[-rwxr-xr-x] | plugins/Listener/catchcopy-v0002/listener.h | 79 |
1 files changed, 38 insertions, 41 deletions
diff --git a/plugins/Listener/catchcopy-v0002/listener.h b/plugins/Listener/catchcopy-v0002/listener.h index 0ef0dc7..8956abc 100755..100644 --- a/plugins/Listener/catchcopy-v0002/listener.h +++ b/plugins/Listener/catchcopy-v0002/listener.h @@ -1,62 +1,59 @@ /** \file listener.h \brief Define the server compatible with Ultracopier interface \author alpha_one_x86 -\version 0.3 -\date 2010 */ +\licence GPL3, see the file COPYING */ #ifndef SERVER_H #define SERVER_H -#include <QObject> +#include <QString> +#ifndef ULTRACOPIER_PLUGIN_ALL_IN_ONE_DIRECT +#include <QtPlugin> +#endif #include "Environment.h" #include "../../../interface/PluginInterface_Listener.h" #include "catchcopy-api-0002/ServerCatchcopy.h" /// \brief Define the server compatible with Ultracopier interface -class CatchCopyPlugin : public PluginInterface_Listener +class Listener : public PluginInterface_Listener { - Q_OBJECT - Q_INTERFACES(PluginInterface_Listener) + Q_OBJECT + #ifndef ULTRACOPIER_PLUGIN_ALL_IN_ONE_DIRECT + Q_PLUGIN_METADATA(IID "first-world.info.ultracopier.PluginInterface.Listener/1.0.0.0" FILE "plugin.json") + Q_INTERFACES(PluginInterface_Listener) + #endif public: - CatchCopyPlugin(); - /// \brief try listen the copy/move - void listen(); - /// \brief stop listen to copy/move - void close(); - /// \brief return the error strong - const QString errorString(); - /// \brief set resources for this plugins - void setResources(OptionInterface * options,QString writePath,QString pluginPath,bool portableVersion); - /// \brief to get the options widget, NULL if not have - QWidget * options(); + Listener(); + /// \brief try listen the copy/move + void listen(); + /// \brief stop listen to copy/move + void close(); + /// \brief return the error strong + const QString errorString() const; + /// \brief set resources for this plugins + void setResources(OptionInterface * options,const QString &writePath,const QString &pluginPath,const bool &portableVersion); + /// \brief to get the options widget, NULL if not have + QWidget * options(); + /// \brief to get a client list + QStringList clientsList() const; public slots: - /// \brief say to the client that's the copy/move is finished - void transferFinished(quint32 orderId,bool withError); - /// \brief say to the client that's the copy/move is finished - void transferCanceled(quint32 orderId); - /// \brief to reload the translation, because the new language have been loaded - void newLanguageLoaded(); + /// \brief say to the client that's the copy/move is finished + void transferFinished(const quint32 &orderId,const bool &withError); + /// \brief say to the client that's the copy/move is finished + void transferCanceled(const quint32 &orderId); + /// \brief to reload the translation, because the new language have been loaded + void newLanguageLoaded(); private: - ServerCatchcopy server; + ServerCatchcopy server; private slots: - void error(QString error); - void clientName(quint32 client,QString name); -signals: - #ifdef ULTRACOPIER_PLUGIN_DEBUG - /// \brief To debug source - void debugInformation(DebugLevel level,QString fonction,QString text,QString file,int ligne); - #endif - /// \brief new state - void newState(ListeningState state); - /// \brief new copy is incoming - void newCopy(quint32 orderId,QStringList sources); - /// \brief new copy is incoming, with destination - void newCopy(quint32 orderId,QStringList sources,QString destination); - /// \brief new move is incoming - void newMove(quint32 orderId,QStringList sources); - /// \brief new move is incoming, with destination - void newMove(quint32 orderId,QStringList sources,QString destination); + void errorInternal(const QString &string); + void communicationErrorInternal(const QString &string); + void clientName(quint32 client,QString name); + void copyWithoutDestination(const quint32 &orderId,const QStringList &sources); + void copy(const quint32 &orderId,const QStringList &sources,const QString &destination); + void moveWithoutDestination(const quint32 &orderId,const QStringList &sources); + void move(const quint32 &orderId,const QStringList &sources,const QString &destination); }; #endif // SERVER_H |