~gary-wzl77/mcloud/schedule_jobs

« back to all changes in this revision

Viewing changes to include/mcloud/api/downloadtask.h

  • Committer: Gary.Wzl
  • Date: 2016-09-06 09:12:43 UTC
  • Revision ID: gary.wang@canonical.com-20160906091243-vhkez0j19fc9owjk
1.simplify the task creation from list to an item due to the NDA limitation
2.size fixed for tmp file creation.
3.indent fixed and code convention.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#include <mcloud/api/task.h>
24
24
 
25
25
#include <memory>
26
 
#include <string>
27
 
#include <atomic>
28
 
#include <fstream>
29
26
#include <vector>
30
27
 
31
 
namespace tinyxml2 {
32
 
    class XMLElement;
33
 
}
34
 
 
35
28
namespace mcloud {
36
29
namespace api {
37
30
 
47
40
    Task::Buffer_Callback write_cb;
48
41
};
49
42
 
50
 
typedef std::vector<DownloadBuffer> DownloadBufferList;
51
 
 
52
43
class DownloadTaskPriv;
 
44
class SyncManagerPriv;
 
45
 
53
46
/*!
54
47
    \class DownloadTask
55
48
    \brief DownloadTask is a task item that can be accessed from application layer to fetch
127
120
    void cancel() override;
128
121
 
129
122
private:
130
 
    DownloadTask(const tinyxml2::XMLElement *root);
131
 
 
132
 
    DownloadTask(const tinyxml2::XMLElement *root,
133
 
                 Task::Buffer_Callback write_cb);
134
 
 
135
 
    template<typename T>
136
 
    friend class SyncThread;
137
 
    friend class ClientPriv;
138
 
 
139
 
    std::shared_ptr<DownloadTaskPriv>   p;
 
123
    DownloadTask(std::shared_ptr<DownloadTaskPriv> p);
 
124
 
 
125
    friend class SyncManagerPriv;
 
126
 
 
127
    std::shared_ptr<DownloadTaskPriv>   p_;
140
128
};
141
129
 
142
130
}