summaryrefslogtreecommitdiff
path: root/plugins/Listener/catchcopy-v0002/listener.h
diff options
context:
space:
mode:
authorThomas Preud'homme <robotux@celest.fr>2013-01-04 14:50:19 +0100
committerThomas Preud'homme <robotux@celest.fr>2013-01-04 14:50:19 +0100
commit8f9f382e1c97cab2e72e97495650c73ac4b97314 (patch)
tree78510a0d81368c09b56f444fb19bb132c8bc3009 /plugins/Listener/catchcopy-v0002/listener.h
Imported Upstream version 0.3.0.5
Diffstat (limited to 'plugins/Listener/catchcopy-v0002/listener.h')
-rwxr-xr-xplugins/Listener/catchcopy-v0002/listener.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/plugins/Listener/catchcopy-v0002/listener.h b/plugins/Listener/catchcopy-v0002/listener.h
new file mode 100755
index 0000000..9eca405
--- /dev/null
+++ b/plugins/Listener/catchcopy-v0002/listener.h
@@ -0,0 +1,58 @@
+/** \file listener.h
+\brief Define the server compatible with Ultracopier interface
+\author alpha_one_x86
+\version 0.3
+\date 2010 */
+
+#ifndef SERVER_H
+#define SERVER_H
+
+#include <QObject>
+
+#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
+{
+ Q_OBJECT
+ Q_INTERFACES(PluginInterface_Listener)
+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);
+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);
+private:
+ 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);
+};
+
+#endif // SERVER_H