From bd56579c7d9de94c17287adefa118290e6b7ba33 Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Fri, 23 Feb 2018 23:49:48 +0000 Subject: New upstream version 1.4.0.3 --- interface/FacilityInterface.h | 26 ++++++------- interface/OptionInterface.h | 16 ++++---- interface/PluginInterface_CopyEngine.h | 65 +++++++++++++++---------------- interface/PluginInterface_Listener.h | 28 ++++++------- interface/PluginInterface_PluginLoader.h | 8 ++-- interface/PluginInterface_SessionLoader.h | 8 ++-- interface/PluginInterface_Themes.h | 44 ++++++++++----------- 7 files changed, 95 insertions(+), 100 deletions(-) (limited to 'interface') diff --git a/interface/FacilityInterface.h b/interface/FacilityInterface.h index 1893349..f9b000d 100644 --- a/interface/FacilityInterface.h +++ b/interface/FacilityInterface.h @@ -6,9 +6,9 @@ #ifndef FACILITY_INTERFACE_H #define FACILITY_INTERFACE_H -#include -#include -#include +#include +#include +#include #include "../StructEnumDefinition.h" @@ -20,25 +20,25 @@ class FacilityInterface : public QObject /// \brief To force the text re-translation virtual void retranslate() = 0; /// \brief convert size in Byte to String - virtual QString sizeToString(const double &size) const = 0; + virtual std::string sizeToString(const double &size) const = 0; /// \brief convert size unit to String - virtual QString sizeUnitToString(const Ultracopier::SizeUnit &sizeUnit) const = 0; + virtual std::string sizeUnitToString(const Ultracopier::SizeUnit &sizeUnit) const = 0; /// \brief translate the text - virtual QString translateText(const QString &text) const = 0; + virtual std::string translateText(const std::string &text) const = 0; /// \brief speed to string in byte per seconds - virtual QString speedToString(const double &speed) const = 0; + virtual std::string speedToString(const double &speed) const = 0; /// \brief Decompose the time in second - virtual Ultracopier::TimeDecomposition secondsToTimeDecomposition(const quint32 &seconds) const = 0; + virtual Ultracopier::TimeDecomposition secondsToTimeDecomposition(const uint32_t &seconds) const = 0; /// \brief have the fonctionnality - virtual bool haveFunctionality(const QString &fonctionnality) const = 0; + virtual bool haveFunctionality(const std::string &fonctionnality) const = 0; /// \brief call the fonctionnality - virtual QVariant callFunctionality(const QString &fonctionnality,const QStringList &args=QStringList()) = 0; + virtual std::string callFunctionality(const std::string &fonctionnality,const std::vector &args=std::vector()) = 0; /// \brief Do the simplified time - virtual QString simplifiedRemainingTime(const quint32 &seconds) const = 0; + virtual std::string simplifiedRemainingTime(const uint32_t &seconds) const = 0; /// \brief Do the simplified time - virtual QString ultimateUrl() const = 0; + virtual std::string ultimateUrl() const = 0; /// \brief Return the software name - virtual QString softwareName() const = 0; + virtual std::string softwareName() const = 0; }; #endif // FACILITY_INTERFACE_H diff --git a/interface/OptionInterface.h b/interface/OptionInterface.h index 9638170..034b49d 100644 --- a/interface/OptionInterface.h +++ b/interface/OptionInterface.h @@ -6,10 +6,10 @@ #ifndef OPTION_INTERFACE_H #define OPTION_INTERFACE_H -#include -#include -#include -#include +#include +#include +#include +#include #include "../StructEnumDefinition.h" @@ -21,15 +21,15 @@ class OptionInterface : public QObject Q_OBJECT public: /// \brief To add option group to options - virtual bool addOptionGroup(const QList > &KeysList) = 0; + virtual bool addOptionGroup(const std::vector > &KeysList) = 0; /*/// \brief To remove option group to options, removed to the load plugin virtual bool removeOptionGroup() = 0;*/ /// \brief To get option value - virtual QVariant getOptionValue(const QString &variableName) const = 0; + virtual std::string getOptionValue(const std::string &variableName) const = 0; /// \brief To set option value - virtual void setOptionValue(const QString &variableName,const QVariant &value) = 0; + virtual void setOptionValue(const std::string &variableName,const std::string &value) = 0; signals: - //void newOptionValue(QString,QVariant);-> disabled because the value will not externally changed, then useless notification + //void newOptionValue(std::string,std::string);-> disabled because the value will not externally changed, then useless notification void resetOptions() const; }; diff --git a/interface/PluginInterface_CopyEngine.h b/interface/PluginInterface_CopyEngine.h index c41be7b..eb5b6bc 100644 --- a/interface/PluginInterface_CopyEngine.h +++ b/interface/PluginInterface_CopyEngine.h @@ -6,13 +6,10 @@ #ifndef PLUGININTERFACE_COPYENGINE_H #define PLUGININTERFACE_COPYENGINE_H -#include -#include #include -#include -#include #include -#include +#include +#include #include "OptionInterface.h" #include "FacilityInterface.h" @@ -43,40 +40,40 @@ class PluginInterface_CopyEngine : public QObject /** \brief compare the current sources of the copy, with the passed arguments * \param sources the sources list to compares with the current sources list * \return true if have same sources, else false (or empty) */ - virtual bool haveSameSource(const QStringList &sources) = 0; + virtual bool haveSameSource(const std::vector &sources) = 0; /** \brief compare the current destination of the copy, with the passed arguments * \param destination the destination to compares with the current destination * \return true if have same destination, else false (or empty) */ - virtual bool haveSameDestination(const QString &destination) = 0; + virtual bool haveSameDestination(const std::string &destination) = 0; //external soft like file browser have send copy/move list to do /** \brief send copy without destination, ask the destination * \param sources the sources list to copy * \return true if the copy have been accepted */ - virtual bool newCopy(const QStringList &sources) = 0; + virtual bool newCopy(const std::vector &sources) = 0; /** \brief send copy with destination * \param sources the sources list to copy * \param destination the destination to copy * \return true if the copy have been accepted */ - virtual bool newCopy(const QStringList &sources,const QString &destination) = 0; + virtual bool newCopy(const std::vector &sources,const std::string &destination) = 0; /** \brief send move without destination, ask the destination * \param sources the sources list to move * \return true if the move have been accepted */ - virtual bool newMove(const QStringList &sources) = 0; + virtual bool newMove(const std::vector &sources) = 0; /** \brief send move without destination, ask the destination * \param sources the sources list to move * \param destination the destination to move * \return true if the move have been accepted */ - virtual bool newMove(const QStringList &sources,const QString &destination) = 0; + virtual bool newMove(const std::vector &sources,const std::string &destination) = 0; /** \brief send the new transfer list * \param file the transfer list */ - virtual void newTransferList(const QString &file) = 0; + virtual void newTransferList(const std::string &file) = 0; /** \brief to get byte read, use by Ultracopier for the speed calculation * real size transfered to right speed calculation */ - virtual quint64 realByteTransfered() = 0; + virtual uint64_t realByteTransfered() = 0; /** \brief support speed limitation */ @@ -103,7 +100,7 @@ class PluginInterface_CopyEngine : public QObject virtual void resume() = 0; /** \brief skip one transfer entry * \param id id of the file to remove */ - virtual void skip(const quint64 &id) = 0; + virtual void skip(const uint64_t &id) = 0; /// \brief cancel all the transfer virtual void cancel() = 0; @@ -111,19 +108,19 @@ class PluginInterface_CopyEngine : public QObject //edit the transfer list /** \brief remove the selected item * \param ids ids is the id list of the selected items */ - virtual void removeItems(const QList &ids) = 0; + virtual void removeItems(const std::vector &ids) = 0; /** \brief move on top of the list the selected item * \param ids ids is the id list of the selected items */ - virtual void moveItemsOnTop(const QList &ids) = 0; + virtual void moveItemsOnTop(const std::vector &ids) = 0; /** \brief move up the list the selected item * \param ids ids is the id list of the selected items */ - virtual void moveItemsUp(const QList &ids) = 0; + virtual void moveItemsUp(const std::vector &ids) = 0; /** \brief move down the list the selected item * \param ids ids is the id list of the selected items */ - virtual void moveItemsDown(const QList &ids) = 0; + virtual void moveItemsDown(const std::vector &ids) = 0; /** \brief move on bottom of the list the selected item * \param ids ids is the id list of the selected items */ - virtual void moveItemsOnBottom(const QList &ids) = 0; + virtual void moveItemsOnBottom(const std::vector &ids) = 0; /** \brief give the forced mode, to export/import transfer list */ @@ -138,27 +135,27 @@ class PluginInterface_CopyEngine : public QObject /** \brief to set the speed limitation * -1 if not able, 0 if disabled */ - virtual bool setSpeedLimitation(const qint64 &speedLimitation) = 0; + virtual bool setSpeedLimitation(const int64_t &speedLimitation) = 0; // signal to implement signals: //send information about the copy void actionInProgess(const Ultracopier::EngineActionInProgress &engineActionInProgress) const; //should update interface information on this event - void newFolderListing(const QString &path) const; + void newFolderListing(const std::string &path) const; void isInPause(const bool &isInPause) const; - void newActionOnList(const QList&) const;///very important, need be temporized to group the modification to do and not flood the interface - void doneTime(const QList >&) const; + void newActionOnList(const std::vector&) const;///very important, need be temporized to group the modification to do and not flood the interface + void doneTime(const std::vector >&) const; void syncReady() const; /** \brief to get the progression for a specific file * \param id the id of the transfer, id send during population the transfer list * first = current transfered byte, second = byte to transfer */ - void pushFileProgression(const QList &progressionList) const; + void pushFileProgression(const std::vector &progressionList) const; //get information about the copy /** \brief to get the general progression * first = current transfered byte, second = byte to transfer */ - void pushGeneralProgression(const quint64 &,const quint64 &) const; + void pushGeneralProgression(const uint64_t &,const uint64_t &) const; //when the cancel is clicked on copy engine dialog void cancelAll() const; @@ -167,11 +164,11 @@ class PluginInterface_CopyEngine : public QObject void canBeDeleted() const; //send error occurred - void error(const QString &path,const quint64 &size,const QDateTime &mtime,const QString &error) const; - void errorToRetry(const QString &source,const QString &destination,const QString &error) const; + void error(const std::string &path,const uint64_t &size,const uint64_t &mtime,const std::string &error) const; + void errorToRetry(const std::string &source,const std::string &destination,const std::string &error) const; //for the extra logging - void rmPath(const QString &path) const; - void mkPath(const QString &path) const; + void rmPath(const std::string &path) const; + void mkPath(const std::string &path) const; }; /// \brief To define the interface for the factory to do copy engine instance @@ -182,7 +179,7 @@ class PluginInterface_CopyEngineFactory : public QObject /// \brief to get one instance virtual PluginInterface_CopyEngine * getInstance() = 0; /// \brief to set resources, writePath can be empty if read only mode - virtual void setResources(OptionInterface * options,const QString &writePath,const QString &pluginPath,FacilityInterface * facilityInterface,const bool &portableVersion) = 0; + virtual void setResources(OptionInterface * options,const std::string &writePath,const std::string &pluginPath,FacilityInterface * facilityInterface,const bool &portableVersion) = 0; //get mode allowed /// \brief define if can copy file, folder or both virtual Ultracopier::CopyType getCopyType() = 0; @@ -191,9 +188,9 @@ class PluginInterface_CopyEngineFactory : public QObject /// \brief define if can only copy, or copy and move virtual bool canDoOnlyCopy() const = 0; /// \brief to get the supported protocols for the source - virtual QStringList supportedProtocolsForTheSource() const = 0; + virtual std::vector supportedProtocolsForTheSource() const = 0; /// \brief to get the supported protocols for the destination - virtual QStringList supportedProtocolsForTheDestination() const = 0; + virtual std::vector supportedProtocolsForTheDestination() const = 0; /// \brief to get the options of the copy engine virtual QWidget * options() = 0; public slots: @@ -203,9 +200,9 @@ class PluginInterface_CopyEngineFactory : public QObject virtual void newLanguageLoaded() = 0; signals: /// \brief To debug source - void debugInformation(const Ultracopier::DebugLevel &level,const QString &fonction,const QString &text,const QString &file,const int &ligne) const; + void debugInformation(const Ultracopier::DebugLevel &level,const std::string &fonction,const std::string &text,const std::string &file,const int &ligne) const; }; -Q_DECLARE_INTERFACE(PluginInterface_CopyEngineFactory,"first-world.info.ultracopier.PluginInterface.CopyEngineFactory/1.2.0.0"); +Q_DECLARE_INTERFACE(PluginInterface_CopyEngineFactory,"first-world.info.ultracopier.PluginInterface.CopyEngineFactory/1.2.4.0"); #endif // PLUGININTERFACE_COPYENGINE_H diff --git a/interface/PluginInterface_Listener.h b/interface/PluginInterface_Listener.h index 2fbe95b..61acb2f 100644 --- a/interface/PluginInterface_Listener.h +++ b/interface/PluginInterface_Listener.h @@ -7,8 +7,8 @@ #define PLUGININTERFACE_LISTENER_H #include -#include -#include +#include +#include #include "OptionInterface.h" @@ -25,32 +25,32 @@ class PluginInterface_Listener : public QObject /// \brief put close the listen virtual void close() = 0; /// \brief to get the error string - virtual const QString errorString() const = 0; + virtual const std::string errorString() const = 0; /// \brief set the resources for the plugin - virtual void setResources(OptionInterface * options,const QString &writePath,const QString &pluginPath,const bool &portableVersion) = 0; + virtual void setResources(OptionInterface * options,const std::string &writePath,const std::string &pluginPath,const bool &portableVersion) = 0; /// \brief to get the options widget, NULL if not have virtual QWidget * options() = 0; /// \brief to get a client list - virtual QStringList clientsList() const = 0; + virtual std::vector clientsList() const = 0; public slots: /// \brief send when copy is finished - virtual void transferFinished(const quint32 &orderId,const bool &withError) = 0; + virtual void transferFinished(const uint32_t &orderId,const bool &withError) = 0; /// \brief send when copy is canceled - virtual void transferCanceled(const quint32 &orderId) = 0; + virtual void transferCanceled(const uint32_t &orderId) = 0; /// \brief to reload the translation, because the new language have been loaded virtual void newLanguageLoaded() = 0; signals: void newState(const Ultracopier::ListeningState &state) const; - void newCopyWithoutDestination(const quint32 &orderId,const QStringList &sources) const; - void newCopy(const quint32 &orderId,const QStringList &sources,const QString &destination) const; - void newMoveWithoutDestination(const quint32 &orderId,const QStringList &sources) const; - void newMove(const quint32 &orderId,const QStringList &sources,const QString &destination) const; - void error(const QString &error) const; + void newCopyWithoutDestination(const uint32_t &orderId,const std::vector &sources) const; + void newCopy(const uint32_t &orderId,const std::vector &sources,const std::string &destination) const; + void newMoveWithoutDestination(const uint32_t &orderId,const std::vector &sources) const; + void newMove(const uint32_t &orderId,const std::vector &sources,const std::string &destination) const; + void error(const std::string &error) const; void newClientList() const; /// \brief To debug source - void debugInformation(const Ultracopier::DebugLevel &level,const QString &fonction,const QString &text,const QString &file,const int &ligne) const; + void debugInformation(const Ultracopier::DebugLevel &level,const std::string &fonction,const std::string &text,const std::string &file,const int &ligne) const; }; -Q_DECLARE_INTERFACE(PluginInterface_Listener,"first-world.info.ultracopier.PluginInterface.Listener/1.0.0.0"); +Q_DECLARE_INTERFACE(PluginInterface_Listener,"first-world.info.ultracopier.PluginInterface.Listener/1.2.4.0"); #endif // PLUGININTERFACE_LISTENER_H diff --git a/interface/PluginInterface_PluginLoader.h b/interface/PluginInterface_PluginLoader.h index 71d5935..c702003 100644 --- a/interface/PluginInterface_PluginLoader.h +++ b/interface/PluginInterface_PluginLoader.h @@ -6,7 +6,7 @@ #ifndef PLUGININTERFACE_PLUGINLOADER_H #define PLUGININTERFACE_PLUGINLOADER_H -#include +#include #include "OptionInterface.h" @@ -21,7 +21,7 @@ class PluginInterface_PluginLoader : public QObject /// \brief try enable/disable the catching virtual void setEnabled(const bool &enabled) = 0; /// \brief to set resources, writePath can be empty if read only mode - virtual void setResources(OptionInterface * options,const QString &writePath,const QString &pluginPath,const bool &portableVersion) = 0; + virtual void setResources(OptionInterface * options,const std::string &writePath,const std::string &pluginPath,const bool &portableVersion) = 0; /// \brief to get the options widget, NULL if not have virtual QWidget * options() = 0; public slots: @@ -31,9 +31,9 @@ class PluginInterface_PluginLoader : public QObject signals: void newState(const Ultracopier::CatchState &catchstate) const; /// \brief To debug source - void debugInformation(const Ultracopier::DebugLevel &level,const QString &fonction,const QString &text,const QString &file,const int &ligne) const; + void debugInformation(const Ultracopier::DebugLevel &level,const std::string &fonction,const std::string &text,const std::string &file,const int &ligne) const; }; -Q_DECLARE_INTERFACE(PluginInterface_PluginLoader,"first-world.info.ultracopier.PluginInterface.PluginLoader/1.0.0.0"); +Q_DECLARE_INTERFACE(PluginInterface_PluginLoader,"first-world.info.ultracopier.PluginInterface.PluginLoader/1.2.4.0"); #endif // PLUGININTERFACE_PLUGINLOADER_H diff --git a/interface/PluginInterface_SessionLoader.h b/interface/PluginInterface_SessionLoader.h index 85b9b22..d0cd366 100644 --- a/interface/PluginInterface_SessionLoader.h +++ b/interface/PluginInterface_SessionLoader.h @@ -6,7 +6,7 @@ #ifndef PLUGININTERFACE_SESSIONLOADER_H #define PLUGININTERFACE_SESSIONLOADER_H -#include +#include #include "OptionInterface.h" @@ -23,7 +23,7 @@ class PluginInterface_SessionLoader : public QObject /// \brief get if is enabled virtual bool getEnabled() const = 0; /// \brief set the resources - virtual void setResources(OptionInterface * options,const QString &writePath,const QString &pluginPath,const bool &portableVersion) = 0; + virtual void setResources(OptionInterface * options,const std::string &writePath,const std::string &pluginPath,const bool &portableVersion) = 0; /// \brief to get the options widget, NULL if not have virtual QWidget * options() = 0; public slots: @@ -31,9 +31,9 @@ class PluginInterface_SessionLoader : public QObject virtual void newLanguageLoaded() = 0; signals: /// \brief To debug source - void debugInformation(const Ultracopier::DebugLevel &level,const QString &fonction,const QString &text,const QString &file,const int &ligne) const; + void debugInformation(const Ultracopier::DebugLevel &level,const std::string &fonction,const std::string &text,const std::string &file,const int &ligne) const; }; -Q_DECLARE_INTERFACE(PluginInterface_SessionLoader,"first-world.info.ultracopier.PluginInterface.SessionLoader/1.0.0.0"); +Q_DECLARE_INTERFACE(PluginInterface_SessionLoader,"first-world.info.ultracopier.PluginInterface.SessionLoader/1.2.4.0"); #endif // PLUGININTERFACE_SESSIONLOADER_H diff --git a/interface/PluginInterface_Themes.h b/interface/PluginInterface_Themes.h index 7d8c3f6..7272c79 100644 --- a/interface/PluginInterface_Themes.h +++ b/interface/PluginInterface_Themes.h @@ -6,13 +6,11 @@ #ifndef PLUGININTERFACE_THEMES_H #define PLUGININTERFACE_THEMES_H -#include -#include +#include +#include #include #include -#include -#include -#include +#include #include #include "OptionInterface.h" @@ -30,25 +28,25 @@ class PluginInterface_Themes : public QWidget virtual void actionInProgess(const Ultracopier::EngineActionInProgress&) = 0; /// \brief the new folder is listing - virtual void newFolderListing(const QString &path) = 0; + virtual void newFolderListing(const std::string &path) = 0; /** \brief show the detected speed * in byte per seconds */ - virtual void detectedSpeed(const quint64 &speed) = 0; + virtual void detectedSpeed(const uint64_t &speed) = 0; /** \brief show the remaining time * time in seconds */ virtual void remainingTime(const int &remainingSeconds) = 0; /// \brief set one error is detected virtual void errorDetected() = 0; /// \brief new error - virtual void errorToRetry(const QString &source,const QString &destination,const QString &error) = 0; + virtual void errorToRetry(const std::string &source,const std::string &destination,const std::string &error) = 0; /** \brief support speed limitation */ virtual void setSupportSpeedLimitation(const bool &supportSpeedLimitationBool) = 0; /// \brief get action on the transfer list (add/move/remove) - virtual void getActionOnList(const QList &returnActions) = 0; + virtual void getActionOnList(const std::vector &returnActions) = 0; /// \brief show the general progression - virtual void setGeneralProgression(const quint64 ¤t,const quint64 &total) = 0; + virtual void setGeneralProgression(const uint64_t ¤t,const uint64_t &total) = 0; /// \brief show the file progression - virtual void setFileProgression(const QList &progressionList) = 0; + virtual void setFileProgression(const std::vector &progressionList) = 0; public: /// \brief get the widget for the copy engine virtual QWidget * getOptionsEngineWidget() = 0; @@ -68,25 +66,25 @@ class PluginInterface_Themes : public QWidget // signal to implement signals: //set the transfer list - void removeItems(const QList &ids) const; - void moveItemsOnTop(const QList &ids) const; - void moveItemsUp(const QList &ids) const; - void moveItemsDown(const QList &ids) const; - void moveItemsOnBottom(const QList &ids) const; + void removeItems(const std::vector &ids) const; + void moveItemsOnTop(const std::vector &ids) const; + void moveItemsUp(const std::vector &ids) const; + void moveItemsDown(const std::vector &ids) const; + void moveItemsOnBottom(const std::vector &ids) const; void exportTransferList() const; void importTransferList() const; void exportErrorIntoTransferList() const; //user ask ask to add folder (add it with interface ask source/destination) void userAddFolder(const Ultracopier::CopyMode &mode) const; void userAddFile(const Ultracopier::CopyMode &mode) const; - void urlDropped(const QList &urls) const; + void urlDropped(const std::vector &urls) const; //action on the copy void pause() const; void resume() const; - void skip(const quint64 &id) const; + void skip(const uint64_t &id) const; void cancel() const; //edit the action - void newSpeedLimitation(const qint64 &speedLimitation) const;///< -1 if not able, 0 if disabled + void newSpeedLimitation(const uint64_t &speedLimitation) const;///< -1 if not able, 0 if disabled }; /// \brief To define the interface for the factory to do themes instance @@ -97,11 +95,11 @@ class PluginInterface_ThemesFactory : public QObject /// \brief to get one instance virtual PluginInterface_Themes * getInstance() = 0; /// \brief to set resources, writePath can be empty if read only mode - virtual void setResources(OptionInterface * options,const QString &writePath,const QString &pluginPath,FacilityInterface * facilityInterface,const bool &portableVersion) = 0; + virtual void setResources(OptionInterface * options,const std::string &writePath,const std::string &pluginPath,FacilityInterface * facilityInterface,const bool &portableVersion) = 0; /// \brief to get the default options widget virtual QWidget * options() = 0; /// \brief to get a resource icon - virtual QIcon getIcon(const QString &fileName) const = 0; + virtual QIcon getIcon(const std::string &fileName) const = 0; public slots: /// \brief to reset as default the local options virtual void resetOptions() = 0; @@ -109,9 +107,9 @@ class PluginInterface_ThemesFactory : public QObject virtual void newLanguageLoaded() = 0; signals: /// \brief To debug source - void debugInformation(const Ultracopier::DebugLevel &level,const QString &fonction,const QString &text,const QString &file,const int &ligne) const; + void debugInformation(const Ultracopier::DebugLevel &level,const std::string &fonction,const std::string &text,const std::string &file,const int &ligne) const; }; -Q_DECLARE_INTERFACE(PluginInterface_ThemesFactory,"first-world.info.ultracopier.PluginInterface.ThemesFactory/1.0.1.0"); +Q_DECLARE_INTERFACE(PluginInterface_ThemesFactory,"first-world.info.ultracopier.PluginInterface.ThemesFactory/1.2.4.0"); #endif // PLUGININTERFACE_THEMES_H -- cgit v1.2.3