diff options
author | Thomas Preud'homme <robotux@celest.fr> | 2018-02-23 23:49:48 +0000 |
---|---|---|
committer | Thomas Preud'homme <robotux@celest.fr> | 2018-02-23 23:49:48 +0000 |
commit | bd56579c7d9de94c17287adefa118290e6b7ba33 (patch) | |
tree | 666d7d0b6945b442573b7a3145969f66a53aa460 /interface/PluginInterface_CopyEngine.h | |
parent | b3c8bdcc0d1e4b2ab298847a7902b6d60410a5bc (diff) |
New upstream version 1.4.0.3
Diffstat (limited to 'interface/PluginInterface_CopyEngine.h')
-rw-r--r-- | interface/PluginInterface_CopyEngine.h | 65 |
1 files changed, 31 insertions, 34 deletions
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 <QStringList> -#include <QString> #include <QObject> -#include <QList> -#include <QPair> #include <QWidget> -#include <QDateTime> +#include <string> +#include <vector> #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<std::string> &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<std::string> &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<std::string> &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<std::string> &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<std::string> &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<int> &ids) = 0; + virtual void removeItems(const std::vector<uint64_t> &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<int> &ids) = 0; + virtual void moveItemsOnTop(const std::vector<uint64_t> &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<int> &ids) = 0; + virtual void moveItemsUp(const std::vector<uint64_t> &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<int> &ids) = 0; + virtual void moveItemsDown(const std::vector<uint64_t> &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<int> &ids) = 0; + virtual void moveItemsOnBottom(const std::vector<uint64_t> &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<Ultracopier::ReturnActionOnCopyList>&) const;///very important, need be temporized to group the modification to do and not flood the interface - void doneTime(const QList<QPair<quint64,quint32> >&) const; + void newActionOnList(const std::vector<Ultracopier::ReturnActionOnCopyList>&) const;///very important, need be temporized to group the modification to do and not flood the interface + void doneTime(const std::vector<std::pair<uint64_t,uint32_t> >&) 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<Ultracopier::ProgressionItem> &progressionList) const; + void pushFileProgression(const std::vector<Ultracopier::ProgressionItem> &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<std::string> supportedProtocolsForTheSource() const = 0; /// \brief to get the supported protocols for the destination - virtual QStringList supportedProtocolsForTheDestination() const = 0; + virtual std::vector<std::string> 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 |