diff options
author | Thomas Preud'homme <robotux@celest.fr> | 2017-11-24 23:24:09 +0000 |
---|---|---|
committer | Thomas Preud'homme <robotux@celest.fr> | 2017-11-24 23:24:09 +0000 |
commit | b3c8bdcc0d1e4b2ab298847a7902b6d60410a5bc (patch) | |
tree | 8fce8a51adfb245db8ab2a76831661780c0c713e /interface | |
parent | e297dbd8052ef4e66f069e2dd1865ae7fa8af28e (diff) |
New upstream version 1.2.3.6
Diffstat (limited to 'interface')
-rw-r--r-- | interface/FacilityInterface.h | 46 | ||||
-rw-r--r-- | interface/OptionInterface.h | 29 | ||||
-rw-r--r-- | interface/PluginInterface_CopyEngine.h | 353 | ||||
-rw-r--r-- | interface/PluginInterface_Listener.h | 62 | ||||
-rw-r--r-- | interface/PluginInterface_PluginLoader.h | 35 | ||||
-rw-r--r-- | interface/PluginInterface_SessionLoader.h | 33 | ||||
-rw-r--r-- | interface/PluginInterface_Themes.h | 172 |
7 files changed, 361 insertions, 369 deletions
diff --git a/interface/FacilityInterface.h b/interface/FacilityInterface.h index 1ced0a2..1893349 100644 --- a/interface/FacilityInterface.h +++ b/interface/FacilityInterface.h @@ -1,8 +1,7 @@ /** \file FacilityInterface.h \brief Define the class of the facility engine \author alpha_one_x86 -\version 0.3 -\date 2010 */ +\licence GPL3, see the file COPYING */ #ifndef FACILITY_INTERFACE_H #define FACILITY_INTERFACE_H @@ -14,27 +13,32 @@ #include "../StructEnumDefinition.h" /// \brief To define the interface, to pass the facility object from Ultracopier to the plugins without compatibility problem +//not possible to be static, because in the plugin it's not resolved class FacilityInterface : public QObject { - public: - /// \brief To force the text re-translation - virtual void retranslate() = 0; - /// \brief convert size in Byte to String - virtual QString sizeToString(const double &size) = 0; - /// \brief convert size unit to String - virtual QString sizeUnitToString(const SizeUnit &sizeUnit) = 0; - /// \brief translate the text - virtual QString translateText(const QString &text) = 0; - /// \brief speed to string in byte per seconds - virtual QString speedToString(const double &speed) = 0; - /// \brief Decompose the time in second - virtual TimeDecomposition secondsToTimeDecomposition(const quint32 &seconds) = 0; - /// \brief have the fonctionnality - virtual bool haveFunctionality(const QString &fonctionnality) = 0; - /// \brief call the fonctionnality - virtual QVariant callFunctionality(const QString &fonctionnality,const QStringList &args=QStringList()) = 0; - /// \brief Do the simplified time - virtual QString simplifiedRemainingTime(const quint32 &seconds) = 0; + public: + /// \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; + /// \brief convert size unit to String + virtual QString sizeUnitToString(const Ultracopier::SizeUnit &sizeUnit) const = 0; + /// \brief translate the text + virtual QString translateText(const QString &text) const = 0; + /// \brief speed to string in byte per seconds + virtual QString speedToString(const double &speed) const = 0; + /// \brief Decompose the time in second + virtual Ultracopier::TimeDecomposition secondsToTimeDecomposition(const quint32 &seconds) const = 0; + /// \brief have the fonctionnality + virtual bool haveFunctionality(const QString &fonctionnality) const = 0; + /// \brief call the fonctionnality + virtual QVariant callFunctionality(const QString &fonctionnality,const QStringList &args=QStringList()) = 0; + /// \brief Do the simplified time + virtual QString simplifiedRemainingTime(const quint32 &seconds) const = 0; + /// \brief Do the simplified time + virtual QString ultimateUrl() const = 0; + /// \brief Return the software name + virtual QString softwareName() const = 0; }; #endif // FACILITY_INTERFACE_H diff --git a/interface/OptionInterface.h b/interface/OptionInterface.h index 2be66cb..9638170 100644 --- a/interface/OptionInterface.h +++ b/interface/OptionInterface.h @@ -1,8 +1,7 @@ /** \file OptionInterface.h \brief Define the class of the option engine \author alpha_one_x86 -\version 0.3 -\date 2010 */ +\licence GPL3, see the file COPYING */ #ifndef OPTION_INTERFACE_H #define OPTION_INTERFACE_H @@ -19,19 +18,19 @@ * **/ class OptionInterface : public QObject { - Q_OBJECT - public: - /// \brief To add option group to options - virtual bool addOptionGroup(const QList<QPair<QString, QVariant> > &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) = 0; - /// \brief To set option value - virtual void setOptionValue(const QString &variableName,const QVariant &value) = 0; - signals: - //void newOptionValue(QString,QVariant);-> disabled because the value will not externally changed, then useless notification - void resetOptions(); + Q_OBJECT + public: + /// \brief To add option group to options + virtual bool addOptionGroup(const QList<QPair<QString, QVariant> > &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; + /// \brief To set option value + virtual void setOptionValue(const QString &variableName,const QVariant &value) = 0; + signals: + //void newOptionValue(QString,QVariant);-> disabled because the value will not externally changed, then useless notification + void resetOptions() const; }; #endif // OPTION_INTERFACE_H diff --git a/interface/PluginInterface_CopyEngine.h b/interface/PluginInterface_CopyEngine.h index fad97fe..c41be7b 100644 --- a/interface/PluginInterface_CopyEngine.h +++ b/interface/PluginInterface_CopyEngine.h @@ -1,8 +1,7 @@ /** \file PluginInterface_CopyEngine.h \brief Define the interface of the plugin of type: copy engine \author alpha_one_x86 -\version 0.3 -\date 2010 */ +\licence GPL3, see the file COPYING */ #ifndef PLUGININTERFACE_COPYENGINE_H #define PLUGININTERFACE_COPYENGINE_H @@ -32,193 +31,181 @@ * **/ class PluginInterface_CopyEngine : public QObject { - Q_OBJECT - public: - /** \brief to send the options panel - * \return return false if have not the options - * \param tempWidget the widget to generate on it the options */ - virtual bool getOptionsEngine(QWidget * tempWidget) = 0; - /** \brief to have interface widget to do modal dialog - * \param interface to have the widget of the interface, useful for modal dialog */ - virtual void setInterfacePointer(QWidget * interface) = 0; - /** \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; - /** \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; - - - //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; - /** \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; - /** \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; - /** \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; - /** \brief send the new transfer list - * \param file the transfer list */ - virtual void newTransferList(const QString &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; - - - /** \brief get the speed limitation - * < -1 if not able, 0 if disabled */ - virtual qint64 getSpeedLimitation() = 0; - - - //get user action - /** \brief get the collision action list */ - virtual QList<QPair<QString,QString> > getCollisionAction() = 0; - /** \brief get the collision error list */ - virtual QList<QPair<QString,QString> > getErrorAction() = 0; - - - //transfer list - /** \brief to sync the transfer list - * Used when the interface is changed, useful to minimize the memory size */ - virtual void syncTransferList() = 0; - public slots: - //user ask ask to add folder (add it with interface ask source/destination) - /** \brief add folder called on the interface - * Used by manual adding */ - virtual bool userAddFolder(const CopyMode &mode) = 0; - /** \brief add file called on the interface - * Used by manual adding */ - virtual bool userAddFile(const CopyMode &mode) = 0; - - - //action on the transfer - /// \brief put the transfer in pause - virtual void pause() = 0; - /// \brief resume the transfer - virtual void resume() = 0; - /** \brief skip one transfer entry - * \param id id of the file to remove */ - virtual void skip(const quint64 &id) = 0; - /// \brief cancel all the transfer - virtual void cancel() = 0; - - - //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; - /** \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; - /** \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; - /** \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; - /** \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; - - - /** \brief give the forced mode, to export/import transfer list */ - virtual void forceMode(const CopyMode &mode) = 0; - /// \brief export the transfer list into a file - virtual void exportTransferList() = 0; - /// \brief import the transfer list into a file - virtual void importTransferList() = 0; - - - /** \brief to set the speed limitation - * -1 if not able, 0 if disabled */ - virtual bool setSpeedLimitation(const qint64 &speedLimitation) = 0; - - - //action - /// \brief to set the collision action - virtual void setCollisionAction(const QString &action) = 0; - /// \brief to set the error action - virtual void setErrorAction(const QString &action) = 0; - /* signal to implement - signals: - //send information about the copy - void actionInProgess(EngineActionInProgress engineActionInProgress); //should update interface information on this event - - void newFolderListing(QString path); - void newCollisionAction(QString action); - void newErrorAction(QString action); - void isInPause(bool isInPause); - - void newActionOnList(const QList<returnActionOnCopyList>&);///very important, need be temporized to group the modification to do and not flood the interface - void syncReady(); - - / ** \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<ProgressionItem> &progressionList); - //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 &); - - //when the cancel is clicked on copy engine dialog - void cancelAll(); - - //when can be deleted - void canBeDeleted(); - - //send error occurred - void error(QString path,quint64 size,QDateTime mtime,QString error); - //for the extra logging - void rmPath(QString path); - void mkPath(QString path);*/ + Q_OBJECT + public: + /** \brief to send the options panel + * \return return false if have not the options + * \param tempWidget the widget to generate on it the options */ + virtual bool getOptionsEngine(QWidget * tempWidget) = 0; + /** \brief to have interface widget to do modal dialog + * \param interface to have the widget of the interface, useful for modal dialog */ + virtual void setInterfacePointer(QWidget * interface) = 0; + /** \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; + /** \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; + + + //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; + /** \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; + /** \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; + /** \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; + /** \brief send the new transfer list + * \param file the transfer list */ + virtual void newTransferList(const QString &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; + + + /** \brief support speed limitation */ + virtual bool supportSpeedLimitation() const = 0; + + //transfer list + /** \brief to sync the transfer list + * Used when the interface is changed, useful to minimize the memory size */ + virtual void syncTransferList() = 0; + public slots: + //user ask ask to add folder (add it with interface ask source/destination) + /** \brief add folder called on the interface + * Used by manual adding */ + virtual bool userAddFolder(const Ultracopier::CopyMode &mode) = 0; + /** \brief add file called on the interface + * Used by manual adding */ + virtual bool userAddFile(const Ultracopier::CopyMode &mode) = 0; + + + //action on the transfer + /// \brief put the transfer in pause + virtual void pause() = 0; + /// \brief resume the transfer + virtual void resume() = 0; + /** \brief skip one transfer entry + * \param id id of the file to remove */ + virtual void skip(const quint64 &id) = 0; + /// \brief cancel all the transfer + virtual void cancel() = 0; + + + //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; + /** \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; + /** \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; + /** \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; + /** \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; + + + /** \brief give the forced mode, to export/import transfer list */ + virtual void forceMode(const Ultracopier::CopyMode &mode) = 0; + /// \brief export the transfer list into a file + virtual void exportTransferList() = 0; + /// \brief export the transfer list into a file + virtual void exportErrorIntoTransferList() = 0; + /// \brief import the transfer list into a file + virtual void importTransferList() = 0; + + + /** \brief to set the speed limitation + * -1 if not able, 0 if disabled */ + virtual bool setSpeedLimitation(const qint64 &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 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 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; + //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; + + //when the cancel is clicked on copy engine dialog + void cancelAll() const; + + //when can be deleted + 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; + //for the extra logging + void rmPath(const QString &path) const; + void mkPath(const QString &path) const; }; /// \brief To define the interface for the factory to do copy engine instance class PluginInterface_CopyEngineFactory : public QObject { - Q_OBJECT - public: - /// \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; - //get mode allowed - /// \brief define if can copy file, folder or both - virtual CopyType getCopyType() = 0; - /// \brief define if can import/export or nothing - virtual TransferListOperation getTransferListOperation() = 0; - /// \brief define if can only copy, or copy and move - virtual bool canDoOnlyCopy() = 0; - /// \brief to get the supported protocols for the source - virtual QStringList supportedProtocolsForTheSource() = 0; - /// \brief to get the supported protocols for the destination - virtual QStringList supportedProtocolsForTheDestination() = 0; - /// \brief to get the options of the copy engine - virtual QWidget * options() = 0; - public slots: - /// \brief to reset the options - virtual void resetOptions() = 0; - /// \brief to reload the translation, because the new language have been loaded - virtual void newLanguageLoaded() = 0; - + Q_OBJECT + public: + /// \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; + //get mode allowed + /// \brief define if can copy file, folder or both + virtual Ultracopier::CopyType getCopyType() = 0; + /// \brief define if can import/export or nothing + virtual Ultracopier::TransferListOperation getTransferListOperation() = 0; + /// \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; + /// \brief to get the supported protocols for the destination + virtual QStringList supportedProtocolsForTheDestination() const = 0; + /// \brief to get the options of the copy engine + virtual QWidget * options() = 0; + public slots: + /// \brief to reset the options + virtual void resetOptions() = 0; + /// \brief to reload the translation, because the new language have been loaded + 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; }; -Q_DECLARE_INTERFACE(PluginInterface_CopyEngineFactory,"first-world.info.ultracopier.PluginInterface.CopyEngineFactory/0.3.0.10"); +Q_DECLARE_INTERFACE(PluginInterface_CopyEngineFactory,"first-world.info.ultracopier.PluginInterface.CopyEngineFactory/1.2.0.0"); #endif // PLUGININTERFACE_COPYENGINE_H diff --git a/interface/PluginInterface_Listener.h b/interface/PluginInterface_Listener.h index 5648ed8..2fbe95b 100644 --- a/interface/PluginInterface_Listener.h +++ b/interface/PluginInterface_Listener.h @@ -1,8 +1,7 @@ /** \file PluginInterface_Listener.h \brief Define the interface of the plugin of type: listener \author alpha_one_x86 -\version 0.3 -\date 2010 */ +\licence GPL3, see the file COPYING */ #ifndef PLUGININTERFACE_LISTENER_H #define PLUGININTERFACE_LISTENER_H @@ -19,34 +18,39 @@ * */ class PluginInterface_Listener : public QObject { - Q_OBJECT - public: - /// \brief put this plugin in listen mode - virtual void listen() = 0; - /// \brief put close the listen - virtual void close() = 0; - /// \brief to get the error string - virtual const QString errorString() = 0; - /// \brief set the resources for the plugin - virtual void setResources(OptionInterface * options,QString writePath,QString pluginPath,bool portableVersion) = 0; - /// \brief to get the options widget, NULL if not have - virtual QWidget * options() = 0; - public slots: - /// \brief send when copy is finished - virtual void transferFinished(quint32 orderId,bool withError) = 0; - /// \brief send when copy is canceled - virtual void transferCanceled(quint32 orderId) = 0; - /// \brief to reload the translation, because the new language have been loaded - virtual void newLanguageLoaded() = 0; - /* signal to implement - signals: - void newState(ListeningState state); - void newCopy(quint32 orderId,QStringList sources); - void newCopy(quint32 orderId,QStringList sources,QString destination); - void newMove(quint32 orderId,QStringList sources); - void newMove(quint32 orderId,QStringList sources,QString destination);*/ + Q_OBJECT + public: + /// \brief put this plugin in listen mode + virtual void listen() = 0; + /// \brief put close the listen + virtual void close() = 0; + /// \brief to get the error string + virtual const QString 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; + /// \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; + public slots: + /// \brief send when copy is finished + virtual void transferFinished(const quint32 &orderId,const bool &withError) = 0; + /// \brief send when copy is canceled + virtual void transferCanceled(const quint32 &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 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; }; -Q_DECLARE_INTERFACE(PluginInterface_Listener,"first-world.info.ultracopier.PluginInterface.Listener/0.3.0.8"); +Q_DECLARE_INTERFACE(PluginInterface_Listener,"first-world.info.ultracopier.PluginInterface.Listener/1.0.0.0"); #endif // PLUGININTERFACE_LISTENER_H diff --git a/interface/PluginInterface_PluginLoader.h b/interface/PluginInterface_PluginLoader.h index 22f42ce..71d5935 100644 --- a/interface/PluginInterface_PluginLoader.h +++ b/interface/PluginInterface_PluginLoader.h @@ -1,8 +1,7 @@ /** \file PluginInterface_PluginLoader.h \brief Define the interface of the plugin of type: plugin loader \author alpha_one_x86 -\version 0.3 -\date 2010 */ +\licence GPL3, see the file COPYING */ #ifndef PLUGININTERFACE_PLUGINLOADER_H #define PLUGININTERFACE_PLUGINLOADER_H @@ -17,22 +16,24 @@ * */ class PluginInterface_PluginLoader : public QObject { - Q_OBJECT - public: - /// \brief try enable/disable the catching - virtual void setEnabled(bool) = 0; - /// \brief to set resources, writePath can be empty if read only mode - virtual void setResources(OptionInterface * options,QString writePath,QString pluginPath,bool portableVersion) = 0; - /// \brief to get the options widget, NULL if not have - virtual QWidget * options() = 0; - public slots: - /// \brief to reload the translation, because the new language have been loaded - virtual void newLanguageLoaded() = 0; - /* signal to implement - signals: - void newState(CatchState);*/ + Q_OBJECT + public: + /// \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; + /// \brief to get the options widget, NULL if not have + virtual QWidget * options() = 0; + public slots: + /// \brief to reload the translation, because the new language have been loaded + virtual void newLanguageLoaded() = 0; + // signal to implement + 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; }; -Q_DECLARE_INTERFACE(PluginInterface_PluginLoader,"first-world.info.ultracopier.PluginInterface.PluginLoader/0.3.0.8"); +Q_DECLARE_INTERFACE(PluginInterface_PluginLoader,"first-world.info.ultracopier.PluginInterface.PluginLoader/1.0.0.0"); #endif // PLUGININTERFACE_PLUGINLOADER_H diff --git a/interface/PluginInterface_SessionLoader.h b/interface/PluginInterface_SessionLoader.h index e73c9e3..85b9b22 100644 --- a/interface/PluginInterface_SessionLoader.h +++ b/interface/PluginInterface_SessionLoader.h @@ -1,8 +1,7 @@ /** \file PluginInterface_SessionLoader.h \brief Define the interface of the plugin of type: session loader \author alpha_one_x86 -\version 0.3 -\date 2010 */ +\licence GPL3, see the file COPYING */ #ifndef PLUGININTERFACE_SESSIONLOADER_H #define PLUGININTERFACE_SESSIONLOADER_H @@ -17,20 +16,24 @@ * */ class PluginInterface_SessionLoader : public QObject { - public: - /// \brief set enabled/disabled - virtual void setEnabled(bool) = 0; - /// \brief get if is enabled - virtual bool getEnabled() = 0; - /// \brief set the resources - virtual void setResources(OptionInterface * options,QString writePath,QString pluginPath,bool portableVersion) = 0; - /// \brief to get the options widget, NULL if not have - virtual QWidget * options() = 0; - public slots: - /// \brief to reload the translation, because the new language have been loaded - virtual void newLanguageLoaded() = 0; + Q_OBJECT + public: + /// \brief set enabled/disabled + virtual void setEnabled(const bool &enabled) = 0; + /// \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; + /// \brief to get the options widget, NULL if not have + virtual QWidget * options() = 0; + public slots: + /// \brief to reload the translation, because the new language have been loaded + 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; }; -Q_DECLARE_INTERFACE(PluginInterface_SessionLoader,"first-world.info.ultracopier.PluginInterface.SessionLoader/0.3.0.8"); +Q_DECLARE_INTERFACE(PluginInterface_SessionLoader,"first-world.info.ultracopier.PluginInterface.SessionLoader/1.0.0.0"); #endif // PLUGININTERFACE_SESSIONLOADER_H diff --git a/interface/PluginInterface_Themes.h b/interface/PluginInterface_Themes.h index cfdb719..7d8c3f6 100644 --- a/interface/PluginInterface_Themes.h +++ b/interface/PluginInterface_Themes.h @@ -1,8 +1,7 @@ /** \file PluginInterface_Themes.h \brief Define the interface of the plugin of type: copy engine \author alpha_one_x86 -\version 0.3 -\date 2010 */ +\licence GPL3, see the file COPYING */ #ifndef PLUGININTERFACE_THEMES_H #define PLUGININTERFACE_THEMES_H @@ -24,100 +23,95 @@ * */ class PluginInterface_Themes : public QWidget { - Q_OBJECT - public slots: - //send information about the copy - /// \brief to set the action in progress - virtual void actionInProgess(EngineActionInProgress) = 0; + Q_OBJECT + public slots: + //send information about the copy + /// \brief to set the action in progress + virtual void actionInProgess(const Ultracopier::EngineActionInProgress&) = 0; - /// \brief the new folder is listing - virtual void newFolderListing(const QString &path) = 0; - /** \brief show the detected speed - * in byte per seconds */ - virtual void detectedSpeed(const quint64 &speed) = 0; - /** \brief show the remaining time - * time in seconds */ - virtual void remainingTime(const int &remainingSeconds) = 0; - /// \brief set the current collision action - virtual void newCollisionAction(const QString &action) = 0; - /// \brief set the current error action - virtual void newErrorAction(const QString &action) = 0; - /// \brief set one error is detected - virtual void errorDetected() = 0; - /** \brief the max speed used - * in byte per seconds, -1 if not able, 0 if disabled */ - virtual bool setSpeedLimitation(const qint64 &speedLimitation) = 0; - /// \brief get action on the transfer list (add/move/remove) - virtual void getActionOnList(const QList<returnActionOnCopyList> &returnActions) = 0; - /// \brief show the general progression - virtual void setGeneralProgression(const quint64 ¤t,const quint64 &total) = 0; - /// \brief show the file progression - virtual void setFileProgression(const QList<ProgressionItem> &progressionList) = 0; - public: - /// \brief get the widget for the copy engine - virtual QWidget * getOptionsEngineWidget() = 0; - /// \brief to set if the copy engine is found - virtual void getOptionsEngineEnabled(bool isEnabled) = 0; - /// \brief set collision action - virtual void setCollisionAction(const QList<QPair<QString,QString> > &collisionActionList) = 0; - /// \brief set error action - virtual void setErrorAction(const QList<QPair<QString,QString> > &errorActionList) = 0; - /// \brief set the copyType -> file or folder - virtual void setCopyType(CopyType) = 0; - /// \brief set the copyMove -> copy or move, to force in copy or move, else support both - virtual void forceCopyMode(CopyMode) = 0; - /// \brief set if transfer list is exportable/importable - virtual void setTransferListOperation(TransferListOperation transferListOperation) = 0; - /** \brief set if the order is external (like file manager copy) - * to notify the interface, which can hide add folder/filer button */ - virtual void haveExternalOrder() = 0; - /// \brief set if is in pause - virtual void isInPause(bool) = 0; - /* signal to implement - signals: - //set the transfer list - void removeItems(QList<int> ids); - void moveItemsOnTop(QList<int> ids); - void moveItemsUp(QList<int> ids); - void moveItemsDown(QList<int> ids); - void moveItemsOnBottom(QList<int> ids); - void exportTransferList(); - void importTransferList(); - //user ask ask to add folder (add it with interface ask source/destination) - void userAddFolder(CopyMode); - void userAddFile(CopyMode); - void urlDropped(QList<QUrl> urls); - //action on the copy - void pause(); - void resume(); - void skip(quint64 id); - void cancel(); - //edit the action - void sendCollisionAction(QString action); - void sendErrorAction(QString action); - void newSpeedLimitation(qint64);///< -1 if not able, 0 if disabled*/ + /// \brief the new folder is listing + virtual void newFolderListing(const QString &path) = 0; + /** \brief show the detected speed + * in byte per seconds */ + virtual void detectedSpeed(const quint64 &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; + /** \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<Ultracopier::ReturnActionOnCopyList> &returnActions) = 0; + /// \brief show the general progression + virtual void setGeneralProgression(const quint64 ¤t,const quint64 &total) = 0; + /// \brief show the file progression + virtual void setFileProgression(const QList<Ultracopier::ProgressionItem> &progressionList) = 0; + public: + /// \brief get the widget for the copy engine + virtual QWidget * getOptionsEngineWidget() = 0; + /// \brief to set if the copy engine is found + virtual void getOptionsEngineEnabled(const bool &isEnabled) = 0; + /// \brief set the copyType -> file or folder + virtual void setCopyType(const Ultracopier::CopyType&) = 0; + /// \brief set the copyMove -> copy or move, to force in copy or move, else support both + virtual void forceCopyMode(const Ultracopier::CopyMode&) = 0; + /// \brief set if transfer list is exportable/importable + virtual void setTransferListOperation(const Ultracopier::TransferListOperation &transferListOperation) = 0; + /** \brief set if the order is external (like file manager copy) + * to notify the interface, which can hide add folder/filer button */ + virtual void haveExternalOrder() = 0; + /// \brief set if is in pause + virtual void isInPause(const bool &isInPause) = 0; + // signal to implement + signals: + //set the transfer list + void removeItems(const QList<int> &ids) const; + void moveItemsOnTop(const QList<int> &ids) const; + void moveItemsUp(const QList<int> &ids) const; + void moveItemsDown(const QList<int> &ids) const; + void moveItemsOnBottom(const QList<int> &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<QUrl> &urls) const; + //action on the copy + void pause() const; + void resume() const; + void skip(const quint64 &id) const; + void cancel() const; + //edit the action + void newSpeedLimitation(const qint64 &speedLimitation) const;///< -1 if not able, 0 if disabled }; /// \brief To define the interface for the factory to do themes instance class PluginInterface_ThemesFactory : public QObject { - Q_OBJECT - public: - /// \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,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) = 0; - public slots: - /// \brief to reset as default the local options - virtual void resetOptions() = 0; - /// \brief retranslate the language because the language have changed - virtual void newLanguageLoaded() = 0; + Q_OBJECT + public: + /// \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; + /// \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; + public slots: + /// \brief to reset as default the local options + virtual void resetOptions() = 0; + /// \brief retranslate the language because the language have changed + 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; }; -Q_DECLARE_INTERFACE(PluginInterface_ThemesFactory,"first-world.info.ultracopier.PluginInterface.ThemesFactory/0.3.0.8"); +Q_DECLARE_INTERFACE(PluginInterface_ThemesFactory,"first-world.info.ultracopier.PluginInterface.ThemesFactory/1.0.1.0"); #endif // PLUGININTERFACE_THEMES_H |