diff options
Diffstat (limited to 'plugins-alternative/Listener/dbus')
-rw-r--r-- | plugins-alternative/Listener/dbus/Catchcopy.cpp | 17 | ||||
-rw-r--r-- | plugins-alternative/Listener/dbus/Catchcopy.h | 20 | ||||
-rw-r--r-- | plugins-alternative/Listener/dbus/DebugEngineMacro.h | 28 | ||||
-rw-r--r-- | plugins-alternative/Listener/dbus/Environment.h | 10 | ||||
-rw-r--r-- | plugins-alternative/Listener/dbus/StructEnumDefinition.h | 1 | ||||
-rw-r--r-- | plugins-alternative/Listener/dbus/Variable.h | 15 | ||||
-rw-r--r-- | plugins-alternative/Listener/dbus/documentation.dox | 36 | ||||
-rw-r--r-- | plugins-alternative/Listener/dbus/informations.xml | 26 | ||||
-rw-r--r-- | plugins-alternative/Listener/dbus/listener.cpp | 85 | ||||
-rw-r--r-- | plugins-alternative/Listener/dbus/listener.h | 49 | ||||
-rw-r--r-- | plugins-alternative/Listener/dbus/listener.pro | 19 | ||||
-rw-r--r-- | plugins-alternative/Listener/dbus/plugin.json | 1 |
12 files changed, 0 insertions, 307 deletions
diff --git a/plugins-alternative/Listener/dbus/Catchcopy.cpp b/plugins-alternative/Listener/dbus/Catchcopy.cpp deleted file mode 100644 index 6c46af2..0000000 --- a/plugins-alternative/Listener/dbus/Catchcopy.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include "Catchcopy.h" - -#include <QCoreApplication> - -Catchcopy::Catchcopy() -{ -} - -void Catchcopy::copy(const QStringList &sources,const QString &destination) -{ - emit newCopy(0,sources,destination); -} - -void Catchcopy::move(const QStringList &sources,const QString &destination) -{ - emit newMove(0,sources,destination); -} diff --git a/plugins-alternative/Listener/dbus/Catchcopy.h b/plugins-alternative/Listener/dbus/Catchcopy.h deleted file mode 100644 index d28a253..0000000 --- a/plugins-alternative/Listener/dbus/Catchcopy.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef CATCHCOPY_H -#define CATCHCOPY_H - -#include <QObject> -#include <QStringList> - -class Catchcopy : public QObject -{ - Q_OBJECT -public: - explicit Catchcopy(); -signals: - void newCopy(const quint32 &id,const QStringList &sources,const QString &destination); - void newMove(const quint32 &id,const QStringList &sources,const QString &destination); -public slots: - Q_SCRIPTABLE void copy(const QStringList &sources,const QString &destination); - Q_SCRIPTABLE void move(const QStringList &sources,const QString &destination); -}; - -#endif // CATCHCOPY_H diff --git a/plugins-alternative/Listener/dbus/DebugEngineMacro.h b/plugins-alternative/Listener/dbus/DebugEngineMacro.h deleted file mode 100644 index 4582010..0000000 --- a/plugins-alternative/Listener/dbus/DebugEngineMacro.h +++ /dev/null @@ -1,28 +0,0 @@ -/** \file DebugEngineMacro.h -\brief Define the macro for the debug -\author alpha_one_x86 -\licence GPL3, see the file COPYING */ - -#ifndef DEBUGENGINEMACRO_H -#define DEBUGENGINEMACRO_H - -#ifdef WIN32 -# define __func__ __FUNCTION__ -#endif - -/// \brief Macro for the debug log -#ifdef ULTRACOPIER_PLUGIN_DEBUG - #if defined (__FILE__) && defined (__LINE__) - #define ULTRACOPIER_DEBUGCONSOLE(a,b) emit debugInformation(a,__func__,b,__FILE__,__LINE__) - #else - #define ULTRACOPIER_DEBUGCONSOLE(a,b) emit debugInformation(a,__func__,b) - #endif -#else // ULTRACOPIER_DEBUG - #define ULTRACOPIER_DEBUGCONSOLE(a,b) void() -#endif // ULTRACOPIER_DEBUG - -#endif // DEBUGENGINEMACRO_H - - - - diff --git a/plugins-alternative/Listener/dbus/Environment.h b/plugins-alternative/Listener/dbus/Environment.h deleted file mode 100644 index 265a5a6..0000000 --- a/plugins-alternative/Listener/dbus/Environment.h +++ /dev/null @@ -1,10 +0,0 @@ -/** \file Environment.h
-\brief Define the environment variable and global function
-\author alpha_one_x86
-\licence GPL3, see the file COPYING */
-
-#include "Variable.h"
-/// \brief The global include
-#include "StructEnumDefinition.h"
-#include "DebugEngineMacro.h"
-
diff --git a/plugins-alternative/Listener/dbus/StructEnumDefinition.h b/plugins-alternative/Listener/dbus/StructEnumDefinition.h deleted file mode 100644 index c1758f4..0000000 --- a/plugins-alternative/Listener/dbus/StructEnumDefinition.h +++ /dev/null @@ -1 +0,0 @@ -#include "../../../StructEnumDefinition.h" diff --git a/plugins-alternative/Listener/dbus/Variable.h b/plugins-alternative/Listener/dbus/Variable.h deleted file mode 100644 index 963d0c8..0000000 --- a/plugins-alternative/Listener/dbus/Variable.h +++ /dev/null @@ -1,15 +0,0 @@ -/** \file Variable.h
-\brief Define the environment variable
-\author alpha_one_x86
-\licence GPL3, see the file COPYING */
-
-#ifndef VARIABLE_H
-#define VARIABLE_H
-
-//Un-comment this next line to put ultracopier plugin in debug mode
-#define ULTRACOPIER_PLUGIN_DEBUG
-
-#endif // VARIABLE_H
-
-
-
diff --git a/plugins-alternative/Listener/dbus/documentation.dox b/plugins-alternative/Listener/dbus/documentation.dox deleted file mode 100644 index 2eb3c87..0000000 --- a/plugins-alternative/Listener/dbus/documentation.dox +++ /dev/null @@ -1,36 +0,0 @@ -/* -*- mode: C++ ; c-file-style: "stroustrup" -*- **/ - -/* - This file contains NO source code, just some documentation for doxygen to - parse. -*/ - -/*! - \mainpage dbus - - \section mainpage_overview Overview - - It's alternative listener for linux, it's very more simpler. You send just your copy/move, no more. No return.\n - More informations on <a href="http://ultracopier-wiki.first-world.info/">the wiki of ultracopier</a>. - - \section mainpage_platforms Platforms - - Ultracopier might be usable in all environments where you find Qt 5.\n - Ultracopier requires Qt 5.0 or newer. Tested on Qt 5.0. - - \section mainpage_downloads Downloads - - You can find the link on <a href="http://ultracopier.first-world.info/">Ultracopier</a> project page, via git, snapshot sources, ... - - \section mainpage_algorithm Dbus method - - you have this method exported to dbus: - <ul> - <li>void copy(const QStringList &sources,const QString &destination)</li> - <li>void move(const QStringList &sources,const QString &destination)</li> - </ul> - - \section license GPL Version 3 - The code source is under GPL3. The image is extacted from Oxygen icon pack of KDE4. - -*/ diff --git a/plugins-alternative/Listener/dbus/informations.xml b/plugins-alternative/Listener/dbus/informations.xml deleted file mode 100644 index a137400..0000000 --- a/plugins-alternative/Listener/dbus/informations.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<package> - <title xml:lang="en"><![CDATA[Listener for catchcopy in dbus]]></title><!-- english is required --> - <title xml:lang="fr"><![CDATA[Écouteur pour catchcopy en dbus]]></title> - <!-- What kind of plugin this is --> - <category>Listener</category> - <!-- Who wrote this plugin --> - <author><![CDATA[BRULE Herman, alpha_one_x86 (alpha_one_x86@first-world.info)]]></author> - <!-- URL of page or site for this plugin (may provide additional information, bug reports, feature requests). --> - <website xml:lang="en"><![CDATA[http://ultracopier.first-world.info/]]></website><!-- not required --> - <website xml:lang="fr"><![CDATA[http://ultracopier-fr.first-world.info/]]></website><!-- not required --> - <!-- the date-time format should be in timestamps format --> - <pubDate>1287496800</pubDate> - <!-- the architecture code of this plugin, found PlatformMacro.h into ultracopier source --> - <architecture>windows-x86</architecture> - <!-- Detailed description --> - <description xml:lang="en"><![CDATA[Listener for catchcopy in dbus. Allow to receive copy list from plugin/explorer compatible with catchcopy.]]></description> - <description xml:lang="fr"><![CDATA[Écouteur pour catchcopy en dbus. Permet de recevoir un liste de copie venant d'un plugin/explorateur avec catchcopy.]]></description> - <!-- Version of this release of this plugin, need be like that's: A.B.C.D, where A, B, C and D is number --> - <version>1.4.0.6</version> - <!-- This internal name should never change, because it is used to detect when a particular plugin is updated. It must comprise only lower case ASCII characters (a-z), numerical digits (0-9), "-", "." or "_", and it must be be unique within the category. And have size lower than 64 char. --> - <name>dbus</name> - <!-- Dependency checking. This is used to check when a plugin may not be compatible with an updated version of either Ultracopier or another plugin. This example only checks Ultracopier. --> - <dependencies><![CDATA[ - ]]></dependencies> -</package>
\ No newline at end of file diff --git a/plugins-alternative/Listener/dbus/listener.cpp b/plugins-alternative/Listener/dbus/listener.cpp deleted file mode 100644 index 50ed196..0000000 --- a/plugins-alternative/Listener/dbus/listener.cpp +++ /dev/null @@ -1,85 +0,0 @@ -#include "listener.h" - -Listener::Listener() -{ - connect(&catchcopy,&Catchcopy::newCopy, this,&Listener::newCopy); - connect(&catchcopy,&Catchcopy::newMove, this,&Listener::newMove); -} - -void Listener::listen() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); - if (!QDBusConnection::sessionBus().isConnected()) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); - emit newState(Ultracopier::NotListening); - return; - } - if (!QDBusConnection::sessionBus().registerService("info.first-world.catchcopy")) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QDBusConnection::sessionBus().lastError().message()); - emit newState(Ultracopier::NotListening); - return; - } - if(!QDBusConnection::sessionBus().registerObject("/", &catchcopy, QDBusConnection::ExportAllSlots)) - { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QDBusConnection::sessionBus().lastError().message()); - emit newState(Ultracopier::NotListening); - return; - } - emit newState(Ultracopier::FullListening); -} - -void Listener::close() -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); - QDBusConnection::sessionBus().unregisterObject("/"); - QDBusConnection::sessionBus().unregisterService("info.first-world.catchcopy"); - emit newState(Ultracopier::NotListening); -} - -const QString Listener::errorString() const -{ - return "Unknow error"; -} - -void Listener::setResources(OptionInterface * options,const QString &writePath,const QString &pluginPath,const bool &portableVersion) -{ - Q_UNUSED(options); - Q_UNUSED(writePath); - Q_UNUSED(pluginPath); - Q_UNUSED(portableVersion); -} - -/// \brief to get the options widget, NULL if not have -QWidget * Listener::options() -{ - return NULL; -} - -void Listener::transferFinished(const quint32 &orderId,const bool &withError) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start, orderId: "+QString::number(orderId)+", withError: "+QString::number(withError)); -} - -void Listener::transferCanceled(const quint32 &orderId) -{ - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start, orderId: "+QString::number(orderId)); -} - -/// \brief to reload the translation, because the new language have been loaded -void Listener::newLanguageLoaded() -{ -} - -void Listener::error(QString error) -{ - Q_UNUSED(error); -} - -void Listener::clientName(quint32 client,QString name) -{ - Q_UNUSED(client); - Q_UNUSED(name); - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Information,QStringLiteral("clientName: %1, for the id: %2").arg(name).arg(client)); -} diff --git a/plugins-alternative/Listener/dbus/listener.h b/plugins-alternative/Listener/dbus/listener.h deleted file mode 100644 index fcb95cd..0000000 --- a/plugins-alternative/Listener/dbus/listener.h +++ /dev/null @@ -1,49 +0,0 @@ -/** \file listener.h -\brief Define the server compatible with Ultracopier interface -\author alpha_one_x86 -\licence GPL3, see the file COPYING */ - -#ifndef SERVER_H -#define SERVER_H - -#include <QObject> -#include <QtDBus/QtDBus> -#include <QtDBus/QDBusConnection> - -#include "Catchcopy.h" -#include "Environment.h" -#include "../../../interface/PluginInterface_Listener.h" - -/// \brief Define the server compatible with Ultracopier interface -class Listener : public PluginInterface_Listener -{ - Q_OBJECT - Q_PLUGIN_METADATA(IID "first-world.info.ultracopier.PluginInterface.Listener/1.0.0.0" FILE "plugin.json") - Q_INTERFACES(PluginInterface_Listener) -public: - 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(); -public slots: - /// \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: - Catchcopy catchcopy; -private slots: - void error(QString error); - void clientName(quint32 client,QString name); -}; - -#endif // SERVER_H diff --git a/plugins-alternative/Listener/dbus/listener.pro b/plugins-alternative/Listener/dbus/listener.pro deleted file mode 100644 index 16cd3d3..0000000 --- a/plugins-alternative/Listener/dbus/listener.pro +++ /dev/null @@ -1,19 +0,0 @@ -CONFIG += c++11 -QMAKE_CXXFLAGS+="-std=c++0x -Wall -Wextra" -mac:QMAKE_CXXFLAGS+="-stdlib=libc++" - -TEMPLATE = lib -CONFIG += plugin -QT += network dbus -HEADERS = \ - $$PWD/listener.h \ - $$PWD/Environment.h \ - $$PWD/Variable.h \ - $$PWD/DebugEngineMacro.h \ - $$PWD/StructEnumDefinition.h \ - $$PWD/../../../interface/PluginInterface_Listener.h \ - $$PWD/Catchcopy.h -SOURCES = \ - $$PWD/listener.cpp \ - $$PWD/Catchcopy.cpp -TARGET = $$qtLibraryTarget(listener) diff --git a/plugins-alternative/Listener/dbus/plugin.json b/plugins-alternative/Listener/dbus/plugin.json deleted file mode 100644 index 9e26dfe..0000000 --- a/plugins-alternative/Listener/dbus/plugin.json +++ /dev/null @@ -1 +0,0 @@ -{}
\ No newline at end of file |