~jamesh/storage-provider-webdav/delete-item

« back to all changes in this revision

Viewing changes to src/CreateFolderHandler.h

  • Committer: James Henstridge
  • Date: 2016-11-10 09:41:35 UTC
  • Revision ID: james@jamesh.id.au-20161110094135-jxxynpmix0dt49ye
Add handler for create_folder.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#pragma once
 
2
 
 
3
#include <QBuffer>
 
4
#include <QObject>
 
5
#include <QNetworkReply>
 
6
#include <unity/storage/provider/ProviderBase.h>
 
7
 
 
8
#include <memory>
 
9
 
 
10
class DavProvider;
 
11
class RetrieveMetadataHandler;
 
12
 
 
13
class CreateFolderHandler : public QObject {
 
14
    Q_OBJECT
 
15
public:
 
16
    CreateFolderHandler(DavProvider const& provider,
 
17
                        std::string const& parent_id, std::string const& name,
 
18
                        unity::storage::provider::Context const& ctx);
 
19
    ~CreateFolderHandler();
 
20
 
 
21
    boost::future<unity::storage::provider::Item> get_future();
 
22
 
 
23
private Q_SLOTS:
 
24
    void onFinished();
 
25
 
 
26
private:
 
27
    boost::promise<unity::storage::provider::Item> promise_;
 
28
 
 
29
    DavProvider const& provider_;
 
30
    std::string const item_id_;
 
31
    unity::storage::provider::Context const context_;
 
32
 
 
33
    std::unique_ptr<QNetworkReply> mkcol_;
 
34
    std::unique_ptr<RetrieveMetadataHandler> metadata_;
 
35
};