"Fossies" - the Fresh Open Source Software Archive

Member "seafile-client-7.0.4/src/repo-service-helper.h" (19 Nov 2019, 1150 Bytes) of package /linux/www/seafile-client-7.0.4.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "repo-service-helper.h" see the Fossies "Dox" file reference documentation.

    1 #ifndef SEAFILE_CLIENT_REPO_SERVICE_HELPER_H_
    2 #define SEAFILE_CLIENT_REPO_SERVICE_HELPER_H_
    3 
    4 #include <QObject>
    5 #include <QString>
    6 #include <QList>
    7 #include <QScopedPointer>
    8 
    9 #include "account.h"
   10 #include "api/api-error.h"
   11 #include "api/server-repo.h"
   12 #include "filebrowser/seaf-dirent.h"
   13 #include "filebrowser/data-mgr.h"
   14 
   15 class GetDirentsRequest;
   16 class QWidget;
   17 
   18 class FileDownloadHelper : public QObject {
   19     Q_OBJECT
   20 public:
   21     static void openFile(const QString& path, bool work_around_mac_auto_udpate);
   22     FileDownloadHelper(const Account &account, const ServerRepo &repo, const QString &path, QWidget *parent);
   23     ~FileDownloadHelper();
   24     void start();
   25 
   26 private slots:
   27 
   28     void onCancel();
   29     void onGetDirentsSuccess(bool current_readonly, const QList<SeafDirent> &dirents);
   30     void onGetDirentsFailure(const ApiError &)
   31     {
   32         downloadFile(QString());
   33     }
   34 
   35 private:
   36     void downloadFile(const QString &id);
   37 
   38     const Account account_;
   39     const ServerRepo repo_;
   40     const QString path_;
   41     const QString file_name_;
   42     QWidget *parent_;
   43     GetDirentsRequest *req_;
   44 };
   45 
   46 #endif // SEAFILE_CLIENT_REPO_SERVICE_HELPER_H_