Merge lp:~gary-wzl77/mcloud/storage-framework-v2 into lp:mcloud/devel
- storage-framework-v2
- Merge into devel
Status: | Needs review | ||||||||
---|---|---|---|---|---|---|---|---|---|
Proposed branch: | lp:~gary-wzl77/mcloud/storage-framework-v2 | ||||||||
Merge into: | lp:mcloud/devel | ||||||||
Diff against target: |
8532 lines (+2397/-2967) 87 files modified
data/mcloud.pc.in (+1/-1) debian/changelog (+12/-2) debian/control (+8/-6) debian/control.in (+10/-7) debian/libmcloud1.install (+3/-0) debian/libmcloud2.install (+4/-1) debian/rules (+2/-0) doc/Doxyfile.in (+1/-1) include/mcloud/api/client.h (+56/-51) include/mcloud/api/cloudcontent.h (+55/-53) include/mcloud/api/cloudfolder.h (+31/-31) include/mcloud/api/cloudresource.h (+13/-13) include/mcloud/api/diskinfo.h (+2/-2) include/mcloud/api/downloadtask.h (+30/-17) include/mcloud/api/exceptions.h (+49/-49) include/mcloud/api/outlink.h (+4/-4) include/mcloud/api/syncmanager.h (+32/-39) include/mcloud/api/task.h (+10/-10) include/mcloud/api/taskqueue.h (+8/-8) include/mcloud/api/uploadtask.h (+19/-15) provider/CMakeLists.txt (+24/-5) provider/com.canonical.StorageFramework.Provider.Mcloud.service.in (+3/-0) provider/com.canonical.StorageFramework.Provider.McloudProvider.service (+0/-3) provider/main.cpp (+7/-2) provider/mcloudprovider.cpp (+143/-83) provider/mcloudprovider.h (+34/-35) provider/storage-provider-mcloud.application (+11/-0) provider/storage-provider-mcloud.desktop (+5/-0) provider/storage-provider-mcloud.service (+7/-0) src/mcloud/api/client.cpp (+26/-26) src/mcloud/api/client_priv.cpp (+182/-215) src/mcloud/api/client_priv.h (+63/-65) src/mcloud/api/cloudcontent.cpp (+15/-15) src/mcloud/api/cloudfolder.cpp (+11/-11) src/mcloud/api/diskinfo.cpp (+3/-3) src/mcloud/api/downloadtask.cpp (+11/-11) src/mcloud/api/downloadtask_priv.cpp (+17/-18) src/mcloud/api/downloadtask_priv.h (+20/-20) src/mcloud/api/outlink.cpp (+4/-4) src/mcloud/api/syncmanager.cpp (+7/-13) src/mcloud/api/syncmanager_priv.cpp (+13/-23) src/mcloud/api/syncmanager_priv.h (+7/-9) src/mcloud/api/syncthread.cpp (+18/-19) src/mcloud/api/taskhandler.h (+15/-15) src/mcloud/api/uploadtask.cpp (+11/-11) src/mcloud/api/uploadtask_priv.cpp (+60/-57) src/mcloud/api/uploadtask_priv.h (+27/-27) tests/server/resources/1011YfnDD09x03920151110171910rox.xml (+1/-0) tests/server/resources/1811asktx23a00019700101000000001.backup.xml (+1/-0) tests/server/resources/1811asktx23a00019700101000000001.single.xml (+1/-0) tests/server/resources/1811asktx23a00019700101000000001_index_101.xml (+93/-1) tests/server/resources/1811asktx23a057201605161542175lg.xml (+1/-0) tests/server/resources/1811asktx23a058201609111803007pu.xml (+1/-0) tests/server/resources/content_1811asktx23a05520160718170034xh1.xml (+1/-1) tests/server/resources/copy_1811asktx23a057201605161542175gg.xml (+1/-0) tests/server/resources/download-file-request-template.xml (+1/-1) tests/server/resources/no_such_content_id.xml (+1/-0) tests/server/resources/no_such_folder_id.xml (+1/-1) tests/server/server.py (+102/-56) tests/unit/mcloud-provider/CMakeLists.txt (+5/-18) tests/unit/mcloud-provider/data/provider.xml (+0/-263) tests/unit/mcloud-provider/mcloud-provider-unit-test.cpp (+899/-0) tests/unit/mcloud-provider/mcloud-provider-unit-tests.cpp (+0/-641) tests/unit/mcloud-provider/storage-framework-internal/CMakeLists.txt (+0/-10) tests/unit/mcloud-provider/storage-framework-internal/include/unity/storage/common.h (+0/-41) tests/unit/mcloud-provider/storage-framework-internal/include/unity/storage/internal/ItemMetadata.h (+0/-51) tests/unit/mcloud-provider/storage-framework-internal/include/unity/storage/internal/TraceMessageHandler.h (+0/-47) tests/unit/mcloud-provider/storage-framework-internal/include/unity/storage/internal/dbus_error.h (+0/-32) tests/unit/mcloud-provider/storage-framework-internal/include/unity/storage/internal/dbusmarshal.h (+0/-45) tests/unit/mcloud-provider/storage-framework-internal/include/unity/storage/internal/safe_strerror.h (+0/-34) tests/unit/mcloud-provider/storage-framework-internal/include/unity/storage/visibility.h (+0/-22) tests/unit/mcloud-provider/storage-framework-internal/src/CMakeLists.txt (+0/-1) tests/unit/mcloud-provider/storage-framework-internal/src/internal/CMakeLists.txt (+0/-10) tests/unit/mcloud-provider/storage-framework-internal/src/internal/TraceMessageHandler.cpp (+0/-96) tests/unit/mcloud-provider/storage-framework-internal/src/internal/dbusmarshal.cpp (+0/-113) tests/unit/mcloud-provider/storage-framework-internal/src/internal/safe_strerror.cpp (+0/-72) tests/unit/mcloud-provider/utils/CMakeLists.txt (+6/-24) tests/unit/mcloud-provider/utils/DBusEnvironment.cpp (+0/-11) tests/unit/mcloud-provider/utils/DBusEnvironment.h (+0/-1) tests/unit/mcloud-provider/utils/ProviderEnvironment.cpp (+55/-0) tests/unit/mcloud-provider/utils/ProviderEnvironment.h (+30/-0) tests/unit/mcloud-provider/utils/ProviderFixture.cpp (+0/-81) tests/unit/mcloud-provider/utils/ProviderFixture.h (+0/-50) tests/unit/mcloud-provider/utils/com.ubuntu.OnlineAccounts.Manager.xml (+0/-153) tests/unit/mcloud-provider/utils/fake-online-accounts-daemon.py (+6/-3) tests/unit/mcloud/api/mcloud-rest-test.cpp (+45/-29) tests/unit/mcloud/api/mcloud-sync-test.cpp (+52/-59) |
||||||||
To merge this branch: | bzr merge lp:~gary-wzl77/mcloud/storage-framework-v2 | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
unity-api-1-bot | continuous-integration | Approve | |
mcloud-team | Pending | ||
Review via email:
|
Commit message
1. adapted to storage-fw client v2 API(Fixed: 1638439).
2. add missing dependency(
3. generate job upload id with uuid.
4. use new service name to avoid conflict with mcloud-scope.
5. Ignore SIGPIPE in case of downloader is canceled when downloading(Fixed: 1641541).
6.bump version up due to ABI changed.
Description of the change
1. adapted to storage-fw client v2 API(Fixed: 1638439).
2. add missing dependency(
3. generate job upload id with uuid.
4. use new service name to avoid conflict with mcloud-scope.
5. Ignore SIGPIPE in case of downloader is canceled when downloading(Fixed: 1641541).
6.bump version up due to ABI changed.

unity-api-1-bot (unity-api-1-bot) wrote : | # |

unity-api-1-bot (unity-api-1-bot) wrote : | # |
PASSED: Continuous integration, rev:28
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/

unity-api-1-bot (unity-api-1-bot) wrote : | # |
FAILED: Continuous integration, rev:29
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/

unity-api-1-bot (unity-api-1-bot) wrote : | # |
PASSED: Continuous integration, rev:30
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Unmerged revisions
- 30. By Gary.Wang
-
Fixed gtest sign-compare warning.
- 29. By Gary.Wang
-
1.fixed mcloud provider installation path and exec path in dbus service.
2.add prefix name(mcloud) for non-standard metadata. - 28. By Gary.Wang
-
1. merge from devel
2. add storage quota test case for code coverage purpose. - 27. By Gary.Wang
-
1.update dbus type signature to fit for online-account-api ABI change.
2.libstorage-framework- qt-client- 2-0 package is not added into depends of storage- framework- client- dev. add it into build-depends in onedrive debian/control file to avoid linking error. - 26. By Gary.Wang
-
* adapted to storage-fw client v2 API(Fixed: 1638439).
* use new service name to avoid conflict with mcloud-scope.
* Ignore SIGPIPE in case of downloader is canceled when downlaoding(Fixed: 1641541). - 25. By Gary.Wang
-
update onedrive account service id in fake daemon.
- 24. By Gary.Wang
-
update account service id.
- 23. By Gary.Wang
-
Add provider desktop, service as well as application file. Get rid of old service id.
- 22. By Gary.Wang
-
simplify the test cases.
- 21. By Gary.Wang
-
add more unit tests(delete, update, list_invalid).
Preview Diff
1 | === modified file 'data/mcloud.pc.in' |
2 | --- data/mcloud.pc.in 2016-04-20 04:19:28 +0000 |
3 | +++ data/mcloud.pc.in 2016-12-07 12:44:11 +0000 |
4 | @@ -4,7 +4,7 @@ |
5 | includedir=${exec_prefix}/include |
6 | |
7 | Name: @CMAKE_PROJECT_NAME@ |
8 | -Description: Cloud based content sharing library for CMCC mcloud service |
9 | +Description: A cloud based content sharing library for CMCC mcloud service |
10 | Version: @MCLOUD_LIB_VERSION_MAJOR@.@MCLOUD_LIB_VERSION_MINOR@.@MCLOUD_LIB_VERSION_PATCH@ |
11 | Libs: -L${libdir} -lmcloud |
12 | Cflags: -I${includedir} |
13 | |
14 | === modified file 'debian/changelog' |
15 | --- debian/changelog 2016-10-26 09:19:14 +0000 |
16 | +++ debian/changelog 2016-12-07 12:44:11 +0000 |
17 | @@ -1,10 +1,20 @@ |
18 | mcloud (2.0.0-0ubuntu1) UNRELEASED; urgency=medium |
19 | |
20 | [ Gary.Wzl] |
21 | + * adapted to storage-fw client v2 API(Fixed: 1638439). |
22 | * add missing dependency(account-plugin-mcloud) |
23 | * generate job upload id with uuid. |
24 | - |
25 | - -- Gary.Wang <gary.wang@canonical.com> Wed, 26 Oct 2016 16:58:11 +0800 |
26 | + * use new service name to avoid conflict with mcloud-scope. |
27 | + * Ignore SIGPIPE in case of downloader is canceled when downlaoding(Fixed: 1641541). |
28 | + |
29 | + -- Gary.Wang <gary.wang@canonical.com> Fri, 18 Nov 2016 15:02:11 +0800 |
30 | + |
31 | +mcloud (1.0.0+17.04.20161107.3-0ubuntu1) zesty; urgency=medium |
32 | + |
33 | + * Update to compile with Boost 1.62 (as found on zesty) and storage- |
34 | + framework 0.2. |
35 | + |
36 | + -- James Henstridge <james.henstridge@canonical.com> Mon, 07 Nov 2016 02:02:55 +0000 |
37 | |
38 | mcloud (1.0.0+16.10.20160927.3-0ubuntu1) yakkety; urgency=medium |
39 | |
40 | |
41 | === modified file 'debian/control' |
42 | --- debian/control 2016-09-29 10:10:59 +0000 |
43 | +++ debian/control 2016-12-07 12:44:11 +0000 |
44 | @@ -20,17 +20,19 @@ |
45 | libtinyxml2-dev, |
46 | libssl-dev, |
47 | libprocess-cpp-dev, |
48 | - storage-framework-provider-dev, |
49 | + storage-framework-provider-dev (>= 0.2), |
50 | + storage-framework-client-dev (>= 0.2), |
51 | pkg-config, |
52 | python-tornado, |
53 | libonline-accounts-qt-dev, |
54 | - libqtdbustest1-dev, |
55 | qtbase5-dev, |
56 | qtbase5-dev-tools, |
57 | python3-dbus, |
58 | python3-gi, |
59 | - libglib2.0-dev, |
60 | lsb-release, |
61 | +# libstorage-framework-qt-client-2-0 package is not added into Depends of storage-framework-client-dev |
62 | +# add the package to avoid linking error. |
63 | + libstorage-framework-qt-client-2-0, |
64 | Standards-Version: 3.9.5 |
65 | Section: libs |
66 | Homepage: https://launchpad.net/mcloud |
67 | @@ -46,7 +48,7 @@ |
68 | account-plugin-mcloud, |
69 | Description: A C++ library for open API of cmcc mcloud service |
70 | Mcloud API provides developers easily access to authenticated |
71 | - user's cmcc mcloud resources. |
72 | + user's cmcc mcloud resources and a storage provider. |
73 | . |
74 | This package includes the mcloud runtime libraries. |
75 | |
76 | @@ -59,7 +61,7 @@ |
77 | ${misc:Depends}, |
78 | Description: A C++ library for open API of cmcc mcloud service |
79 | Mcloud API provides developers easily access to authenticated |
80 | - user's cmcc mcloud resources. |
81 | + user's cmcc mcloud resources and a storage provider. |
82 | . |
83 | This package includes all the development headers and libraries for |
84 | mcloud. |
85 | @@ -71,6 +73,6 @@ |
86 | Suggests: libmcloud-dev, |
87 | Description: A C++ library for open API of cmcc mcloud service |
88 | Mcloud API provides developers easily access to authenticated |
89 | - user's cmcc mcloud resources. |
90 | + user's cmcc mcloud resources and a storage provider. |
91 | . |
92 | This package includes documentation files for libmcloud development. |
93 | |
94 | === modified file 'debian/control.in' |
95 | --- debian/control.in 2016-09-29 10:10:59 +0000 |
96 | +++ debian/control.in 2016-12-07 12:44:11 +0000 |
97 | @@ -15,17 +15,20 @@ |
98 | libtinyxml2-dev, |
99 | libssl-dev, |
100 | libprocess-cpp-dev, |
101 | - storage-framework-provider-dev, |
102 | + storage-framework-provider-dev (>= 0.2), |
103 | + storage-framework-client-dev (>= 0.2), |
104 | pkg-config, |
105 | python-tornado, |
106 | libonline-accounts-qt-dev, |
107 | - libqtdbustest1-dev, |
108 | qtbase5-dev, |
109 | qtbase5-dev-tools, |
110 | python3-dbus, |
111 | python3-gi, |
112 | - libglib2.0-dev, |
113 | lsb-release, |
114 | + libqtdbustest1-dev, |
115 | +# libstorage-framework-qt-client-2-0 package is not added into Depends of storage-framework-client-dev |
116 | +# add the package to avoid linking error. |
117 | + libstorage-framework-qt-client-2-0, |
118 | Standards-Version: 3.9.5 |
119 | Section: libs |
120 | Homepage: https://launchpad.net/mcloud |
121 | @@ -41,9 +44,9 @@ |
122 | account-plugin-mcloud, |
123 | Description: A C++ library for open API of cmcc mcloud service |
124 | Mcloud API provides developers easily access to authenticated |
125 | - user's cmcc mcloud resources. |
126 | + user's cmcc mcloud resources and a storage provider. |
127 | . |
128 | - This package includes the mcloud runtime libraries. |
129 | + This package includes the mcloud runtime libraries and a storage provider. |
130 | |
131 | Package: libmcloud-dev |
132 | Section: libdevel |
133 | @@ -54,7 +57,7 @@ |
134 | ${misc:Depends}, |
135 | Description: A C++ library for open API of cmcc mcloud service |
136 | Mcloud API provides developers easily access to authenticated |
137 | - user's cmcc mcloud resources. |
138 | + user's cmcc mcloud resources and a storage provider. |
139 | . |
140 | This package includes all the development headers and libraries for |
141 | mcloud. |
142 | @@ -66,6 +69,6 @@ |
143 | Suggests: libmcloud-dev, |
144 | Description: A C++ library for open API of cmcc mcloud service |
145 | Mcloud API provides developers easily access to authenticated |
146 | - user's cmcc mcloud resources. |
147 | + user's cmcc mcloud resources and a storage provider. |
148 | . |
149 | This package includes documentation files for libmcloud development. |
150 | |
151 | === modified file 'debian/libmcloud1.install' |
152 | --- debian/libmcloud1.install 2016-10-26 09:19:14 +0000 |
153 | +++ debian/libmcloud1.install 2016-12-07 12:44:11 +0000 |
154 | @@ -1,3 +1,6 @@ |
155 | usr/lib/*/lib*.so.* |
156 | usr/bin/* |
157 | usr/share/dbus-1/services/* |
158 | +usr/share/accounts/services/* |
159 | +usr/share/accounts/applications/* |
160 | +usr/share/applications/* |
161 | |
162 | === modified file 'debian/libmcloud2.install' |
163 | --- debian/libmcloud2.install 2016-10-26 09:19:14 +0000 |
164 | +++ debian/libmcloud2.install 2016-12-07 12:44:11 +0000 |
165 | @@ -1,3 +1,6 @@ |
166 | usr/lib/*/lib*.so.* |
167 | -usr/bin/* |
168 | +usr/lib/*/mcloud/* |
169 | usr/share/dbus-1/services/* |
170 | +usr/share/accounts/services/* |
171 | +usr/share/accounts/applications/* |
172 | +usr/share/applications/* |
173 | |
174 | === modified file 'debian/rules' |
175 | --- debian/rules 2016-09-17 14:21:57 +0000 |
176 | +++ debian/rules 2016-12-07 12:44:11 +0000 |
177 | @@ -1,6 +1,8 @@ |
178 | #!/usr/bin/make -f |
179 | # -*- makefile -*- |
180 | |
181 | +export QT_SELECT=qt5 |
182 | + |
183 | export DPKG_GENSYMBOLS_CHECK_LEVEL=4 |
184 | |
185 | include /usr/share/dpkg/default.mk |
186 | |
187 | === modified file 'doc/Doxyfile.in' |
188 | --- doc/Doxyfile.in 2016-04-15 07:55:24 +0000 |
189 | +++ doc/Doxyfile.in 2016-12-07 12:44:11 +0000 |
190 | @@ -38,7 +38,7 @@ |
191 | # for a project that appears at the top of each page and should give viewer |
192 | # a quick idea about the purpose of the project. Keep the description short. |
193 | |
194 | -PROJECT_BRIEF = "MCloud API library for cmcc cloud service" |
195 | +PROJECT_BRIEF = "An open API library for cmcc cloud service and a storage provider" |
196 | |
197 | # With the PROJECT_LOGO tag one can specify an logo or icon that is |
198 | # included in the documentation. The maximum height of the logo should not |
199 | |
200 | === modified file 'include/mcloud/api/client.h' |
201 | --- include/mcloud/api/client.h 2016-10-26 08:50:32 +0000 |
202 | +++ include/mcloud/api/client.h 2016-12-07 12:44:11 +0000 |
203 | @@ -73,7 +73,7 @@ |
204 | typedef std::vector<std::string> Stringlist; |
205 | |
206 | /*! |
207 | - * \brief Constructs a Mcloud Client object with \a request_timeout seconds. |
208 | + * \brief Constructs the Mcloud Client object with \a request_timeout seconds. |
209 | * Meanwhile client launches sync-up manager to deal with task download and upload by default. |
210 | */ |
211 | Client(int request_timeout = 10); |
212 | @@ -85,43 +85,46 @@ |
213 | virtual ~Client(); |
214 | |
215 | /*! |
216 | - * \brief Set \a access_token to authenticate all mcloud API calls with the bearer HTTP authorization scheme. |
217 | + * \brief Set the \a access_token to authenticate all mcloud API calls with the bearer HTTP authorization scheme. |
218 | * The access token can be fetched through ubuntu sso services. |
219 | + * \sa refresh_token. |
220 | */ |
221 | void set_access_token(const std::string& access_token); |
222 | |
223 | /*! |
224 | - * \brief Retrieves and refreshes access token by using \a refresh_token. |
225 | + * \brief Retrieves and refreshes access token by using the \a refresh_token. |
226 | * The refresh token can be fetched through ubuntu sso services. |
227 | - * \throw std::runtime_error if error occurs. |
228 | + * \throw mcloud specific exceptions or std::runtime_error if error occurs. |
229 | * \returns true if access token is refreshed, otherwise returns false. |
230 | + * \sa set_access_token. |
231 | */ |
232 | bool refresh_token(const std::string& refresh_token); |
233 | |
234 | /*! |
235 | - * \brief Returns login user's clcoud storage info. |
236 | - * \throw std::runtime_error if error occurs. |
237 | - * @sa DiskInfo |
238 | + * \brief Returns the login user's clcoud storage info. |
239 | + * \throw mcloud specific exceptions or std::runtime_error if error occurs. |
240 | + * \sa DiskInfo |
241 | */ |
242 | DiskInfo::Ptr disk_info(); |
243 | |
244 | /*! |
245 | - * \brief Returns root folder id on mlcoud for third-party app to use, such as mcloud-lib. |
246 | - * \throw std::runtime_error if error occurs. |
247 | - * \note there're a few folders on a cmcc user's mcloud directory, but only one can be used for |
248 | + * \brief Returns the root folder id on mlcoud. |
249 | + * \throw mcloud specific exceptions or std::runtime_error if error occurs. |
250 | + * \note there're a few folders on a cmcc user's root directory, but only one can be used for |
251 | * content synchronization by third-party client. We regard it as the root folder for mcloud thrid-party app. |
252 | - * \sa cloud_content_list() |
253 | + * \sa cloud_content_list(). |
254 | */ |
255 | - std::string cloud_root_folder_id(); |
256 | + std::string root_folder_id(); |
257 | |
258 | /*! |
259 | - * \brief Returns a cloud item list under one specific folder \a folder_id with a given type \a content_type. |
260 | - * if \a folder_id is empty, returns contents under root folder of cloud. \a content_type is |
261 | - * CloudContent::Type::All by default. The fetched content count is 200 at most per call. |
262 | - * \a start_index indicates the first index of the requested content list on mcloud. |
263 | - * \a count indicates the maximum number of content items per call. |
264 | - * \throw std::runtime_error if error occurs. |
265 | - * \sa CloudContent::Type cloud_root_folder_id() |
266 | + * \brief Returns the cloud item list under one specific folder \a folder_id with a given type \a content_type. |
267 | + * if the \a folder_id is empty, returns contents under root folder of mcloud. |
268 | + * The \a content_type is CloudContent::Type::All by default. |
269 | + * The fetched content count is 200 at most per call. |
270 | + * The \a start_index indicates the first index of the requested content list on mcloud. |
271 | + * The \a count indicates the maximum number of content items per call. |
272 | + * \throw mcloud specific exceptions or std::runtime_error if error occurs. |
273 | + * \sa CloudContent::Type root_folder_id(). |
274 | */ |
275 | ResourceList cloud_content_list(int start_index, |
276 | int count, |
277 | @@ -129,27 +132,28 @@ |
278 | const std::string& folder_id = std::string()); |
279 | |
280 | /*! |
281 | - * \brief Returns a cloud content object if a content \a content_id exists on mcloud. |
282 | + * \brief Returns the cloud content object if the content with a given \a content_id exists on mcloud. |
283 | + * It contains all available metadata |
284 | * otherwise return nullptr. |
285 | - * \throw std::runtime_error if error occurs. |
286 | - * \sa delete_contents(), move_items() |
287 | + * \throw mcloud specific exceptions or std::runtime_error if error occurs. |
288 | + * \sa delete_contents(), move_items(). |
289 | */ |
290 | CloudContent::Ptr content_info(const std::string& content_id); |
291 | |
292 | /*! |
293 | - * \brief Returns a cloud folder object if a folder with \a folder_name is created under a given \a folder_id folder. |
294 | + * \brief Returns the cloud folder object if the folder with a given \a folder_name is created under a given \a folder_id folder. |
295 | * otherwise return nullptr. |
296 | - * \throw std::runtime_error if error occurs. |
297 | - * \sa delete_contents(), move_items() |
298 | + * \throw mcloud specific exceptions or std::runtime_error if error occurs. |
299 | + * \sa delete_contents(), move_items(). |
300 | */ |
301 | CloudFolder::Ptr create_folder(const std::string& folder_name, |
302 | const std::string& folder_id); |
303 | |
304 | /*! |
305 | - * \brief Returns a cloud item list if there are available items that matches with \a name under a given \a folder_id folder. |
306 | + * \brief Returns the cloud item list if there are available items that matches with the \a name under a given \a folder_id folder. |
307 | * \a property holds the property of cloud item, it can be content(default) or folder. |
308 | - * \throw std::runtime_error if error occurs. |
309 | - * \sa delete_contents(), move_items(), metadata() |
310 | + * \throw mcloud specific exceptions or std::runtime_error if error occurs. |
311 | + * \sa delete_contents(), move_items(), metadata(). |
312 | */ |
313 | |
314 | [[gnu::deprecated("cmcc closes this api for security reason")]] |
315 | @@ -159,73 +163,74 @@ |
316 | |
317 | /*! |
318 | * \brief Creates folders sharing url object with a given \a folder_ids. |
319 | - * \throw std::runtime_error if error occurs. |
320 | + * \throw mcloud specific exceptions or std::runtime_error if error occurs. |
321 | * \sa create_content_sharing_url() |
322 | - * \return a list of Outlink after sharing urls are created. |
323 | + * \return the list of Outlink if sharing urls are created. |
324 | */ |
325 | OutlinkList create_folder_sharing_url(const Stringlist& folder_ids); |
326 | |
327 | /*! |
328 | * \brief Creates a content_sharing url object with a given \a content_ids. |
329 | - * \throw std::runtime_error if error occurs. |
330 | + * \throw mcloud specific exceptions or std::runtime_error if error occurs. |
331 | * \sa create_folder_sharing_url() |
332 | - * \return a list of Outlink after sharing urls are created. |
333 | + * \return a list of Outlink if sharing urls are created. |
334 | */ |
335 | OutlinkList create_content_sharing_url(const Stringlist& content_ids); |
336 | |
337 | /*! |
338 | - * \brief Returns folder id list if folders \a folder_ids are copies to another folder with a given \a folder_id on mcloud |
339 | - * \throw std::runtime_error if error occurs. |
340 | + * \brief Returns the folder id list if folders \a folder_ids are copies to another folder with a given \a folder_id on mcloud. |
341 | + * \throw mcloud specific exceptions or std::runtime_error if error occurs. |
342 | * \note the destination folder \a folder_id should not be the same as the folders' \a folder_ids folder ids. |
343 | - * \sa move_items(), update_folder(), copy_contents() |
344 | + * \sa move_items(), update_folder(), copy_contents(). |
345 | */ |
346 | Client::Stringlist copy_folders(const Stringlist& folder_ids, |
347 | const std::string& folder_id); |
348 | |
349 | /*! |
350 | - * \brief Returns content id list if contents \a content_ids are copies to another folder with a given \a folder_id on mcloud. |
351 | - * \throw std::runtime_error if error occurs. |
352 | + * \brief Returns the content id list if contents \a content_ids are copies to another folder with a given \a folder_id on mcloud. |
353 | + * \throw mcloud specific exceptions or std::runtime_error if error occurs. |
354 | * \note the destination folder \a folder_id should not be the same as the contents' \a contents_ids folder id. |
355 | - * \sa move_items(), update_folder(), copy_folders() |
356 | + * \sa move_items(), update_folder(), copy_folders(). |
357 | */ |
358 | Client::Stringlist copy_contents(const Stringlist& contents_ids, |
359 | const std::string& folder_id); |
360 | |
361 | /*! |
362 | - * \brief Returns true if \a folders with a given folder_ids and \a contents with a given \a content_ids |
363 | + * \brief Returns true if the folders with a given \a folder_ids and the contents with a given \a content_ids |
364 | * are successfully moved to new folder with a given \a folder_id. |
365 | - * \throw std::runtime_error if error occurs. |
366 | - * \sa delete_contents(), copy_folders(), copy_contents() |
367 | + * \throw mcloud specific exceptions or std::runtime_error if error occurs. |
368 | + * \sa delete_contents(), copy_folders(), copy_contents(). |
369 | */ |
370 | bool move_items(const Stringlist& folder_ids, |
371 | const Stringlist& content_ids, |
372 | const std::string& folder_id); |
373 | |
374 | /*! |
375 | - * \brief Returns true if folder \a folder_id are updated with \a new_folder_name, otherwise return false. |
376 | - * \throw std::runtime_error if error occurs. |
377 | - * \sa delete_contents(), copy_folders(), |
378 | + * \brief Returns true if the folder \a folder_id are updated with a given \a new_folder_name, otherwise return false. |
379 | + * \throw mcloud specific exceptions or std::runtime_error if error occurs. |
380 | + * \sa delete_contents(), copy_folders(). |
381 | */ |
382 | bool update_folder(const std::string& folder_id, |
383 | const std::string& new_folder_name); |
384 | |
385 | /*! |
386 | - * \brief Returns true if contents \a content_ids are deleted, otherwise return false. |
387 | - * \throw std::runtime_error if error occurs. |
388 | - * \sa move_items(), content_info(), copy_contents() |
389 | + * \brief Returns true if the contents with a given \a content_ids are deleted, otherwise return false. |
390 | + * \throw mcloud specific exceptions or std::runtime_error if error occurs. |
391 | + * \sa move_items(), content_info(), copy_contents(). |
392 | */ |
393 | bool delete_contents(const Stringlist& content_ids); |
394 | |
395 | /*! |
396 | - * \brief Returns true if a local file \a file_path exists in folder with \a folder_id on cloud, |
397 | - * otherwise return false. Searches root folder if folder_id is empty(); |
398 | - * \throw std::runtime_error if error occurs. |
399 | + * \brief Mcloud provides a way to compare the file's sum of md5 with existing files under \a folder_id. Returns true if the same file content can be found on mcloud. |
400 | + * otherwise return false. |
401 | + * \note if the \a folder_id is empty, checks if the local file exists in root folder. |
402 | + * \throw mcloud specific exceptions or std::runtime_error if error occurs. |
403 | */ |
404 | bool exist_on_cloud(const std::string& file_path, |
405 | const std::string& folder_id = std::string()); |
406 | |
407 | /*! |
408 | - * \brief Returns a sync-up manager running on the background. |
409 | + * \brief Returns the sync-up manager running on the background. |
410 | * sync-up manager scheduled tasks \sa start, pause, cancel for content upload and download. |
411 | */ |
412 | SyncManager::Ptr syncmanager() const; |
413 | |
414 | === modified file 'include/mcloud/api/cloudcontent.h' |
415 | --- include/mcloud/api/cloudcontent.h 2016-10-26 08:50:32 +0000 |
416 | +++ include/mcloud/api/cloudcontent.h 2016-12-07 12:44:11 +0000 |
417 | @@ -23,7 +23,7 @@ |
418 | #include <mcloud/api/visibility.h> |
419 | |
420 | namespace tinyxml2 { |
421 | -class XMLElement; |
422 | + class XMLElement; |
423 | } |
424 | |
425 | namespace mcloud { |
426 | @@ -32,7 +32,7 @@ |
427 | /*! |
428 | \class CloudContent |
429 | \brief CloudContent represents a content object on mcloud. |
430 | - the supported content type can be found \sa CloudContent::Type |
431 | + the supported content types can be found \sa CloudContent::Type |
432 | */ |
433 | |
434 | class MCLOUD_API_DLL_PUBLIC CloudContent: public CloudResource { |
435 | @@ -40,7 +40,7 @@ |
436 | typedef std::shared_ptr<CloudContent> Ptr; |
437 | |
438 | /*! |
439 | - * \brief All Content type . |
440 | + * \brief All Content type. |
441 | */ |
442 | enum class Type { |
443 | All, ///< all kinds of content type |
444 | @@ -56,85 +56,87 @@ |
445 | ~CloudContent(); |
446 | |
447 | /*! |
448 | - * \brief Returns a unique id of cloud content object. |
449 | + * \brief Returns the content's a unique id on mcloud. |
450 | */ |
451 | - const std::string& id() const override; |
452 | + const std::string &id() const override; |
453 | |
454 | /*! |
455 | - * \brief Returns the name of cloud content object. |
456 | + * \brief Returns the content's display name on mcloud. |
457 | */ |
458 | - const std::string& name() const override; |
459 | + const std::string &name() const override; |
460 | |
461 | /*! |
462 | * \brief Returns the datetime when content was created. |
463 | */ |
464 | - const std::time_t& created_date() const override; |
465 | + const std::time_t &created_date() const override; |
466 | |
467 | /*! |
468 | * \brief Returns the datetime when content was updated. |
469 | */ |
470 | - const std::time_t& updated_date() const override; |
471 | - |
472 | - /*! |
473 | - * \brief Returns a unique parent folder id of cloud content object. |
474 | - */ |
475 | - const std::string& parent_catalog_id() const override; |
476 | - |
477 | - /*! |
478 | - * \brief Returns etag of a content object. |
479 | - */ |
480 | - const std::string& etag() const override; |
481 | - |
482 | - /*! |
483 | - * \brief Returns owner id of a content object. |
484 | - */ |
485 | - const std::string& owner() const override; |
486 | - |
487 | - /*! |
488 | - * \brief Returns resource type of an object. |
489 | + const std::time_t &updated_date() const override; |
490 | + |
491 | + /*! |
492 | + * \brief Returns the content's unique parent folder id. |
493 | + */ |
494 | + const std::string &parent_catalog_id() const override; |
495 | + |
496 | + /*! |
497 | + * \brief Returns the content's etag. |
498 | + */ |
499 | + const std::string &etag() const override; |
500 | + |
501 | + /*! |
502 | + * \brief Returns the content's owner id. |
503 | + */ |
504 | + const std::string &owner() const override; |
505 | + |
506 | + /*! |
507 | + * \brief Returns the content's resource type. |
508 | + * \sa CloudResource::Property. |
509 | */ |
510 | CloudResource::Property property() const override; |
511 | |
512 | /*! |
513 | - * \brief Returns extension of a content object. |
514 | + * \brief Returns the content's file extension. |
515 | */ |
516 | - const std::string& suffix() const; |
517 | + const std::string &suffix() const; |
518 | |
519 | /*! |
520 | - * \brief Returns content type of an object. |
521 | + * \brief Returns the content's type. |
522 | + * \sa Content::Type. |
523 | */ |
524 | Type type() const; |
525 | |
526 | /*! |
527 | - * \brief Returns content size of an object in bytes. |
528 | + * \brief Returns the content' size. |
529 | */ |
530 | int64_t content_size() const; |
531 | |
532 | /*! |
533 | - * \brief Returns the description of a content object. |
534 | - */ |
535 | - const std::string& description() const; |
536 | - |
537 | - /*! |
538 | - * \brief Returns thumbnail link of a content object. |
539 | - * It will be empty if there is no such a field in response. |
540 | - */ |
541 | - const std::string& thumbnail_url() const; |
542 | - |
543 | - /*! |
544 | - * \brief Returns big thumbnail link of a content object, |
545 | - * It will be empty if there is no such a field in response. |
546 | - */ |
547 | - const std::string& big_thumbnail_url() const; |
548 | - |
549 | - /*! |
550 | - * \brief Returns a external playable link of a media content object, |
551 | - * It will be empty if there is no such a field in response. |
552 | - */ |
553 | - const std::string& present_url() const; |
554 | + * \brief Returns the content's description. |
555 | + */ |
556 | + const std::string &description() const; |
557 | + |
558 | + /*! |
559 | + * \brief Returns the content's thumbnail link. |
560 | + * It will be empty if there is no such field in response. |
561 | + */ |
562 | + const std::string &thumbnail_url() const; |
563 | + |
564 | + /*! |
565 | + * \brief Returns the content's high definition thumbnail link. |
566 | + * It will be empty if there is no such a field in response. |
567 | + */ |
568 | + const std::string &big_thumbnail_url() const; |
569 | + |
570 | + /*! |
571 | + * \brief Returns the link for opening the file in a viewer in a browser. |
572 | + * It will be empty if there is no such field in response. |
573 | + */ |
574 | + const std::string &present_url() const; |
575 | |
576 | private: |
577 | - CloudContent(const tinyxml2::XMLElement* root); |
578 | + CloudContent(const tinyxml2::XMLElement *root); |
579 | |
580 | friend class ClientPriv; |
581 | |
582 | |
583 | === modified file 'include/mcloud/api/cloudfolder.h' |
584 | --- include/mcloud/api/cloudfolder.h 2016-10-26 08:50:32 +0000 |
585 | +++ include/mcloud/api/cloudfolder.h 2016-12-07 12:44:11 +0000 |
586 | @@ -23,7 +23,7 @@ |
587 | #include <mcloud/api/visibility.h> |
588 | |
589 | namespace tinyxml2 { |
590 | -class XMLElement; |
591 | + class XMLElement; |
592 | } |
593 | |
594 | namespace mcloud { |
595 | @@ -52,59 +52,59 @@ |
596 | ~CloudFolder(); |
597 | |
598 | /*! |
599 | - * \brief Returns a unique id of cloud folder object. |
600 | + * \brief Returns the folder's unique id on mcloud. |
601 | */ |
602 | - const std::string& id() const override; |
603 | + const std::string &id() const override; |
604 | |
605 | /*! |
606 | - * \brief Returns the name of cloud folder object. |
607 | + * \brief Returns the folder's display name on mcloud. |
608 | */ |
609 | - const std::string& name() const override; |
610 | + const std::string &name() const override; |
611 | |
612 | /*! |
613 | * \brief Returns the datetime when folder was created. |
614 | */ |
615 | - const std::time_t& created_date() const override; |
616 | + const std::time_t &created_date() const override; |
617 | |
618 | /*! |
619 | * \brief Returns the datetime when folder was updated. |
620 | */ |
621 | - const std::time_t& updated_date() const override; |
622 | - |
623 | - /*! |
624 | - * \brief Returns a unique id of the parent folder. |
625 | - */ |
626 | - const std::string& parent_catalog_id() const override; |
627 | - |
628 | - /*! |
629 | - * \brief Returns etag of a folder object. |
630 | - */ |
631 | - const std::string& etag() const override; |
632 | - |
633 | - /*! |
634 | - * \brief Returns owner id of a folder object. |
635 | - */ |
636 | - const std::string& owner() const override; |
637 | - |
638 | - /*! |
639 | - * \brief Returns resource property of an object. |
640 | - * \sa CloudResource::Property |
641 | + const std::time_t &updated_date() const override; |
642 | + |
643 | + /*! |
644 | + * \brief Returns the folder's unique parent folder id. |
645 | + */ |
646 | + const std::string &parent_catalog_id() const override; |
647 | + |
648 | + /*! |
649 | + * \brief Returns the folder's etag. |
650 | + */ |
651 | + const std::string &etag() const override; |
652 | + |
653 | + /*! |
654 | + * \brief Returns the folder's owner id. |
655 | + */ |
656 | + const std::string &owner() const override; |
657 | + |
658 | + /*! |
659 | + * \brief Returns the folder's resource property. |
660 | + * \sa CloudResource::Property. |
661 | */ |
662 | CloudResource::Property property() const override; |
663 | |
664 | /*! |
665 | - * \brief Returns type of this folder object. |
666 | - * \sa Type |
667 | + * \brief Returns the folder's type. |
668 | + * \sa CloudFolder::Type |
669 | */ |
670 | Type folder_type() const; |
671 | |
672 | /*! |
673 | - * \brief Returns a current folder's path. |
674 | + * \brief Returns the folder's path on mcloud. |
675 | */ |
676 | - const std::string& folder_path() const; |
677 | + const std::string &folder_path() const; |
678 | |
679 | private: |
680 | - CloudFolder(const tinyxml2::XMLElement* root); |
681 | + CloudFolder(const tinyxml2::XMLElement *root); |
682 | |
683 | friend class ClientPriv; |
684 | |
685 | |
686 | === modified file 'include/mcloud/api/cloudresource.h' |
687 | --- include/mcloud/api/cloudresource.h 2016-10-24 15:25:02 +0000 |
688 | +++ include/mcloud/api/cloudresource.h 2016-12-07 12:44:11 +0000 |
689 | @@ -42,19 +42,19 @@ |
690 | |
691 | virtual ~CloudResource() = default; |
692 | |
693 | - virtual const std::string& id() const = 0; |
694 | - |
695 | - virtual const std::string& name() const = 0; |
696 | - |
697 | - virtual const std::time_t& created_date() const = 0; |
698 | - |
699 | - virtual const std::time_t& updated_date() const = 0; |
700 | - |
701 | - virtual const std::string& parent_catalog_id() const = 0; |
702 | - |
703 | - virtual const std::string& etag() const = 0; |
704 | - |
705 | - virtual const std::string& owner() const = 0; |
706 | + virtual const std::string &id() const = 0; |
707 | + |
708 | + virtual const std::string &name() const = 0; |
709 | + |
710 | + virtual const std::time_t &created_date() const = 0; |
711 | + |
712 | + virtual const std::time_t &updated_date() const = 0; |
713 | + |
714 | + virtual const std::string &parent_catalog_id() const = 0; |
715 | + |
716 | + virtual const std::string &etag() const = 0; |
717 | + |
718 | + virtual const std::string &owner() const = 0; |
719 | |
720 | virtual Property property() const = 0; |
721 | }; |
722 | |
723 | === modified file 'include/mcloud/api/diskinfo.h' |
724 | --- include/mcloud/api/diskinfo.h 2016-10-26 08:50:32 +0000 |
725 | +++ include/mcloud/api/diskinfo.h 2016-12-07 12:44:11 +0000 |
726 | @@ -24,7 +24,7 @@ |
727 | #include <memory> |
728 | |
729 | namespace tinyxml2 { |
730 | -class XMLElement; |
731 | + class XMLElement; |
732 | } |
733 | |
734 | namespace mcloud { |
735 | @@ -51,7 +51,7 @@ |
736 | int disk_size() const; |
737 | |
738 | private: |
739 | - DiskInfo(const tinyxml2::XMLElement* root); |
740 | + DiskInfo(const tinyxml2::XMLElement *root); |
741 | |
742 | friend class ClientPriv; |
743 | |
744 | |
745 | === modified file 'include/mcloud/api/downloadtask.h' |
746 | --- include/mcloud/api/downloadtask.h 2016-10-26 08:50:32 +0000 |
747 | +++ include/mcloud/api/downloadtask.h 2016-12-07 12:44:11 +0000 |
748 | @@ -23,20 +23,33 @@ |
749 | #include <mcloud/api/task.h> |
750 | |
751 | #include <memory> |
752 | +#include <vector> |
753 | |
754 | namespace mcloud { |
755 | namespace api { |
756 | |
757 | class TaskHandler; |
758 | |
759 | -/*! |
760 | - \struct DownloadBufferCb |
761 | - \brief DownloadBufferCb is a download request object which consists of a content id and writing callback function allows content data can be received in buffering via call back function. |
762 | - */ |
763 | -struct MCLOUD_API_DLL_PUBLIC DownloadBufferCb { |
764 | - std::string content_id; |
765 | + |
766 | + /*! |
767 | + \struct DownloadRequest |
768 | + \brief DownloadRequest is an object which can be used to request to download a content from mcloud. |
769 | + It consists of a \a item_id, and a writing callback function \a write_cb allows content data can be received in buffering via callback function. |
770 | + \note if \a write_cb is nullptr, content will be downloaded into a local file. The file path of content can be found from DownloadTask::file_path. |
771 | + */ |
772 | + |
773 | +struct MCLOUD_API_DLL_PUBLIC DownloadRequest { |
774 | + DownloadRequest(const std::string &id, |
775 | + Task::Buffer_Callback write_callback = nullptr) |
776 | + : item_id(id), |
777 | + write_cb(write_callback) { |
778 | + |
779 | + } |
780 | + std::string item_id; |
781 | Task::Buffer_Callback write_cb; |
782 | }; |
783 | +typedef std::vector<DownloadRequest> DownloadRequestList; |
784 | + |
785 | |
786 | class DownloadTaskPriv; |
787 | class SyncManagerPriv; |
788 | @@ -50,40 +63,40 @@ |
789 | public: |
790 | typedef std::shared_ptr<DownloadTask> Ptr; |
791 | |
792 | - DownloadTask(const DownloadTask&) = delete; |
793 | + DownloadTask(const DownloadTask &) = delete; |
794 | |
795 | - DownloadTask& operator=(const DownloadTask&) = delete; |
796 | + DownloadTask &operator=(const DownloadTask &) = delete; |
797 | |
798 | /*! |
799 | * Returns an unique id of download task. |
800 | */ |
801 | - const std::string& task_id() const override; |
802 | + const std::string &task_id() const override; |
803 | |
804 | /*! |
805 | * \brief Returns an unique id of cloud content on mcloud. |
806 | */ |
807 | - const std::string& content_id() const override; |
808 | + const std::string &content_id() const override; |
809 | |
810 | /*! |
811 | * \brief Returns a display name of cloud content on mcloud. |
812 | */ |
813 | - const std::string& content_name() const override; |
814 | + const std::string &content_name() const override; |
815 | |
816 | /*! |
817 | * \brief Returns cloud content local storage file path. |
818 | */ |
819 | - const std::string& file_path() const override; |
820 | + const std::string &file_path() const override; |
821 | |
822 | /*! |
823 | * \brief Returns download url assigned by mcloud for this task. |
824 | * \note this url will be expried after a period of time. |
825 | */ |
826 | - const std::string& task_url() const override; |
827 | + const std::string &task_url() const override; |
828 | |
829 | /*! |
830 | * \brief Contains the error string if an error occurs during content download. |
831 | */ |
832 | - const std::string& error_string() const override; |
833 | + const std::string &error_string() const override; |
834 | |
835 | /*! |
836 | * \brief Returns current sync-up status for this task. |
837 | @@ -95,13 +108,13 @@ |
838 | * \brief Handler for download progress of a task. |
839 | * \sa Task::ProgressHandler |
840 | */ |
841 | - Task::ProgressHandler& progress_changed() override; |
842 | + Task::ProgressHandler &progress_changed() override; |
843 | |
844 | /*! |
845 | * \brief Handler for download status of a task. |
846 | * \sa Task::StatusHandler |
847 | */ |
848 | - Task::StatusHandler& status_changed() override; |
849 | + Task::StatusHandler &status_changed() override; |
850 | |
851 | /*! |
852 | * \brief cancel the task. |
853 | @@ -110,7 +123,7 @@ |
854 | void cancel() override; |
855 | |
856 | private: |
857 | - DownloadTask(const std::shared_ptr<DownloadTaskPriv>& p); |
858 | + DownloadTask(const std::shared_ptr<DownloadTaskPriv> &p); |
859 | |
860 | friend class SyncManagerPriv; |
861 | |
862 | |
863 | === modified file 'include/mcloud/api/exceptions.h' |
864 | --- include/mcloud/api/exceptions.h 2016-10-24 15:25:02 +0000 |
865 | +++ include/mcloud/api/exceptions.h 2016-12-07 12:44:11 +0000 |
866 | @@ -26,55 +26,55 @@ |
867 | namespace mcloud { |
868 | namespace api { |
869 | |
870 | -/** |
871 | - * \brief Indicates an invalid content id when querying content infomation by an id. |
872 | - * or an invalid folder id when listing or looup content in one specific folder. |
873 | - */ |
874 | - |
875 | -class MCLOUD_API_DLL_PUBLIC InvalidIDException : public std::runtime_error { |
876 | - public: |
877 | - using runtime_error::runtime_error; |
878 | -}; |
879 | - |
880 | -/* |
881 | - * \brief Indicates a content or folder can not be found on mcloud. |
882 | - */ |
883 | -class MCLOUD_API_DLL_PUBLIC NonExistentException : public std::runtime_error { |
884 | - public: |
885 | - using runtime_error::runtime_error; |
886 | -}; |
887 | - |
888 | -/** |
889 | - * \brief User ran out of space on mcloud storage. |
890 | - */ |
891 | -class MCLOUD_API_DLL_PUBLIC OutofSpaceException : public std::runtime_error { |
892 | - public: |
893 | - using runtime_error::runtime_error; |
894 | -}; |
895 | - |
896 | -/** |
897 | - * \brief Indicates a timeout on HTTP requests. |
898 | - */ |
899 | -class MCLOUD_API_DLL_PUBLIC HttpTimeoutException : public std::runtime_error { |
900 | - public: |
901 | - using runtime_error::runtime_error; |
902 | -}; |
903 | - |
904 | -/* |
905 | - * \brief Indicates one or more http request parameters are invalid. |
906 | - */ |
907 | -class MCLOUD_API_DLL_PUBLIC ParameterInvalidException : public std::runtime_error { |
908 | - public: |
909 | - using runtime_error::runtime_error; |
910 | -}; |
911 | - |
912 | -/* |
913 | - * \brief Indicates access token is invalid or expired. |
914 | - */ |
915 | -class MCLOUD_API_DLL_PUBLIC CredentialException : public std::runtime_error { |
916 | - public: |
917 | - using runtime_error::runtime_error; |
918 | -}; |
919 | + /** |
920 | + * \brief Indicates an invalid content id when querying content infomation by an id. |
921 | + * or an invalid folder id when listing or looup content in one specific folder. |
922 | + */ |
923 | + |
924 | + class MCLOUD_API_DLL_PUBLIC InvalidIDException : public std::runtime_error { |
925 | + public: |
926 | + using runtime_error::runtime_error; |
927 | + }; |
928 | + |
929 | + /* |
930 | + * \brief Indicates a content or folder can not be found on mcloud. |
931 | + */ |
932 | + class MCLOUD_API_DLL_PUBLIC NonExistentException : public std::runtime_error { |
933 | + public: |
934 | + using runtime_error::runtime_error; |
935 | + }; |
936 | + |
937 | + /** |
938 | + * \brief User ran out of space on mcloud storage. |
939 | + */ |
940 | + class MCLOUD_API_DLL_PUBLIC OutofSpaceException : public std::runtime_error { |
941 | + public: |
942 | + using runtime_error::runtime_error; |
943 | + }; |
944 | + |
945 | + /** |
946 | + * \brief Indicates a timeout on HTTP requests. |
947 | + */ |
948 | + class MCLOUD_API_DLL_PUBLIC HttpTimeoutException : public std::runtime_error { |
949 | + public: |
950 | + using runtime_error::runtime_error; |
951 | + }; |
952 | + |
953 | + /* |
954 | + * \brief Indicates one or more http request parameters are invalid. |
955 | + */ |
956 | + class MCLOUD_API_DLL_PUBLIC ParameterInvalidException : public std::runtime_error { |
957 | + public: |
958 | + using runtime_error::runtime_error; |
959 | + }; |
960 | + |
961 | + /* |
962 | + * \brief Indicates access token is invalid or expired. |
963 | + */ |
964 | + class MCLOUD_API_DLL_PUBLIC CredentialException : public std::runtime_error { |
965 | + public: |
966 | + using runtime_error::runtime_error; |
967 | + }; |
968 | |
969 | } |
970 | } |
971 | |
972 | === modified file 'include/mcloud/api/outlink.h' |
973 | --- include/mcloud/api/outlink.h 2016-10-26 08:50:32 +0000 |
974 | +++ include/mcloud/api/outlink.h 2016-12-07 12:44:11 +0000 |
975 | @@ -25,7 +25,7 @@ |
976 | #include <string> |
977 | |
978 | namespace tinyxml2 { |
979 | -class XMLElement; |
980 | + class XMLElement; |
981 | } |
982 | |
983 | namespace mcloud { |
984 | @@ -45,15 +45,15 @@ |
985 | /*! |
986 | * \brief Returns a unique id of extranet object assigned by mcloud. |
987 | */ |
988 | - const std::string& id() const; |
989 | + const std::string &id() const; |
990 | |
991 | /*! |
992 | * \brief Returns a unique id of extranet link assigned by mcloud. |
993 | */ |
994 | - const std::string& link() const; |
995 | + const std::string &link() const; |
996 | |
997 | private: |
998 | - Outlink(const tinyxml2::XMLElement* root); |
999 | + Outlink(const tinyxml2::XMLElement *root); |
1000 | |
1001 | friend class ClientPriv; |
1002 | |
1003 | |
1004 | === modified file 'include/mcloud/api/syncmanager.h' |
1005 | --- include/mcloud/api/syncmanager.h 2016-10-26 08:50:32 +0000 |
1006 | +++ include/mcloud/api/syncmanager.h 2016-12-07 12:44:11 +0000 |
1007 | @@ -35,11 +35,11 @@ |
1008 | |
1009 | /*! |
1010 | \class SyncManager |
1011 | - \brief SyncManager handles all the requests to upload and download. |
1012 | + \brief SyncManager handles all the requests to content upload and download. |
1013 | It's constructed around two threads for content synchronization. One for content uploading to cloud, another for cloud item downloading to local. |
1014 | Both thread are running asynchronously. |
1015 | - Calls \sa add_download_tasks() by passing a content id list for cloud content download, |
1016 | - Calls \sa add_upload_tasks() by passing a local file list path for local content upload. |
1017 | + Calls \sa add_download_task() by passing \sa DownloadRequest for cloud content download, |
1018 | + Calls \sa add_upload_task() by passing \sa UploadReuqest or \sa UploadBufferCb for local content upload. |
1019 | */ |
1020 | |
1021 | class MCLOUD_API_DLL_PUBLIC SyncManager { |
1022 | @@ -54,57 +54,50 @@ |
1023 | |
1024 | ~SyncManager(); |
1025 | |
1026 | - SyncManager(const SyncManager&) = delete; |
1027 | + SyncManager(const SyncManager &) = delete; |
1028 | |
1029 | - SyncManager& operator=(const SyncManager&) = delete; |
1030 | + SyncManager &operator=(const SyncManager &) = delete; |
1031 | |
1032 | /*! |
1033 | * \brief Starts to run download or upload tasks from sync-up thread. |
1034 | - * The tasks can be resumed by sync-up thread if sync manager is paused or canceled before. |
1035 | - * \sa pause(), cancel() |
1036 | + * The tasks will be resumed by sync-up thread if sync manager is in paused or cancelled state. |
1037 | + * \sa pause(), cancel(). |
1038 | */ |
1039 | void start(); |
1040 | |
1041 | /*! |
1042 | * \brief Cancels all download or upload tasks from sync-up thread if sync manager is running. |
1043 | - * \note A canceled download or upload task has no chance to run again by sync-up thread. |
1044 | - * \sa start(), pause() |
1045 | + * \note The cancelled download or upload tasks can not be resumed by sync-up thread. |
1046 | + * \sa start(), pause(). |
1047 | */ |
1048 | void cancel(); |
1049 | |
1050 | /*! |
1051 | - * \brief Pauses download or upload task from sync-up thread if sync manager is running. |
1052 | + * \brief Pauses all download or upload tasks from sync-up thread if sync manager is running. |
1053 | * Sync-up thread can continue to run previous paused task by calling \sa start(). |
1054 | * \sa start(), cancel() |
1055 | */ |
1056 | void pause(); |
1057 | |
1058 | /*! |
1059 | - * \brief Add a new task with a given \a content id into download queue. |
1060 | - * \return a download task object that is pushed in sync-up manager. |
1061 | - * \throw std::runtime_error if error occurs. |
1062 | - * \sa add_download_tasks(), DownloadTask |
1063 | - */ |
1064 | - DownloadTask::Ptr add_download_task(const std::string& content_id); |
1065 | - |
1066 | - /*! |
1067 | - * \brief Pushes a download buffer callback item \a buffer_cb to sync manager and add regarding upload task into download queue. |
1068 | - * A download buffer object consists of the following fields |
1069 | + * \brief Pushes the download request item \a request_item to sync manager and add the upload task into download queue. |
1070 | + * A download request item consists of the following fields |
1071 | * - `write_cb` (std::function<size_t(void *dest, size_t buf_size)>) |
1072 | - * buffer reading callback function. |
1073 | + * buffer writing callback function. |
1074 | * The buffer area pointed at by the pointer \a dest should be filled up with at most \a buf_size number of bytes. |
1075 | * - `content_id` (string) |
1076 | * The id of content on mcloud. |
1077 | * \return a download task object that is pushed in sync-up manager. |
1078 | - * \throw std::runtime_error if error occurs. |
1079 | - * \sa add_download_tasks(), DownloadTask |
1080 | + * \throw mcloud specific exceptions or std::runtime_error if error occurs. |
1081 | + * \note if the above write_cb is nullptr, content will be downloaded into a local file. The file path of content can be found from DownloadTask::file_path. |
1082 | + * \sa add_download_task(), DownloadTask |
1083 | */ |
1084 | - DownloadTask::Ptr add_download_task(const DownloadBufferCb& buffer_cb); |
1085 | + DownloadTask::Ptr add_download_task(const DownloadRequest &request_item); |
1086 | |
1087 | /*! |
1088 | * \brief Pushes a upload request item \a request_item to sync manager and add regarding upload task into upload queue. |
1089 | * A upload request object consists of the following fields |
1090 | - * - `file_path` (string) |
1091 | + * - `local_file_path` (string) |
1092 | * local file path. |
1093 | * - `folder_id` (string) |
1094 | * mcloud folder id which stores content in uploads folder. |
1095 | @@ -113,14 +106,14 @@ |
1096 | * If content_name is empty, local file name will be used as a content name displayed on mcloud. |
1097 | * If folder_id is empty, content will be uploaded into root folder. |
1098 | * \return a download task object that are pushed in sync-up manager. |
1099 | - * \throw std::runtime_error if error occurs. |
1100 | + * \throw mcloud specific exceptions or std::runtime_error if error occurs. |
1101 | * \note A file name can not contain any of following characters: |
1102 | * '\', '/', ':', '*', '?', '"', '<', '>', '|' |
1103 | * \note Sync manager will detect if the uploading file is already existing on cloud, |
1104 | * if so, it simply sets the status of upload task completed to avoid duplicated upload. |
1105 | - * \sa add_download_tasks(), UploadRequest, UploadTask, |
1106 | + * \sa add_download_task(), UploadRequest, UploadTask, |
1107 | */ |
1108 | - UploadTask::Ptr add_upload_task(const UploadRequest& request_item); |
1109 | + UploadTask::Ptr add_upload_task(const UploadRequest &request_item); |
1110 | |
1111 | /*! |
1112 | * \brief Pushes a new upload request object \a buffer_cb to sync manager and add regarding upload task into upload queue. |
1113 | @@ -128,7 +121,7 @@ |
1114 | * - `read_cb` (std::function<size_t(void *dest, size_t buf_size)>) |
1115 | * buffer reading callback function. |
1116 | * The buffer area pointed at by the pointer \a dest should be filled up with at most \a buf_size number of bytes. |
1117 | - * - `buffer_size` (size_t) |
1118 | + * - `total_size` (size_t) |
1119 | * total size of data buffers. |
1120 | * - `folder_id` (string) |
1121 | * mcloud folder id which stores content in uploads folder. |
1122 | @@ -136,29 +129,29 @@ |
1123 | * uploaded content name, should not be empty. |
1124 | * If folder_id is empty, content will be uploaded into root folder. |
1125 | * \return a upload task object that are pushed in sync-up manager. |
1126 | - * \throw std::runtime_error if error occurs. |
1127 | + * \throw mcloud specific exceptions or std::runtime_error if error occurs. |
1128 | * \note A file name can not contain any of following characters: |
1129 | * '\', '/', ':', '*', '?', '"', '<', '>', '|' |
1130 | - * \sa add_download_tasks(), UploadRequest, UploadTask, |
1131 | + * \sa add_download_task(), UploadRequest, UploadTask, |
1132 | */ |
1133 | - UploadTask::Ptr add_upload_task(const UploadBufferCb& buffer_cb); |
1134 | + UploadTask::Ptr add_upload_task(const UploadBufferCb &buffer_cb); |
1135 | |
1136 | /*! |
1137 | - * \brief Returns a download task list hold by sync up manager. |
1138 | - * Each item in the list contains basic information of associated task. |
1139 | - * \sa upload_queue(), DownloadTask |
1140 | + * \brief Returns the download task list hold by sync up manager. |
1141 | + * Each item object in the list contains basic information of associated task. |
1142 | + * \sa upload_queue(), DownloadTask. |
1143 | */ |
1144 | DownloadList download_queue(); |
1145 | |
1146 | /*! |
1147 | - * \brief Returns a upload task list hold by sync up manager. |
1148 | - * Each item in the list contains basic information of associated task. |
1149 | - * \sa download_queue(), UploadTask |
1150 | + * \brief Returns the upload task list hold by sync up manager. |
1151 | + * Each item object in the list contains basic information of associated task. |
1152 | + * \sa download_queue(), UploadTask. |
1153 | */ |
1154 | UploadList upload_queue(); |
1155 | |
1156 | private: |
1157 | - SyncManager(ClientPriv* client_priv); |
1158 | + SyncManager(ClientPriv *client_priv); |
1159 | |
1160 | friend class ClientPriv; |
1161 | |
1162 | |
1163 | === modified file 'include/mcloud/api/task.h' |
1164 | --- include/mcloud/api/task.h 2016-10-24 15:25:02 +0000 |
1165 | +++ include/mcloud/api/task.h 2016-12-07 12:44:11 +0000 |
1166 | @@ -39,7 +39,7 @@ |
1167 | enum class Status { |
1168 | Unstart, ///< Task is in queue and sync manager does not run this task yet. |
1169 | Running, ///< Task is being processed by sync manager. |
1170 | - Canceled, ///< Task is in canceled status, it is caused by the call from Client::cancel_sync(). |
1171 | + Cancelled, ///< Task is in cancelled status, it is caused by the call from Client::cancel_sync(). |
1172 | Paused, ///< Task is in paused status, it is caused by the call from Client::pause_sync(). |
1173 | Broken, ///< Task is broken when sync manager failed to download/upload a task after several times trying. |
1174 | Complete, ///< Task is completed. |
1175 | @@ -49,40 +49,40 @@ |
1176 | |
1177 | typedef std::function<void(Status)> StatusHandler; |
1178 | |
1179 | - typedef std::function<size_t(void* dest, size_t buf_size)> Buffer_Callback; |
1180 | + typedef std::function<size_t(void *dest, size_t buf_size)> Buffer_Callback; |
1181 | |
1182 | virtual ~Task() = default; |
1183 | |
1184 | /*! |
1185 | * \brief Returns an unique id of task. |
1186 | */ |
1187 | - virtual const std::string& task_id() const = 0; |
1188 | + virtual const std::string &task_id() const = 0; |
1189 | |
1190 | /*! |
1191 | * \brief Returns an unique id of cloud content on mcloud. |
1192 | */ |
1193 | - virtual const std::string& content_id() const = 0; |
1194 | + virtual const std::string &content_id() const = 0; |
1195 | |
1196 | /*! |
1197 | * \brief Returns a display name of cloud content on mcloud. |
1198 | */ |
1199 | - virtual const std::string& content_name() const = 0; |
1200 | + virtual const std::string &content_name() const = 0; |
1201 | |
1202 | /*! |
1203 | * \brief Returns cloud content local storage file path. |
1204 | */ |
1205 | - virtual const std::string& file_path() const = 0; |
1206 | + virtual const std::string &file_path() const = 0; |
1207 | |
1208 | /*! |
1209 | * \brief Contains the error string if an error occurs during task running. |
1210 | */ |
1211 | - virtual const std::string& error_string() const = 0; |
1212 | + virtual const std::string &error_string() const = 0; |
1213 | |
1214 | /*! |
1215 | * \brief Returns a item url assigned by mcloud. |
1216 | * \note the url will be expried after a period of time. |
1217 | */ |
1218 | - virtual const std::string& task_url() const = 0; |
1219 | + virtual const std::string &task_url() const = 0; |
1220 | |
1221 | /*! |
1222 | * \brief Returns current download or upload item sync-up status. |
1223 | @@ -93,13 +93,13 @@ |
1224 | * \brief Handler for download or upload progress of a task. |
1225 | * \sa Task::ProgressHandler |
1226 | */ |
1227 | - virtual Task::ProgressHandler& progress_changed() = 0; |
1228 | + virtual Task::ProgressHandler &progress_changed() = 0; |
1229 | |
1230 | /*! |
1231 | * \brief Handler for download or upload progress of a task. |
1232 | * \sa Task::StatusHandler |
1233 | */ |
1234 | - virtual Task::StatusHandler& status_changed() = 0; |
1235 | + virtual Task::StatusHandler &status_changed() = 0; |
1236 | |
1237 | /*! |
1238 | * \brief Cancels the task. |
1239 | |
1240 | === modified file 'include/mcloud/api/taskqueue.h' |
1241 | --- include/mcloud/api/taskqueue.h 2016-10-24 15:25:02 +0000 |
1242 | +++ include/mcloud/api/taskqueue.h 2016-12-07 12:44:11 +0000 |
1243 | @@ -41,17 +41,17 @@ |
1244 | |
1245 | virtual ~TaskQueue() = default; |
1246 | |
1247 | - TaskQueue(TaskQueue&& queue) { |
1248 | + TaskQueue(TaskQueue &&queue) { |
1249 | std::lock_guard<std::mutex> lock(mutex_); |
1250 | tasks_ = std::move(queue.tasks_); |
1251 | } |
1252 | |
1253 | - TaskQueue(const TaskQueue& queue) { |
1254 | + TaskQueue(const TaskQueue &queue) { |
1255 | std::lock_guard<std::mutex> lock(mutex_); |
1256 | tasks_ = queue.tasks_; |
1257 | } |
1258 | |
1259 | - TaskQueue& operator= (const TaskQueue& queue) { |
1260 | + TaskQueue &operator= (const TaskQueue &queue) { |
1261 | if (this != &queue) { |
1262 | std::lock_guard<std::mutex> lock1(mutex_); |
1263 | std::lock_guard<std::mutex> lock2(queue.mutex_); |
1264 | @@ -91,19 +91,19 @@ |
1265 | return tasks_.empty(); |
1266 | } |
1267 | |
1268 | - void push(const T& task) { |
1269 | + void push(const T &task) { |
1270 | std::lock_guard<std::mutex> lock(mutex_); |
1271 | tasks_.push_back(task); |
1272 | } |
1273 | |
1274 | - void push(const TaskQueue& queue) { |
1275 | + void push(const TaskQueue &queue) { |
1276 | std::lock_guard<std::mutex> lock(mutex_); |
1277 | - for (const T& task : queue.tasks_) { |
1278 | + for (const T &task : queue.tasks_) { |
1279 | tasks_.push_back(task); |
1280 | } |
1281 | } |
1282 | |
1283 | - bool try_pop(T& task) { |
1284 | + bool try_pop(T &task) { |
1285 | std::lock_guard<std::mutex> lock(mutex_); |
1286 | |
1287 | if (tasks_.empty()) { |
1288 | @@ -115,7 +115,7 @@ |
1289 | return true; |
1290 | } |
1291 | |
1292 | - const T& operator[](int index) const { |
1293 | + const T &operator[](int index) const { |
1294 | std::lock_guard<std::mutex> lock(mutex_); |
1295 | return tasks_[index]; |
1296 | } |
1297 | |
1298 | === modified file 'include/mcloud/api/uploadtask.h' |
1299 | --- include/mcloud/api/uploadtask.h 2016-10-26 08:50:32 +0000 |
1300 | +++ include/mcloud/api/uploadtask.h 2016-12-07 12:44:11 +0000 |
1301 | @@ -32,10 +32,11 @@ |
1302 | |
1303 | /*! |
1304 | \struct UploadRequest |
1305 | - \brief UploadRequest is a upload request item which consists of a upload folder id, up-front buffer size, upload content name |
1306 | + \brief UploadRequest is an object which can be used to request to upload local file on mcloud. |
1307 | + It consists of a \a local_file_path, a \a folder_id, a \a content_name, which can be specified displayed file name on mcloud. |
1308 | */ |
1309 | struct MCLOUD_API_DLL_PUBLIC UploadRequest { |
1310 | - std::string file_path; |
1311 | + std::string local_file_path; |
1312 | std::string folder_id; |
1313 | std::string content_name; |
1314 | }; |
1315 | @@ -43,11 +44,14 @@ |
1316 | |
1317 | /*! |
1318 | \struct UploadBufferCb |
1319 | - \brief UploadBufferCb is a upload request item which consists of a upload folder id, upload buffer size, upload content name and reading callback function allows content data can be received in buffering via call back function. |
1320 | + \brief UploadBufferCb is an object which can be used to request to upload content mcloud in streaming on. |
1321 | + It consists of a reading callback function \a read_cb which allows content data can be sent in buffering via callback function, a up-front content size \a total_size, a \a folder_id and a upload content name \a content_name, which can be specified displayed file name on mcloud. |
1322 | + \sa Task::Buffer_Callback |
1323 | */ |
1324 | + |
1325 | struct MCLOUD_API_DLL_PUBLIC UploadBufferCb { |
1326 | Task::Buffer_Callback read_cb; |
1327 | - size_t buffer_size; |
1328 | + size_t total_size; |
1329 | std::string folder_id; |
1330 | std::string content_name; |
1331 | }; |
1332 | @@ -65,40 +69,40 @@ |
1333 | public: |
1334 | typedef std::shared_ptr<UploadTask> Ptr; |
1335 | |
1336 | - UploadTask(const UploadTask&) = delete; |
1337 | + UploadTask(const UploadTask &) = delete; |
1338 | |
1339 | - UploadTask& operator=(const UploadTask&) = delete; |
1340 | + UploadTask &operator=(const UploadTask &) = delete; |
1341 | |
1342 | /*! |
1343 | * \brief Returns an unique id of upload task. |
1344 | */ |
1345 | - const std::string& task_id() const override; |
1346 | + const std::string &task_id() const override; |
1347 | |
1348 | /*! |
1349 | * \brief Returns an unique id of cloud content on mcloud. |
1350 | */ |
1351 | - const std::string& content_id() const override; |
1352 | + const std::string &content_id() const override; |
1353 | |
1354 | /*! |
1355 | * \brief Returns a display name of local content. |
1356 | */ |
1357 | - const std::string& content_name() const override; |
1358 | + const std::string &content_name() const override; |
1359 | |
1360 | /*! |
1361 | * \brief Returns uploaded local content file path. |
1362 | */ |
1363 | - const std::string& file_path() const override; |
1364 | + const std::string &file_path() const override; |
1365 | |
1366 | /*! |
1367 | * \brief Contains the error string if an error occurs during content uploading. |
1368 | */ |
1369 | - const std::string& error_string() const override; |
1370 | + const std::string &error_string() const override; |
1371 | |
1372 | /*! |
1373 | * \brief Returns upload url assigned by mcloud for this task. |
1374 | * \note the url will be expired after a period of time. |
1375 | */ |
1376 | - const std::string& task_url() const override; |
1377 | + const std::string &task_url() const override; |
1378 | |
1379 | /*! |
1380 | * \brief Returns current sync-up status for this task. |
1381 | @@ -109,13 +113,13 @@ |
1382 | * \brief Handler for upload progress of a task. |
1383 | * \sa Task::ProgressHandler |
1384 | */ |
1385 | - Task::ProgressHandler& progress_changed() override; |
1386 | + Task::ProgressHandler &progress_changed() override; |
1387 | |
1388 | /*! |
1389 | * \brief Handler for upload status of a task. |
1390 | * \sa Task::StatusHandler |
1391 | */ |
1392 | - Task::StatusHandler& status_changed() override; |
1393 | + Task::StatusHandler &status_changed() override; |
1394 | |
1395 | /*! |
1396 | * \brief cancel the task. |
1397 | @@ -134,7 +138,7 @@ |
1398 | bool is_need_upload() const; |
1399 | |
1400 | private: |
1401 | - UploadTask(const std::shared_ptr<UploadTaskPriv>& p); |
1402 | + UploadTask(const std::shared_ptr<UploadTaskPriv> &p); |
1403 | |
1404 | friend class SyncManagerPriv; |
1405 | |
1406 | |
1407 | === modified file 'provider/CMakeLists.txt' |
1408 | --- provider/CMakeLists.txt 2016-10-24 15:25:02 +0000 |
1409 | +++ provider/CMakeLists.txt 2016-12-07 12:44:11 +0000 |
1410 | @@ -1,7 +1,22 @@ |
1411 | +install( |
1412 | + FILES storage-provider-mcloud.service |
1413 | + DESTINATION ${CMAKE_INSTALL_DATADIR}/accounts/services |
1414 | +) |
1415 | + |
1416 | +install( |
1417 | + FILES storage-provider-mcloud.application |
1418 | + DESTINATION ${CMAKE_INSTALL_DATADIR}/accounts/applications |
1419 | +) |
1420 | + |
1421 | +install( |
1422 | + FILES storage-provider-mcloud.desktop |
1423 | + DESTINATION ${CMAKE_INSTALL_DATADIR}/applications |
1424 | +) |
1425 | + |
1426 | find_package(PkgConfig REQUIRED) |
1427 | find_package(Boost COMPONENTS filesystem system thread REQUIRED) |
1428 | |
1429 | -pkg_check_modules(STORAGE_FRAMEWORK_PROVIDER storage-framework-provider-1 REQUIRED) |
1430 | +pkg_check_modules(STORAGE_FRAMEWORK_PROVIDER storage-framework-provider-1>=0.2 REQUIRED) |
1431 | |
1432 | include_directories(${CMAKE_CURRENT_BINARY_DIR} ${STORAGE_FRAMEWORK_PROVIDER_INCLUDE_DIRS}) |
1433 | |
1434 | @@ -13,7 +28,6 @@ |
1435 | |
1436 | target_link_libraries( |
1437 | mcloud-provider |
1438 | - mcloud-provider-static |
1439 | mcloud |
1440 | |
1441 | ${Boost_LIBRARIES} |
1442 | @@ -22,10 +36,15 @@ |
1443 | |
1444 | install( |
1445 | TARGETS mcloud-provider |
1446 | - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} |
1447 | + RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME} |
1448 | +) |
1449 | + |
1450 | +configure_file( |
1451 | + com.canonical.StorageFramework.Provider.Mcloud.service.in |
1452 | + com.canonical.StorageFramework.Provider.Mcloud.service |
1453 | ) |
1454 | |
1455 | install( |
1456 | - FILES ${CMAKE_CURRENT_SOURCE_DIR}/com.canonical.StorageFramework.Provider.McloudProvider.service |
1457 | - DESTINATION /usr/share/dbus-1/services |
1458 | + FILES ${CMAKE_CURRENT_BINARY_DIR}/com.canonical.StorageFramework.Provider.Mcloud.service |
1459 | + DESTINATION ${CMAKE_INSTALL_DATADIR}/dbus-1/services |
1460 | ) |
1461 | |
1462 | === added file 'provider/com.canonical.StorageFramework.Provider.Mcloud.service.in' |
1463 | --- provider/com.canonical.StorageFramework.Provider.Mcloud.service.in 1970-01-01 00:00:00 +0000 |
1464 | +++ provider/com.canonical.StorageFramework.Provider.Mcloud.service.in 2016-12-07 12:44:11 +0000 |
1465 | @@ -0,0 +1,3 @@ |
1466 | +[D-BUS Service] |
1467 | +Name=com.canonical.StorageFramework.Provider.McloudProvider |
1468 | +Exec=@CMAKE_INSTALL_FULL_LIBDIR@/@PROJECT_NAME@/mcloud-provider |
1469 | |
1470 | === removed file 'provider/com.canonical.StorageFramework.Provider.McloudProvider.service' |
1471 | --- provider/com.canonical.StorageFramework.Provider.McloudProvider.service 2016-08-11 11:06:51 +0000 |
1472 | +++ provider/com.canonical.StorageFramework.Provider.McloudProvider.service 1970-01-01 00:00:00 +0000 |
1473 | @@ -1,3 +0,0 @@ |
1474 | -[D-BUS Service] |
1475 | -Name=com.canonical.StorageFramework.Provider.McloudProvider |
1476 | -Exec=/usr/bin/mcloud-provider |
1477 | |
1478 | === modified file 'provider/main.cpp' |
1479 | --- provider/main.cpp 2016-10-24 15:25:02 +0000 |
1480 | +++ provider/main.cpp 2016-12-07 12:44:11 +0000 |
1481 | @@ -1,13 +1,18 @@ |
1482 | #include "mcloudprovider.h" |
1483 | #include <unity/storage/provider/Server.h> |
1484 | +#include <signal.h> |
1485 | |
1486 | using namespace std; |
1487 | using namespace unity::storage::provider; |
1488 | |
1489 | int main(int argc, char** argv) |
1490 | { |
1491 | - const string bus_name = "com.canonical.StorageFramework.Provider.McloudProvider"; |
1492 | - string account_service_id = "com.canonical.scopes.mcloud_mcloud_mcloud"; |
1493 | + const string bus_name = "com.canonical.StorageFramework.Provider.Mcloud"; |
1494 | + string account_service_id = "storage-provider-mcloud"; |
1495 | + |
1496 | + //Ignore SIGPIPE when socket is not available in case of download task is cancelled. |
1497 | + signal(SIGPIPE, SIG_IGN); |
1498 | + |
1499 | if (argc > 1) { |
1500 | account_service_id = argv[1]; |
1501 | } |
1502 | |
1503 | === modified file 'provider/mcloudprovider.cpp' |
1504 | --- provider/mcloudprovider.cpp 2016-10-24 15:25:02 +0000 |
1505 | +++ provider/mcloudprovider.cpp 2016-12-07 12:44:11 +0000 |
1506 | @@ -17,11 +17,11 @@ |
1507 | */ |
1508 | |
1509 | #include "mcloudprovider.h" |
1510 | +#include <unity/storage/common.h> |
1511 | #include <unity/storage/provider/ProviderBase.h> |
1512 | #include <unity/storage/provider/TempfileUploadJob.h> |
1513 | #include <unity/storage/provider/UploadJob.h> |
1514 | #include <unity/storage/provider/DownloadJob.h> |
1515 | -#include <unity/storage/provider/metadata_keys.h> |
1516 | #include <unity/storage/provider/Exceptions.h> |
1517 | |
1518 | #include <boost/thread.hpp> |
1519 | @@ -48,6 +48,7 @@ |
1520 | |
1521 | using namespace std; |
1522 | using namespace unity::storage; |
1523 | +using namespace unity::storage::metadata; |
1524 | using namespace unity::storage::provider; |
1525 | using namespace mcloud::api; |
1526 | using namespace boost::uuids; |
1527 | @@ -60,8 +61,8 @@ |
1528 | static constexpr const int CLIENT_COUNT = 3; |
1529 | |
1530 | static const char* FOLDER_TYPE[] = {"normal", "pictures", "music", "videos", "message", "docs", "app", "sync"}; |
1531 | - static const char* CONTENT_TYPE[] = {"all", "image", "audio", "video", "other", "doc", "spreadsheet", "ppt"}; |
1532 | - static const char* STATUS[] = {"unstart", "running", "canceled", "paused", "broken", "complete"}; |
1533 | + static const char* FILE_TYPE[] = {"all", "image", "audio", "video", "other", "doc", "spreadsheet", "ppt"}; |
1534 | + static const char* STATUS[] = {"unstart", "running", "canceled", "paused", "broken", "complete"}; |
1535 | |
1536 | string make_job_id() { |
1537 | auto uuid = random_generator()(); |
1538 | @@ -76,8 +77,8 @@ |
1539 | return FOLDER_TYPE[int(type)]; |
1540 | } |
1541 | |
1542 | - string content_type_to_string(CloudContent::Type type) { |
1543 | - return CONTENT_TYPE[int(type)]; |
1544 | + string file_type_to_string(CloudContent::Type type) { |
1545 | + return FILE_TYPE[int(type)]; |
1546 | } |
1547 | |
1548 | string time_to_iso(time_t t) { |
1549 | @@ -112,31 +113,76 @@ |
1550 | return count; |
1551 | } |
1552 | |
1553 | - Item content_to_item(CloudResource::Ptr resource) { |
1554 | + Item content_to_item(CloudResource::Ptr resource, vector<string> const& keys) { |
1555 | Item item; |
1556 | item.item_id = resource->id(); |
1557 | item.parent_ids = {resource->parent_catalog_id()}; |
1558 | item.name = resource->name(); |
1559 | item.etag = resource->etag(); |
1560 | - item.metadata["owner"] = resource->owner(); |
1561 | - item.metadata[provider::CREATION_TIME] = time_to_iso(resource->created_date()); |
1562 | - item.metadata[provider::LAST_MODIFIED_TIME] = time_to_iso(resource->updated_date()); |
1563 | + item.metadata[LAST_MODIFIED_TIME] = time_to_iso(resource->updated_date()); |
1564 | if (resource->property() == CloudResource::Property::Folder) { |
1565 | item.type = ItemType::folder; |
1566 | - auto folder = std::static_pointer_cast<mcloud::api::CloudFolder>(resource); |
1567 | - item.metadata["folder_type"] = folder_type_to_string(folder->folder_type()); |
1568 | - item.metadata["folder_path"] = folder->folder_path(); |
1569 | } else if (resource->property() == CloudResource::Property::Content) { |
1570 | item.type = ItemType::file; |
1571 | auto file = std::static_pointer_cast<mcloud::api::CloudContent>(resource); |
1572 | - item.metadata["suffix"] = file->suffix(); |
1573 | - item.metadata["content_type"] = content_type_to_string(file->type()); |
1574 | - |
1575 | - item.metadata[provider::SIZE_IN_BYTES] = file->content_size(); |
1576 | - item.metadata["description"] = file->description(); |
1577 | - item.metadata["thumbnail_url"] = file->thumbnail_url(); |
1578 | - item.metadata["big_thumbnail_url"] = file->big_thumbnail_url(); |
1579 | - item.metadata["present_url"] = file->big_thumbnail_url(); |
1580 | + item.metadata[SIZE_IN_BYTES] = file->content_size(); |
1581 | + } |
1582 | + |
1583 | + if (!keys.empty()) { |
1584 | + if (keys[0] == metadata::ALL) { |
1585 | + item.metadata[CREATION_TIME] = time_to_iso(resource->created_date()); |
1586 | + item.metadata["mcloud:owner"] = resource->owner(); |
1587 | + if (resource->property() == CloudResource::Property::Folder) { |
1588 | + auto folder = std::static_pointer_cast<mcloud::api::CloudFolder>(resource); |
1589 | + item.metadata["mcloud:folder_type"] = folder_type_to_string(folder->folder_type()); |
1590 | + item.metadata["mcloud:folder_path"] = folder->folder_path(); |
1591 | + } else if (resource->property() == CloudResource::Property::Content) { |
1592 | + auto file = std::static_pointer_cast<mcloud::api::CloudContent>(resource); |
1593 | + item.metadata[DESCRIPTION] = file->description(); |
1594 | + item.metadata[CONTENT_TYPE] = file_type_to_string(file->type()); |
1595 | + item.metadata["mcloud:suffix"] = file->suffix(); |
1596 | + item.metadata["mcloud:thumbnail_url"] = file->thumbnail_url(); |
1597 | + item.metadata["mcloud:big_thumbnail_url"] = file->big_thumbnail_url(); |
1598 | + item.metadata["mcloud:present_url"] = file->present_url(); |
1599 | + } |
1600 | + } else { |
1601 | + auto metadata = [&]() { |
1602 | + std::map<std::string, MetadataValue> metadata; |
1603 | + for (const auto& key: keys) { |
1604 | + if (key == CREATION_TIME) { |
1605 | + metadata[CREATION_TIME] = time_to_iso(resource->created_date()); |
1606 | + } else if (key == DESCRIPTION && resource->property() == CloudResource::Property::Content) { |
1607 | + auto file = std::static_pointer_cast<mcloud::api::CloudContent>(resource); |
1608 | + metadata[DESCRIPTION] = file->description(); |
1609 | + } else if (key == CONTENT_TYPE && resource->property() == CloudResource::Property::Content) { |
1610 | + auto file = std::static_pointer_cast<mcloud::api::CloudContent>(resource); |
1611 | + metadata[CONTENT_TYPE] = file_type_to_string(file->type()); |
1612 | + } else if (key == "mcloud:folder_type" && resource->property() == CloudResource::Property::Folder) { |
1613 | + auto folder = std::static_pointer_cast<mcloud::api::CloudFolder>(resource); |
1614 | + metadata["mcloud:folder_type"] = folder_type_to_string(folder->folder_type()); |
1615 | + } else if (key == "mcloud:folder_path" && resource->property() == CloudResource::Property::Folder) { |
1616 | + auto folder = std::static_pointer_cast<mcloud::api::CloudFolder>(resource); |
1617 | + metadata["mcloud:folder_path"] = folder->folder_path(); |
1618 | + } else if (key == "mcloud:suffix" && resource->property() == CloudResource::Property::Content) { |
1619 | + auto file = std::static_pointer_cast<mcloud::api::CloudContent>(resource); |
1620 | + metadata["mcloud:suffix"] = file->suffix(); |
1621 | + } else if (key == "mcloud:thumbnail_url" && resource->property() == CloudResource::Property::Content) { |
1622 | + auto file = std::static_pointer_cast<mcloud::api::CloudContent>(resource); |
1623 | + metadata["mcloud:thumbnail_url"] = file->thumbnail_url(); |
1624 | + } else if (key == "mcloud:big_thumbnail_url" && resource->property() == CloudResource::Property::Content) { |
1625 | + auto file = std::static_pointer_cast<mcloud::api::CloudContent>(resource); |
1626 | + metadata["mcloud:big_thumbnail_url"] = file->big_thumbnail_url(); |
1627 | + } else if (key == "mcloud:present_url" && resource->property() == CloudResource::Property::Content) { |
1628 | + auto file = std::static_pointer_cast<mcloud::api::CloudContent>(resource); |
1629 | + metadata["mcloud:present_url"] = file->present_url(); |
1630 | + } |
1631 | + } |
1632 | + |
1633 | + return metadata; |
1634 | + }(); |
1635 | + |
1636 | + item.metadata.insert(metadata.begin(), metadata.end()); |
1637 | + } |
1638 | } |
1639 | |
1640 | return item; |
1641 | @@ -150,6 +196,7 @@ |
1642 | string const& file_name, |
1643 | int64_t size, |
1644 | bool allow_overwrite, |
1645 | + vector<string> const& keys, |
1646 | Client::Ptr client); |
1647 | |
1648 | boost::future<void> cancel() override; |
1649 | @@ -167,6 +214,7 @@ |
1650 | std::mutex mutex_; |
1651 | UploadTask::Ptr task_; |
1652 | Client::Ptr client_; |
1653 | + vector<string> keys_; |
1654 | boost::future<tuple<bool, string>> upload_future_; |
1655 | }; |
1656 | |
1657 | @@ -195,19 +243,21 @@ |
1658 | : client_list_(CLIENT_COUNT, std::make_shared<Client>(TIME_OUT)) { |
1659 | } |
1660 | |
1661 | -boost::future<ItemList> McloudProvider::roots(Context const& ctx) { |
1662 | - return boost::async([this, ctx]() { |
1663 | +boost::future<ItemList> McloudProvider::roots(vector<string> const& /*keys*/, |
1664 | + Context const& ctx) { |
1665 | + return boost::async([=]() { |
1666 | try { |
1667 | auto client = assign_client(ctx); |
1668 | - auto root_folder_id = client->cloud_root_folder_id(); |
1669 | + auto root_folder_id = client->root_folder_id(); |
1670 | |
1671 | + //mcloud does't provider etag for root, create fake one "etag". |
1672 | ItemList roots = { |
1673 | - {root_folder_id, {}, "root", "", ItemType::root, {}} |
1674 | + {root_folder_id, {}, "root", "etag", ItemType::root, {}} |
1675 | }; |
1676 | |
1677 | - return make_ready_future<ItemList>(roots); |
1678 | + return roots; |
1679 | } catch (runtime_error& e) { |
1680 | - return make_exceptional_future<ItemList>( |
1681 | + throw boost::enable_current_exception( |
1682 | RemoteCommsException(string("McloudProvider::roots() failed: ") + e.what())); |
1683 | } |
1684 | }); |
1685 | @@ -215,6 +265,7 @@ |
1686 | |
1687 | boost::future<tuple<ItemList, string>> McloudProvider::list(string const& item_id, |
1688 | string const& page_token, |
1689 | + vector<string> const& keys, |
1690 | Context const& ctx) { |
1691 | int page_token_index = 0; |
1692 | if (!page_token.empty()) { |
1693 | @@ -226,7 +277,7 @@ |
1694 | } |
1695 | } |
1696 | |
1697 | - return boost::async([this, item_id, page_token_index, ctx]() { |
1698 | + return boost::async([=]() { |
1699 | try { |
1700 | const int count_per_page = 50; |
1701 | int start_index = 1 + page_token_index * count_per_page; |
1702 | @@ -236,22 +287,20 @@ |
1703 | |
1704 | ItemList items; |
1705 | for (const auto& content : content_list) { |
1706 | - items.push_back(content_to_item(content)); |
1707 | + items.push_back(content_to_item(content, keys)); |
1708 | } |
1709 | |
1710 | - int offset = 0; |
1711 | - boost::promise<tuple<ItemList, string>> prom; |
1712 | + string next_page_token; |
1713 | if (content_list.size() >= count_per_page) { |
1714 | - offset++; |
1715 | + next_page_token = std::to_string(page_token_index + 1); |
1716 | } |
1717 | - prom.set_value(make_tuple(items, std::to_string(page_token_index + offset))); |
1718 | |
1719 | - return prom.get_future(); |
1720 | + return make_tuple(items, next_page_token); |
1721 | } catch (InvalidIDException& e) { |
1722 | - return make_exceptional_future<tuple<ItemList, string>>( |
1723 | + throw boost::enable_current_exception( |
1724 | NotExistsException(string("McloudProvider::list() failed: ") + e.what(), item_id)); |
1725 | } catch (runtime_error& e) { |
1726 | - return make_exceptional_future<tuple<ItemList, string>>( |
1727 | + throw boost::enable_current_exception( |
1728 | RemoteCommsException(string("McloudProvider::list() failed: ") + e.what())); |
1729 | } |
1730 | }); |
1731 | @@ -259,8 +308,9 @@ |
1732 | |
1733 | boost::future<ItemList> McloudProvider::lookup(string const& parent_id, |
1734 | string const& name, |
1735 | + vector<string> const& keys, |
1736 | Context const& ctx) { |
1737 | - return boost::async([this, parent_id, name, ctx]() { |
1738 | + return boost::async([=]() { |
1739 | try { |
1740 | const int count_per_page = 50; |
1741 | int page_token_index = 0; |
1742 | @@ -276,7 +326,7 @@ |
1743 | |
1744 | for (const auto& content : content_list) { |
1745 | if (content->name().find(name) != string::npos) { |
1746 | - items.push_back(content_to_item(content)); |
1747 | + items.push_back(content_to_item(content, keys)); |
1748 | } |
1749 | } |
1750 | |
1751 | @@ -285,29 +335,30 @@ |
1752 | } |
1753 | } while (true); |
1754 | |
1755 | - return make_ready_future<ItemList>(items); |
1756 | + return items; |
1757 | } catch (InvalidIDException& e) { |
1758 | - return make_exceptional_future<ItemList>( |
1759 | + throw boost::enable_current_exception( |
1760 | NotExistsException(string("McloudProvider::lookup() folder not exists: ") + e.what(), parent_id)); |
1761 | } catch (runtime_error& e) { |
1762 | - return make_exceptional_future<ItemList>( |
1763 | + throw boost::enable_current_exception( |
1764 | RemoteCommsException(string("McloudProvider::lookup() failed: ") + e.what())); |
1765 | } |
1766 | }); |
1767 | } |
1768 | |
1769 | boost::future<Item> McloudProvider::metadata(string const& item_id, |
1770 | + vector<string> const& keys, |
1771 | Context const& ctx) { |
1772 | - return boost::async([this, item_id, ctx]() { |
1773 | + return boost::async([=]() { |
1774 | try { |
1775 | auto client = assign_client(ctx); |
1776 | auto content = client->content_info(item_id); |
1777 | - return make_ready_future<Item>(content_to_item(content)); |
1778 | + return content_to_item(content, keys); |
1779 | } catch (NonExistentException& e) { |
1780 | - return make_exceptional_future<Item>( |
1781 | + throw boost::enable_current_exception( |
1782 | NotExistsException(string("McloudProvider::metadata() content not exists: ") + e.what(), item_id)); |
1783 | } catch (runtime_error& e) { |
1784 | - return make_exceptional_future<Item>( |
1785 | + throw boost::enable_current_exception( |
1786 | RemoteCommsException(string("McloudProvider::metadata() failed: ") + e.what())); |
1787 | } |
1788 | }); |
1789 | @@ -315,17 +366,18 @@ |
1790 | |
1791 | boost::future<Item> McloudProvider::create_folder(string const& parent_id, |
1792 | string const& name, |
1793 | + vector<string> const& keys, |
1794 | Context const& ctx) { |
1795 | - return boost::async([this, parent_id, name, ctx]() { |
1796 | + return boost::async([=]() { |
1797 | try { |
1798 | auto client = assign_client(ctx); |
1799 | auto content = client->create_folder(name, parent_id); |
1800 | - return make_ready_future<Item>(content_to_item(content)); |
1801 | + return content_to_item(content, keys); |
1802 | } catch (NonExistentException& e) { |
1803 | - return make_exceptional_future<Item>( |
1804 | + throw boost::enable_current_exception( |
1805 | NotExistsException(string("McloudProvider::create_folder() failed: ") + e.what(), name)); |
1806 | } catch (runtime_error& e) { |
1807 | - return make_exceptional_future<Item>( |
1808 | + throw boost::enable_current_exception( |
1809 | RemoteCommsException(string("McloudProvider::create_folder() failed: ") + e.what())); |
1810 | } |
1811 | }); |
1812 | @@ -336,15 +388,17 @@ |
1813 | int64_t size, |
1814 | string const& /*content_type*/, |
1815 | bool allow_overwrite, |
1816 | + vector<string> const& keys, |
1817 | Context const& ctx) { |
1818 | auto client = assign_client(ctx, JobMode::Upload); |
1819 | return make_ready_future(unique_ptr<UploadJob>(new McloudUploadJob(make_job_id(), parent_id, name, |
1820 | - size, allow_overwrite, client))); |
1821 | + size, allow_overwrite, keys, client))); |
1822 | } |
1823 | |
1824 | boost::future<unique_ptr<UploadJob>> McloudProvider::update(string const& item_id, |
1825 | int64_t size, |
1826 | string const& /*old_etag*/, |
1827 | + vector<string> const& keys, |
1828 | Context const& ctx) { |
1829 | //mcloud doesn't have update API so do some workarounds. |
1830 | //1.fetch metadata to get the content name and parent folder id; |
1831 | @@ -352,7 +406,7 @@ |
1832 | //3.create a new file in the original folder with the same file name. |
1833 | //side effect: the original item id is changed after updated. |
1834 | |
1835 | - return boost::async([this, item_id, size, ctx]() { |
1836 | + return boost::async([=]() { |
1837 | try { |
1838 | auto client = assign_client(ctx); |
1839 | auto content = client->content_info(item_id); |
1840 | @@ -361,15 +415,16 @@ |
1841 | |
1842 | delete_item(item_id, ctx); |
1843 | |
1844 | - return create_file(parent_id, file_name, size, "", true, ctx); |
1845 | + return create_file(parent_id, file_name, size, "", true, keys, ctx).get(); |
1846 | } catch (runtime_error& e) { |
1847 | - return make_exceptional_future<unique_ptr<UploadJob>>( |
1848 | + throw boost::enable_current_exception( |
1849 | RemoteCommsException(string("McloudProvider::update() failed: ") + e.what())); |
1850 | } |
1851 | }); |
1852 | } |
1853 | |
1854 | boost::future<unique_ptr<DownloadJob>> McloudProvider::download(string const& item_id, |
1855 | + string const& /*match_etag*/, |
1856 | Context const& ctx) { |
1857 | auto client = assign_client(ctx, JobMode::Download); |
1858 | return make_ready_future(unique_ptr<DownloadJob>(new McloudDownloadJob(make_job_id(), item_id, |
1859 | @@ -378,17 +433,16 @@ |
1860 | |
1861 | boost::future<void> McloudProvider::delete_item(string const& item_id, |
1862 | Context const& ctx) { |
1863 | - return boost::async([this, item_id, ctx]() { |
1864 | + return boost::async([=]() { |
1865 | try { |
1866 | auto client = assign_client(ctx); |
1867 | Client::Stringlist content_id_list{{item_id}}; |
1868 | client->delete_contents(content_id_list); |
1869 | - return make_ready_future(); |
1870 | } catch (ParameterInvalidException& e) { |
1871 | - return make_exceptional_future<void>( |
1872 | + throw boost::enable_current_exception( |
1873 | NotExistsException(string("McloudProvider::delete_item() failed: ") + e.what(), item_id)); |
1874 | } catch (runtime_error& e) { |
1875 | - return make_exceptional_future<void>( |
1876 | + throw boost::enable_current_exception( |
1877 | RemoteCommsException(string("McloudProvider::delete_item() failed: ") + e.what())); |
1878 | } |
1879 | }); |
1880 | @@ -397,21 +451,22 @@ |
1881 | boost::future<Item> McloudProvider::move(string const& item_id, |
1882 | string const& new_parent_id, |
1883 | string const& /*new_name*/, |
1884 | + vector<string> const& keys, |
1885 | Context const& ctx) { |
1886 | //Mcloud doens't support changing content name when moving content |
1887 | - return boost::async([this, item_id, new_parent_id, ctx]() { |
1888 | + return boost::async([=]() { |
1889 | try { |
1890 | auto client = assign_client(ctx); |
1891 | Client::Stringlist folderlist; |
1892 | Client::Stringlist contentlist{{item_id}}; |
1893 | client->move_items(folderlist, contentlist, new_parent_id); |
1894 | auto content = client->content_info(item_id); |
1895 | - return make_ready_future<Item>(content_to_item(content)); |
1896 | + return content_to_item(content, keys); |
1897 | } catch (NonExistentException& e) { |
1898 | - return make_exceptional_future<Item>( |
1899 | - NotExistsException(string("McloudProvider::move() content or folder not exist: ") + e.what(), "")); |
1900 | + throw boost::enable_current_exception( |
1901 | + NotExistsException(string("McloudProvider::move() content or folder not exist: ") + e.what(), item_id)); |
1902 | } catch (runtime_error& e) { |
1903 | - return make_exceptional_future<Item>( |
1904 | + throw boost::enable_current_exception( |
1905 | RemoteCommsException(string("McloudProvider::move() failed: ") + e.what())); |
1906 | } |
1907 | }); |
1908 | @@ -420,21 +475,22 @@ |
1909 | boost::future<Item> McloudProvider::copy(string const& item_id, |
1910 | string const& new_parent_id, |
1911 | string const& /*new_name*/, |
1912 | + vector<string> const& keys, |
1913 | Context const& ctx) { |
1914 | //Mcloud doens't support changing content name when copying content |
1915 | - return boost::async([this, item_id, new_parent_id, ctx]() { |
1916 | + return boost::async([=]() { |
1917 | try { |
1918 | Client::Stringlist content_list{{item_id}}; |
1919 | auto client = assign_client(ctx); |
1920 | auto content_id = client->copy_contents(content_list, new_parent_id)[0]; |
1921 | auto content = client->content_info(content_id); |
1922 | - return make_ready_future<Item>(content_to_item(content)); |
1923 | + return content_to_item(content, keys); |
1924 | } catch (NonExistentException& e) { |
1925 | - return make_exceptional_future<Item>( |
1926 | + throw boost::enable_current_exception( |
1927 | NotExistsException(string("McloudProvider::copy() content or folder not exist: ") + e.what(), |
1928 | item_id)); |
1929 | } catch (runtime_error& e) { |
1930 | - return make_exceptional_future<Item>( |
1931 | + throw boost::enable_current_exception( |
1932 | RemoteCommsException(string("McloudProvider::copy() failed: ") + e.what())); |
1933 | } |
1934 | }); |
1935 | @@ -474,6 +530,7 @@ |
1936 | string const& file_name, |
1937 | int64_t size, |
1938 | bool allow_overwrite, |
1939 | + vector<string> const& keys, |
1940 | Client::Ptr client) |
1941 | : UploadJob(upload_id) |
1942 | , parent_id_(parent_id) |
1943 | @@ -482,6 +539,7 @@ |
1944 | , allow_overwrite_(allow_overwrite) |
1945 | , task_(nullptr) |
1946 | , client_(client) |
1947 | + , keys_(keys) |
1948 | , upload_future_(upload_data()) { |
1949 | } |
1950 | |
1951 | @@ -504,13 +562,13 @@ |
1952 | auto error_str = get<err_index>(upload_ctx); |
1953 | if (upload_ok) { |
1954 | auto content = client_->content_info(task_->content_id()); |
1955 | - return make_ready_future<Item>(content_to_item(content)); |
1956 | + return content_to_item(content, keys_); |
1957 | } |
1958 | |
1959 | - return make_exceptional_future<Item>( |
1960 | + throw boost::enable_current_exception( |
1961 | RemoteCommsException(string("McloudUploadJob::finish() failed: ") + error_str)); |
1962 | } catch (runtime_error& e) { |
1963 | - return make_exceptional_future<Item>( |
1964 | + throw boost::enable_current_exception( |
1965 | RemoteCommsException(string("McloudUploadJob::finish() failed: ") + e.what())); |
1966 | } |
1967 | }); |
1968 | @@ -520,7 +578,7 @@ |
1969 | auto prom = boost::make_shared<boost::promise<tuple<bool, string>>>(); |
1970 | |
1971 | return boost::async([this, prom]() { |
1972 | - std::lock_guard<std::mutex> guard(mutex_); |
1973 | + std::unique_lock<std::mutex> lock(mutex_); |
1974 | |
1975 | int socket_fd = read_socket(); |
1976 | UploadBufferCb buffer_cb{[socket_fd](void* dest, size_t buf_size) -> size_t { |
1977 | @@ -540,7 +598,7 @@ |
1978 | std::cout << " status: " << status_to_string(status) << std::endl; |
1979 | if (status == Task::Status::Complete) { |
1980 | prom->set_value(make_tuple(true, string())); |
1981 | - } else if (status == Task::Status::Canceled || |
1982 | + } else if (status == Task::Status::Cancelled || |
1983 | status == Task::Status::Broken) { |
1984 | prom->set_value(make_tuple(false, task_->error_string())); |
1985 | } |
1986 | @@ -552,7 +610,8 @@ |
1987 | prom->set_value(make_tuple(false, e.what())); |
1988 | } |
1989 | |
1990 | - return prom->get_future(); |
1991 | + lock.unlock(); |
1992 | + return prom->get_future().get(); |
1993 | }); |
1994 | } |
1995 | |
1996 | @@ -592,10 +651,10 @@ |
1997 | auto download_ok = get<succ_index>(download_ctx); |
1998 | auto error_str = get<err_index>(download_ctx); |
1999 | if (download_ok) { |
2000 | - return make_ready_future(); |
2001 | + return; |
2002 | } |
2003 | |
2004 | - return make_exceptional_future<void>( |
2005 | + throw boost::enable_current_exception( |
2006 | RemoteCommsException(string("failed to download from mcloud: ") + error_str)); |
2007 | }); |
2008 | } |
2009 | @@ -604,24 +663,24 @@ |
2010 | auto prom = boost::make_shared<boost::promise<tuple<bool, string>>>(); |
2011 | |
2012 | return boost::async([this, prom]() { |
2013 | - std::lock_guard<std::mutex> guard(mutex_); |
2014 | + std::unique_lock<std::mutex> lock(mutex_); |
2015 | |
2016 | int socket_fd = write_socket(); |
2017 | - DownloadBufferCb buffer_cb{item_id_, |
2018 | - [socket_fd](void* dest, size_t buf_size) -> size_t { |
2019 | - //data writing callback. |
2020 | - return write(socket_fd, dest, buf_size); |
2021 | - } |
2022 | - }; |
2023 | + DownloadRequest request_item{item_id_, |
2024 | + [socket_fd](void* dest, size_t buf_size) -> size_t { |
2025 | + //data writing callback. |
2026 | + return write(socket_fd, dest, buf_size); |
2027 | + } |
2028 | + }; |
2029 | |
2030 | try { |
2031 | - task_ = client_->syncmanager()->add_download_task(buffer_cb); |
2032 | + task_ = client_->syncmanager()->add_download_task(request_item); |
2033 | task_->status_changed() = [this, prom](Task::Status status) { |
2034 | std::cout << " status: " << status_to_string(status) << std::endl; |
2035 | if (status == Task::Status::Complete) { |
2036 | report_complete(); |
2037 | prom->set_value(make_tuple(true, string())); |
2038 | - } else if (status == Task::Status::Canceled || |
2039 | + } else if (status == Task::Status::Cancelled || |
2040 | status == Task::Status::Broken) { |
2041 | prom->set_value(make_tuple(false, task_->error_string())); |
2042 | } |
2043 | @@ -633,7 +692,8 @@ |
2044 | prom->set_value(make_tuple(false, e.what())); |
2045 | } |
2046 | |
2047 | - return prom->get_future(); |
2048 | + lock.unlock(); |
2049 | + return prom->get_future().get(); |
2050 | }); |
2051 | } |
2052 | |
2053 | |
2054 | === modified file 'provider/mcloudprovider.h' |
2055 | --- provider/mcloudprovider.h 2016-10-24 15:25:02 +0000 |
2056 | +++ provider/mcloudprovider.h 2016-12-07 12:44:11 +0000 |
2057 | @@ -24,15 +24,7 @@ |
2058 | using namespace std; |
2059 | using namespace mcloud::api; |
2060 | |
2061 | -using unity::storage::provider::Context; |
2062 | -using unity::storage::provider::DownloadJob; |
2063 | -using unity::storage::provider::ProviderBase; |
2064 | -using unity::storage::provider::Item; |
2065 | -using unity::storage::provider::ItemList; |
2066 | -using unity::storage::provider::UploadJob; |
2067 | - |
2068 | - |
2069 | -class McloudProvider : public ProviderBase { |
2070 | +class McloudProvider : public unity::storage::provider::ProviderBase { |
2071 | public: |
2072 | |
2073 | enum class JobMode { |
2074 | @@ -43,40 +35,47 @@ |
2075 | |
2076 | McloudProvider(); |
2077 | |
2078 | - boost::future<ItemList> roots(Context const& ctx) override; |
2079 | - boost::future<tuple<ItemList, string>> list( |
2080 | - string const& item_id, string const& page_token, |
2081 | - Context const& ctx) override; |
2082 | - boost::future<ItemList> lookup( |
2083 | - string const& parent_id, string const& name, |
2084 | - Context const& ctx) override; |
2085 | - boost::future<Item> metadata( |
2086 | - string const& item_id, Context const& ctx) override; |
2087 | - boost::future<Item> create_folder( |
2088 | - string const& parent_id, string const& name, |
2089 | - Context const& ctx) override; |
2090 | + boost::future<unity::storage::provider::ItemList> roots( |
2091 | + vector<string> const& keys, unity::storage::provider::Context const& ctx) override; |
2092 | + boost::future<tuple<unity::storage::provider::ItemList, string>> list( |
2093 | + string const& item_id, string const& page_token, vector<string> const& keys, |
2094 | + unity::storage::provider::Context const& ctx) override; |
2095 | + boost::future<unity::storage::provider::ItemList> lookup( |
2096 | + string const& parent_id, string const& name, vector<string> const& keys, |
2097 | + unity::storage::provider::Context const& ctx) override; |
2098 | + boost::future<unity::storage::provider::Item> metadata( |
2099 | + string const& item_id, vector<string> const& keys, |
2100 | + unity::storage::provider::Context const& ctx) override; |
2101 | + boost::future<unity::storage::provider::Item> create_folder( |
2102 | + string const& parent_id, string const& name, vector<string> const& keys, |
2103 | + unity::storage::provider::Context const& ctx) override; |
2104 | |
2105 | - boost::future<unique_ptr<UploadJob>> create_file( |
2106 | + boost::future<unique_ptr<unity::storage::provider::UploadJob>> create_file( |
2107 | string const& parent_id, string const& name, |
2108 | int64_t size, string const& content_type, |
2109 | - bool allow_overwrite, Context const& ctx) override; |
2110 | - boost::future<unique_ptr<UploadJob>> update( |
2111 | + bool allow_overwrite, vector<string> const& keys, |
2112 | + unity::storage::provider::Context const& ctx) override; |
2113 | + boost::future<unique_ptr<unity::storage::provider::UploadJob>> update( |
2114 | string const& item_id, int64_t size, |
2115 | - string const& old_etag,Context const& ctx) override; |
2116 | + string const& old_etag, vector<string> const& keys, |
2117 | + unity::storage::provider::Context const& ctx) override; |
2118 | |
2119 | - boost::future<unique_ptr<DownloadJob>> download( |
2120 | - string const& item_id, Context const& ctx) override; |
2121 | + boost::future<unique_ptr<unity::storage::provider::DownloadJob>> download( |
2122 | + string const& item_id, string const& match_etag, |
2123 | + unity::storage::provider::Context const& ctx) override; |
2124 | boost::future<void> delete_item( |
2125 | - string const& item_id, Context const& ctx) override; |
2126 | - boost::future<Item> move( |
2127 | - string const& item_id, string const& new_parent_id, |
2128 | - string const& new_name, Context const& ctx) override; |
2129 | - boost::future<Item> copy( |
2130 | - string const& item_id, string const& new_parent_id, |
2131 | - string const& new_name, Context const& ctx) override; |
2132 | + string const& item_id, unity::storage::provider::Context const& ctx) override; |
2133 | + boost::future<unity::storage::provider::Item> move( |
2134 | + string const& item_id, string const& new_parent_id, |
2135 | + string const& new_name, vector<string> const& keys, |
2136 | + unity::storage::provider::Context const& ctx) override; |
2137 | + boost::future<unity::storage::provider::Item> copy( |
2138 | + string const& item_id, string const& new_parent_id, |
2139 | + string const& new_name, vector<string> const& keys, |
2140 | + unity::storage::provider::Context const& ctx) override; |
2141 | |
2142 | private: |
2143 | - Client::Ptr assign_client(Context const& ctx, JobMode job = JobMode::Unknown); |
2144 | + Client::Ptr assign_client(unity::storage::provider::Context const& ctx, JobMode job = JobMode::Unknown); |
2145 | private: |
2146 | vector<Client::Ptr> client_list_; |
2147 | }; |
2148 | |
2149 | === added file 'provider/storage-provider-mcloud.application' |
2150 | --- provider/storage-provider-mcloud.application 1970-01-01 00:00:00 +0000 |
2151 | +++ provider/storage-provider-mcloud.application 2016-12-07 12:44:11 +0000 |
2152 | @@ -0,0 +1,11 @@ |
2153 | +<?xml version="1.0" encoding="UTF-8" ?> |
2154 | +<application id="storage-provider-mcloud"> |
2155 | + <description>CMCC mcloud storage provider</description> |
2156 | + <desktop-entry>storage-provider-mcloud.desktop</desktop-entry> |
2157 | + |
2158 | + <services> |
2159 | + <service id="storage-provider-mcloud"> |
2160 | + <description>Access cmcc mcloud service</description> |
2161 | + </service> |
2162 | + </services> |
2163 | +</application> |
2164 | |
2165 | === added file 'provider/storage-provider-mcloud.desktop' |
2166 | --- provider/storage-provider-mcloud.desktop 1970-01-01 00:00:00 +0000 |
2167 | +++ provider/storage-provider-mcloud.desktop 2016-12-07 12:44:11 +0000 |
2168 | @@ -0,0 +1,5 @@ |
2169 | +[Desktop Entry] |
2170 | +Type=Application |
2171 | +NoDisplay=true |
2172 | +Name=Mcloud storage provider |
2173 | +Icon=mcloud |
2174 | |
2175 | === added file 'provider/storage-provider-mcloud.service' |
2176 | --- provider/storage-provider-mcloud.service 1970-01-01 00:00:00 +0000 |
2177 | +++ provider/storage-provider-mcloud.service 2016-12-07 12:44:11 +0000 |
2178 | @@ -0,0 +1,7 @@ |
2179 | +<?xml version="1.0" encoding="UTF-8" ?> |
2180 | +<service id="storage-provider-mcloud"> |
2181 | + <type>storage-provider</type> |
2182 | + <name>Mcloud</name> |
2183 | + <icon>mcloud</icon> |
2184 | + <provider>mcloud</provider> |
2185 | +</service> |
2186 | |
2187 | === modified file 'src/mcloud/api/client.cpp' |
2188 | --- src/mcloud/api/client.cpp 2016-10-26 08:50:32 +0000 |
2189 | +++ src/mcloud/api/client.cpp 2016-12-07 12:44:11 +0000 |
2190 | @@ -31,16 +31,16 @@ |
2191 | p_->sync_manager()->cancel(); |
2192 | } |
2193 | |
2194 | -void Client::set_access_token(const string& access_token) { |
2195 | +void Client::set_access_token(const string &access_token) { |
2196 | p_->set_access_token(access_token); |
2197 | } |
2198 | |
2199 | -bool Client::refresh_token(const string& refresh_token) { |
2200 | +bool Client::refresh_token(const string &refresh_token) { |
2201 | return p_->refersh_token(refresh_token); |
2202 | } |
2203 | |
2204 | -string Client::cloud_root_folder_id() { |
2205 | - return p_->cloud_sync_folder_id(); |
2206 | +string Client::root_folder_id() { |
2207 | + return p_->root_folder_id(); |
2208 | } |
2209 | |
2210 | DiskInfo::Ptr Client::disk_info() { |
2211 | @@ -48,62 +48,62 @@ |
2212 | } |
2213 | |
2214 | Client::ResourceList Client::cloud_content_list(int start_index, |
2215 | - int count, |
2216 | - CloudContent::Type type, |
2217 | - const string& folder_id) { |
2218 | + int count, |
2219 | + CloudContent::Type type, |
2220 | + const string &folder_id) { |
2221 | return p_->cloud_content_list(start_index, count, type, folder_id); |
2222 | } |
2223 | |
2224 | -CloudContent::Ptr Client::content_info(const string& content_id) { |
2225 | +CloudContent::Ptr Client::content_info(const string &content_id) { |
2226 | return p_->content_info(content_id); |
2227 | } |
2228 | |
2229 | -CloudFolder::Ptr Client::create_folder(const string& folder_name, |
2230 | - const string& folder_id) { |
2231 | +CloudFolder::Ptr Client::create_folder(const string &folder_name, |
2232 | + const string &folder_id) { |
2233 | return p_->create_folder(folder_name, folder_id); |
2234 | } |
2235 | |
2236 | -Client::ResourceList Client::look_up(const string& name, |
2237 | - const string& folder_id, |
2238 | +Client::ResourceList Client::look_up(const string &name, |
2239 | + const string &folder_id, |
2240 | CloudResource::Property property) { |
2241 | return p_->look_up(name, folder_id, property); |
2242 | } |
2243 | |
2244 | -Client::OutlinkList Client::create_folder_sharing_url(const Stringlist& folder_ids) { |
2245 | +Client::OutlinkList Client::create_folder_sharing_url(const Stringlist &folder_ids) { |
2246 | return p_->create_folder_sharing_url(folder_ids); |
2247 | } |
2248 | |
2249 | -Client::OutlinkList Client::create_content_sharing_url(const Stringlist& content_ids) { |
2250 | +Client::OutlinkList Client::create_content_sharing_url(const Stringlist &content_ids) { |
2251 | return p_->create_content_sharing_url(content_ids); |
2252 | } |
2253 | |
2254 | -Client::Stringlist Client::copy_folders(const Stringlist& folder_ids, |
2255 | - const string& folder_id) { |
2256 | +Client::Stringlist Client::copy_folders(const Stringlist &folder_ids, |
2257 | + const string &folder_id) { |
2258 | return p_->copy_folders(folder_ids, folder_id); |
2259 | } |
2260 | |
2261 | -Client::Stringlist Client::copy_contents(const Stringlist& contents_ids, |
2262 | - const string& folder_id) { |
2263 | +Client::Stringlist Client::copy_contents(const Stringlist &contents_ids, |
2264 | + const string &folder_id) { |
2265 | return p_->copy_contents(contents_ids, folder_id); |
2266 | } |
2267 | |
2268 | -bool Client::move_items(const Stringlist& folder_ids, |
2269 | - const Stringlist& content_ids, |
2270 | - const string& folder_id) { |
2271 | +bool Client::move_items(const Stringlist &folder_ids, |
2272 | + const Stringlist &content_ids, |
2273 | + const string &folder_id) { |
2274 | return p_->move_items(folder_ids, content_ids, folder_id); |
2275 | } |
2276 | |
2277 | -bool Client::update_folder(const string& folder_id, |
2278 | - const string& new_folder_name) { |
2279 | +bool Client::update_folder(const string &folder_id, |
2280 | + const string &new_folder_name) { |
2281 | return p_->update_folder(folder_id, new_folder_name); |
2282 | } |
2283 | |
2284 | -bool Client::delete_contents(const vector<string>& content_ids) { |
2285 | +bool Client::delete_contents(const vector<string> &content_ids) { |
2286 | return p_->delete_contents(content_ids); |
2287 | } |
2288 | |
2289 | -bool Client::exist_on_cloud(const string& file_path, |
2290 | - const string& folder_id) { |
2291 | +bool Client::exist_on_cloud(const string &file_path, |
2292 | + const string &folder_id) { |
2293 | return p_->exist_on_cloud(file_path, folder_id); |
2294 | } |
2295 | |
2296 | |
2297 | === modified file 'src/mcloud/api/client_priv.cpp' |
2298 | --- src/mcloud/api/client_priv.cpp 2016-10-26 08:50:32 +0000 |
2299 | +++ src/mcloud/api/client_priv.cpp 2016-12-07 12:44:11 +0000 |
2300 | @@ -17,15 +17,11 @@ |
2301 | */ |
2302 | |
2303 | #include "client_priv.h" |
2304 | -#include "downloadtask_priv.h" |
2305 | #include "config.h" |
2306 | |
2307 | #include <mcloud/api/cloudfolder.h> |
2308 | #include <mcloud/api/cloudcontent.h> |
2309 | #include <mcloud/api/diskinfo.h> |
2310 | -#include <mcloud/api/downloadtask.h> |
2311 | -#include <mcloud/api/uploadtask.h> |
2312 | -#include <mcloud/api/cloudresource.h> |
2313 | #include <mcloud/api/outlink.h> |
2314 | #include <mcloud/api/exceptions.h> |
2315 | |
2316 | @@ -59,26 +55,26 @@ |
2317 | using namespace std; |
2318 | |
2319 | namespace { |
2320 | - void log(const string& info) { |
2321 | -#ifndef NDEBUG |
2322 | + void log(const string &info) { |
2323 | + #ifndef NDEBUG |
2324 | cout << info << endl; |
2325 | -#else |
2326 | + #else |
2327 | (void)(info); |
2328 | -#endif |
2329 | + #endif |
2330 | } |
2331 | |
2332 | - static constexpr const char* content_type = "text/xml;UTF-8"; |
2333 | - static constexpr const char* register_app_name = "和彩云ubuntu"; |
2334 | - static constexpr const char* thirdparty_anonymous_account = "thirdparty_anonymous_account"; |
2335 | + static constexpr const char *content_type = "text/xml;UTF-8"; |
2336 | + static constexpr const char *register_app_name = "和彩云ubuntu"; |
2337 | + static constexpr const char *thirdparty_anonymous_account = "thirdparty_anonymous_account"; |
2338 | |
2339 | - string encode64(const string& val) { |
2340 | + string encode64(const string &val) { |
2341 | typedef base64_from_binary<transform_width<string::const_iterator, 6, 8>> iter; |
2342 | auto tmp = string(iter(std::begin(val)), iter(std::end(val))); |
2343 | return tmp.append((3 - val.size() % 3) % 3, '='); |
2344 | } |
2345 | |
2346 | static string md5sum(string filepath) { |
2347 | - std::ifstream ifs(filepath, std::ios::binary); |
2348 | + ifstream ifs(filepath, ios::binary); |
2349 | |
2350 | if (!ifs.good()) { |
2351 | std::cerr << "file is invalid: " << filepath << std::endl; |
2352 | @@ -104,9 +100,9 @@ |
2353 | return stream.str(); |
2354 | } |
2355 | |
2356 | - static void append_child(tinyxml2::XMLPrinter& printer, |
2357 | - const string& field, |
2358 | - const string& value) { |
2359 | + static void append_child(tinyxml2::XMLPrinter &printer, |
2360 | + const string &field, |
2361 | + const string &value) { |
2362 | printer.OpenElement(field.c_str()); |
2363 | printer.PushText(value.c_str()); |
2364 | printer.CloseElement(); |
2365 | @@ -124,7 +120,7 @@ |
2366 | static string generate_contents_body(int start_index = -1, |
2367 | int count = 200, |
2368 | CloudContent::Type content_type = CloudContent::Type::All, |
2369 | - const string& shared_folder_id = string()) { |
2370 | + const string &shared_folder_id = string()) { |
2371 | tinyxml2::XMLPrinter printer; |
2372 | printer.OpenElement("getDisk"); |
2373 | |
2374 | @@ -137,11 +133,11 @@ |
2375 | append_child(printer, "catalogID", shared_folder_id.empty() ? "root" : shared_folder_id.c_str()); |
2376 | append_child(printer, "filterType", "0"); |
2377 | append_child(printer, "catalogSortType", "0"); |
2378 | - append_child(printer, "contentType", std::to_string((int)content_type).c_str()); |
2379 | + append_child(printer, "contentType", to_string((int)content_type).c_str()); |
2380 | append_child(printer, "contentSortType", "0"); |
2381 | append_child(printer, "sortDirection", "1"); |
2382 | - append_child(printer, "startNumber", std::to_string(start_index).c_str()); |
2383 | - append_child(printer, "endNumber", std::to_string(start_index + count - 1).c_str()); |
2384 | + append_child(printer, "startNumber", to_string(start_index).c_str()); |
2385 | + append_child(printer, "endNumber", to_string(start_index + count - 1).c_str()); |
2386 | append_child(printer, "catalogType", "-1"); |
2387 | |
2388 | printer.CloseElement(); |
2389 | @@ -149,7 +145,7 @@ |
2390 | return string(printer.CStr()); |
2391 | } |
2392 | |
2393 | - static string generate_content_body(const string& content_id) { |
2394 | + static string generate_content_body(const string &content_id) { |
2395 | tinyxml2::XMLPrinter printer; |
2396 | printer.OpenElement("getContentInfo"); |
2397 | append_child(printer, "ContentID", content_id); |
2398 | @@ -160,21 +156,21 @@ |
2399 | return string(printer.CStr()); |
2400 | } |
2401 | |
2402 | - static string generate_delete_body(const std::vector<string>& item_ids) { |
2403 | + static string generate_delete_body(const vector<string> &item_ids) { |
2404 | tinyxml2::XMLPrinter printer; |
2405 | printer.OpenElement("delCatalogContent"); |
2406 | |
2407 | append_child(printer, "MSISDN", thirdparty_anonymous_account); |
2408 | printer.OpenElement("catalogIDs"); |
2409 | - printer.PushAttribute("length", std::to_string(item_ids.size()).c_str()); |
2410 | - for (auto& item_id : item_ids) { |
2411 | + printer.PushAttribute("length", to_string(item_ids.size()).c_str()); |
2412 | + for (const auto &item_id : item_ids) { |
2413 | append_child(printer, "ID", item_id.c_str()); |
2414 | } |
2415 | printer.CloseElement(); |
2416 | |
2417 | printer.OpenElement("contentIDs"); |
2418 | - printer.PushAttribute("length", std::to_string(item_ids.size()).c_str()); |
2419 | - for (auto& content_id : item_ids) { |
2420 | + printer.PushAttribute("length", to_string(item_ids.size()).c_str()); |
2421 | + for (const auto &content_id : item_ids) { |
2422 | append_child(printer, "ID", content_id.c_str()); |
2423 | } |
2424 | printer.CloseElement(); |
2425 | @@ -184,23 +180,23 @@ |
2426 | return string(printer.CStr()); |
2427 | } |
2428 | |
2429 | - static string generate_copy_body(const vector<string>& dir_ids, |
2430 | - const vector<string>& content_ids, |
2431 | - const string& new_folder_id) { |
2432 | + static string generate_copy_body(const vector<string> &dir_ids, |
2433 | + const vector<string> &content_ids, |
2434 | + const string &new_folder_id) { |
2435 | tinyxml2::XMLPrinter printer; |
2436 | printer.OpenElement("copyContentCatalog"); |
2437 | |
2438 | append_child(printer, "MSISDN", thirdparty_anonymous_account); |
2439 | printer.OpenElement("contentInfoList"); |
2440 | - printer.PushAttribute("length", std::to_string(content_ids.size()).c_str()); |
2441 | - for (auto& content_id : content_ids) { |
2442 | + printer.PushAttribute("length", to_string(content_ids.size()).c_str()); |
2443 | + for (const auto &content_id : content_ids) { |
2444 | append_child(printer, "ID", content_id.c_str()); |
2445 | } |
2446 | printer.CloseElement(); |
2447 | |
2448 | printer.OpenElement("catalogInfoList"); |
2449 | - printer.PushAttribute("length", std::to_string(dir_ids.size()).c_str()); |
2450 | - for (auto& dir_id : dir_ids) { |
2451 | + printer.PushAttribute("length", to_string(dir_ids.size()).c_str()); |
2452 | + for (const auto &dir_id : dir_ids) { |
2453 | append_child(printer, "ID", dir_id.c_str()); |
2454 | } |
2455 | printer.CloseElement(); |
2456 | @@ -212,8 +208,8 @@ |
2457 | return string(printer.CStr()); |
2458 | } |
2459 | |
2460 | - static string generate_update_folder_body(const string& folder_id, |
2461 | - const string& new_folder_name) { |
2462 | + static string generate_update_folder_body(const string &folder_id, |
2463 | + const string &new_folder_name) { |
2464 | tinyxml2::XMLPrinter printer; |
2465 | printer.OpenElement("updateCatalogInfo"); |
2466 | append_child(printer, "MSISDN", thirdparty_anonymous_account); |
2467 | @@ -224,8 +220,8 @@ |
2468 | return string(printer.CStr()); |
2469 | } |
2470 | |
2471 | - static string generate_create_folder_body(const string& folder_name, |
2472 | - const string& folder_id) { |
2473 | + static string generate_create_folder_body(const string &folder_name, |
2474 | + const string &folder_id) { |
2475 | tinyxml2::XMLPrinter printer; |
2476 | printer.OpenElement("createCatalogExt"); |
2477 | printer.OpenElement("createCatalogExtReq"); |
2478 | @@ -241,16 +237,16 @@ |
2479 | return string(printer.CStr()); |
2480 | } |
2481 | |
2482 | - static string generate_look_up_body(const string& name, |
2483 | - const string& folder_id, |
2484 | + static string generate_look_up_body(const string &name, |
2485 | + const string &folder_id, |
2486 | CloudResource::Property property) { |
2487 | -#if 1 |
2488 | + #if 1 |
2489 | tinyxml2::XMLPrinter printer; |
2490 | printer.OpenElement("advanceSearch"); |
2491 | printer.OpenElement("advanceSearchReq"); |
2492 | |
2493 | append_child(printer, "account", thirdparty_anonymous_account); |
2494 | - append_child(printer, "scope", std::to_string((int)property)); |
2495 | + append_child(printer, "scope", to_string((int)property)); |
2496 | |
2497 | printer.OpenElement("fileCond"); |
2498 | |
2499 | @@ -261,7 +257,7 @@ |
2500 | |
2501 | printer.CloseElement(); |
2502 | printer.CloseElement(); |
2503 | -#else |
2504 | + #else |
2505 | tinyxml2::XMLPrinter printer; |
2506 | printer.OpenElement("simpleSearch"); |
2507 | printer.OpenElement("simpleSearchReq"); |
2508 | @@ -272,28 +268,28 @@ |
2509 | |
2510 | printer.CloseElement(); |
2511 | printer.CloseElement(); |
2512 | -#endif |
2513 | + #endif |
2514 | return string(printer.CStr()); |
2515 | } |
2516 | |
2517 | - static string generate_move_body(const Client::Stringlist& dir_ids, |
2518 | - const Client::Stringlist& content_ids, |
2519 | - const string& folder_id) { |
2520 | + static string generate_move_body(const Client::Stringlist &dir_ids, |
2521 | + const Client::Stringlist &content_ids, |
2522 | + const string &folder_id) { |
2523 | tinyxml2::XMLPrinter printer; |
2524 | printer.OpenElement("moveContentCatalog"); |
2525 | |
2526 | append_child(printer, "MSISDN", thirdparty_anonymous_account); |
2527 | |
2528 | printer.OpenElement("contentInfoList"); |
2529 | - printer.PushAttribute("length", std::to_string(content_ids.size()).c_str()); |
2530 | - for (auto& content_id : content_ids) { |
2531 | + printer.PushAttribute("length", to_string(content_ids.size()).c_str()); |
2532 | + for (const auto &content_id : content_ids) { |
2533 | append_child(printer, "ID", content_id.c_str()); |
2534 | } |
2535 | printer.CloseElement(); |
2536 | |
2537 | printer.OpenElement("catalogInfoList"); |
2538 | - printer.PushAttribute("length", std::to_string(dir_ids.size()).c_str()); |
2539 | - for (auto& dir_id : dir_ids) { |
2540 | + printer.PushAttribute("length", to_string(dir_ids.size()).c_str()); |
2541 | + for (const auto &dir_id : dir_ids) { |
2542 | append_child(printer, "ID", dir_id.c_str()); |
2543 | } |
2544 | printer.CloseElement(); |
2545 | @@ -305,23 +301,23 @@ |
2546 | return string(printer.CStr()); |
2547 | } |
2548 | |
2549 | - static string generate_extranet_body(const Client::Stringlist& dir_ids, |
2550 | - const Client::Stringlist& content_ids) { |
2551 | + static string generate_extranet_body(const Client::Stringlist &dir_ids, |
2552 | + const Client::Stringlist &content_ids) { |
2553 | tinyxml2::XMLPrinter printer; |
2554 | printer.OpenElement("getOutLink"); |
2555 | printer.OpenElement("getOutLinkReq"); |
2556 | |
2557 | append_child(printer, "account", thirdparty_anonymous_account); |
2558 | printer.OpenElement("caIDLst"); |
2559 | - printer.PushAttribute("length", std::to_string(dir_ids.size()).c_str()); |
2560 | - for (auto& dir_id : dir_ids) { |
2561 | + printer.PushAttribute("length", to_string(dir_ids.size()).c_str()); |
2562 | + for (const auto &dir_id : dir_ids) { |
2563 | append_child(printer, "item", dir_id.c_str()); |
2564 | } |
2565 | printer.CloseElement(); |
2566 | |
2567 | printer.OpenElement("coIDLst"); |
2568 | - printer.PushAttribute("length", std::to_string(content_ids.size()).c_str()); |
2569 | - for (auto& content_id : content_ids) { |
2570 | + printer.PushAttribute("length", to_string(content_ids.size()).c_str()); |
2571 | + for (const auto &content_id : content_ids) { |
2572 | append_child(printer, "item", content_id.c_str()); |
2573 | } |
2574 | printer.CloseElement(); |
2575 | @@ -334,7 +330,7 @@ |
2576 | return string(printer.CStr()); |
2577 | } |
2578 | |
2579 | - static string generate_download_body(const string& content_id) { |
2580 | + static string generate_download_body(const string &content_id) { |
2581 | tinyxml2::XMLPrinter printer; |
2582 | printer.OpenElement("downloadRequest"); |
2583 | append_child(printer, "appName", register_app_name); |
2584 | @@ -354,33 +350,33 @@ |
2585 | return string(printer.CStr()); |
2586 | } |
2587 | |
2588 | - static string generate_upload_body(const UploadRequest& request_item) { |
2589 | + static string generate_upload_body(const UploadRequest &request_item) { |
2590 | tinyxml2::XMLPrinter printer; |
2591 | printer.OpenElement("pcUploadFileRequest"); |
2592 | append_child(printer, "ownerMSISDN", thirdparty_anonymous_account); |
2593 | append_child(printer, "fileCount", "1"); |
2594 | |
2595 | int64_t file_size = 0; |
2596 | - if (fs::exists(request_item.file_path)) { |
2597 | - file_size = fs::file_size(request_item.file_path); |
2598 | + if (fs::exists(request_item.local_file_path)) { |
2599 | + file_size = fs::file_size(request_item.local_file_path); |
2600 | } else { |
2601 | - throw std::runtime_error("file not exists"); |
2602 | + throw runtime_error("file not exists"); |
2603 | } |
2604 | - append_child(printer, "totalSize", std::to_string(file_size).c_str()); |
2605 | + append_child(printer, "totalSize", to_string(file_size).c_str()); |
2606 | |
2607 | printer.OpenElement("uploadContentList"); |
2608 | printer.PushAttribute("length", "1"); |
2609 | |
2610 | printer.OpenElement("uploadContentInfo"); |
2611 | append_child(printer, "contentName", request_item.content_name.empty() ? |
2612 | - fs::path(request_item.file_path).filename().c_str() : request_item.content_name); |
2613 | - append_child(printer, "contentSize", std::to_string(file_size).c_str()); |
2614 | + fs::path(request_item.local_file_path).filename().c_str() : request_item.content_name); |
2615 | + append_child(printer, "contentSize", to_string(file_size).c_str()); |
2616 | append_child(printer, "contentDesc", ""); |
2617 | append_child(printer, "contentTAGList", ""); |
2618 | |
2619 | //The parameter to check upload files' md5sum |
2620 | //"isNeedupload" field in response body will indicate if the file exists in mcloud. |
2621 | - append_child(printer, "digest", md5sum(request_item.file_path)); |
2622 | + append_child(printer, "digest", md5sum(request_item.local_file_path)); |
2623 | |
2624 | printer.CloseElement(); |
2625 | printer.CloseElement(); |
2626 | @@ -392,20 +388,20 @@ |
2627 | return string(printer.CStr()); |
2628 | } |
2629 | |
2630 | - static string generate_upload_body(const UploadBufferCb& buffer_cb) { |
2631 | + static string generate_upload_body(const UploadBufferCb &buffer_cb) { |
2632 | tinyxml2::XMLPrinter printer; |
2633 | printer.OpenElement("pcUploadFileRequest"); |
2634 | append_child(printer, "ownerMSISDN", thirdparty_anonymous_account); |
2635 | append_child(printer, "fileCount", "1"); |
2636 | |
2637 | - append_child(printer, "totalSize", std::to_string(buffer_cb.buffer_size).c_str()); |
2638 | + append_child(printer, "totalSize", to_string(buffer_cb.total_size).c_str()); |
2639 | |
2640 | printer.OpenElement("uploadContentList"); |
2641 | printer.PushAttribute("length", "1"); |
2642 | |
2643 | printer.OpenElement("uploadContentInfo"); |
2644 | append_child(printer, "contentName", buffer_cb.content_name); |
2645 | - append_child(printer, "contentSize", std::to_string(buffer_cb.buffer_size).c_str()); |
2646 | + append_child(printer, "contentSize", to_string(buffer_cb.total_size).c_str()); |
2647 | append_child(printer, "contentDesc", ""); |
2648 | append_child(printer, "contentTAGList", ""); |
2649 | |
2650 | @@ -421,8 +417,8 @@ |
2651 | } |
2652 | |
2653 | template<typename T> |
2654 | - static void set_auth_exception(const shared_ptr<std::promise<T>>& prom, |
2655 | - const string json_data) { |
2656 | + static void set_auth_exception(const shared_ptr<std::promise<T>> &prom, |
2657 | + const string &json_data) { |
2658 | |
2659 | string error_info = json_data; |
2660 | boost::cmatch cap; |
2661 | @@ -435,34 +431,33 @@ |
2662 | } |
2663 | |
2664 | template<typename T> |
2665 | - static void set_exception(const shared_ptr<std::promise<T>>& prom, |
2666 | - const tinyxml2::XMLElement* root) { |
2667 | + static void set_exception(const shared_ptr<std::promise<T>> &prom, |
2668 | + const tinyxml2::XMLElement *root) { |
2669 | ClientPriv::ServerCode err_code = (ClientPriv::ServerCode)stoi(root->Attribute("resultCode")); |
2670 | switch (err_code) { |
2671 | - case ClientPriv::ServerCode::CATALOGID_INVALID: |
2672 | - case ClientPriv::ServerCode::CONTENTID_INVALID: |
2673 | - prom->set_exception(make_exception_ptr(InvalidIDException(root->Attribute("desc")))); |
2674 | - break; |
2675 | - case ClientPriv::ServerCode::CATALOG_NOT_EXIST: |
2676 | - case ClientPriv::ServerCode::CONTENT_AND_CATALOG_NOT_EXIST: |
2677 | - case ClientPriv::ServerCode::CONTENT_NOT_EXIST: |
2678 | - prom->set_exception(make_exception_ptr(NonExistentException(root->Attribute("desc")))); |
2679 | - break; |
2680 | - case ClientPriv::ServerCode::USER_SPACE_LACKED: |
2681 | - prom->set_exception(make_exception_ptr(OutofSpaceException(root->Attribute("desc")))); |
2682 | - break; |
2683 | - case ClientPriv::ServerCode::PARAMETER_INVALID: |
2684 | - prom->set_exception(make_exception_ptr(ParameterInvalidException(root->Attribute("desc")))); |
2685 | - break; |
2686 | - case ClientPriv::ServerCode::CREDENTIAL_FAILED: |
2687 | - prom->set_exception(make_exception_ptr(CredentialException(root->Attribute("desc")))); |
2688 | - break; |
2689 | - default: |
2690 | - prom->set_exception(make_exception_ptr(runtime_error(root->Attribute("desc")))); |
2691 | - break; |
2692 | + case ClientPriv::ServerCode::CATALOGID_INVALID: |
2693 | + case ClientPriv::ServerCode::CONTENTID_INVALID: |
2694 | + prom->set_exception(make_exception_ptr(InvalidIDException(root->Attribute("desc")))); |
2695 | + break; |
2696 | + case ClientPriv::ServerCode::CATALOG_NOT_EXIST: |
2697 | + case ClientPriv::ServerCode::CONTENT_AND_CATALOG_NOT_EXIST: |
2698 | + case ClientPriv::ServerCode::CONTENT_NOT_EXIST: |
2699 | + prom->set_exception(make_exception_ptr(NonExistentException(root->Attribute("desc")))); |
2700 | + break; |
2701 | + case ClientPriv::ServerCode::USER_SPACE_LACKED: |
2702 | + prom->set_exception(make_exception_ptr(OutofSpaceException(root->Attribute("desc")))); |
2703 | + break; |
2704 | + case ClientPriv::ServerCode::PARAMETER_INVALID: |
2705 | + prom->set_exception(make_exception_ptr(ParameterInvalidException(root->Attribute("desc")))); |
2706 | + break; |
2707 | + case ClientPriv::ServerCode::CREDENTIAL_FAILED: |
2708 | + prom->set_exception(make_exception_ptr(CredentialException(root->Attribute("desc")))); |
2709 | + break; |
2710 | + default: |
2711 | + prom->set_exception(make_exception_ptr(runtime_error(root->Attribute("desc")))); |
2712 | + break; |
2713 | } |
2714 | } |
2715 | - |
2716 | } |
2717 | |
2718 | class ClientPriv::HttpClient { |
2719 | @@ -470,9 +465,7 @@ |
2720 | HttpClient(int request_timeout) : |
2721 | client_(http::make_client()), |
2722 | cancelled_(false), |
2723 | - worker_ {[this]() { |
2724 | - client_->run(); |
2725 | - }} { |
2726 | + worker_ {[this]() { client_->run(); }} { |
2727 | config_.request_timeout = request_timeout; |
2728 | } |
2729 | |
2730 | @@ -493,9 +486,9 @@ |
2731 | |
2732 | std::thread worker_; |
2733 | |
2734 | - void get(const net::Uri::Path& path, |
2735 | - const net::Uri::QueryParameters& parameters, |
2736 | - http::Request::Handler& handler) { |
2737 | + void get(const net::Uri::Path &path, |
2738 | + const net::Uri::QueryParameters ¶meters, |
2739 | + http::Request::Handler &handler) { |
2740 | auto configuration = net_config(path, parameters); |
2741 | configuration.header.add("User-Agent", config_.user_agent); |
2742 | |
2743 | @@ -503,11 +496,11 @@ |
2744 | request->async_execute(handler); |
2745 | } |
2746 | |
2747 | - void post(const net::Uri::Path& path, |
2748 | - const net::Uri::QueryParameters& parameters, |
2749 | - const string& postbody, |
2750 | - const string& content_type, |
2751 | - http::Request::Handler& handler) { |
2752 | + void post(const net::Uri::Path &path, |
2753 | + const net::Uri::QueryParameters ¶meters, |
2754 | + const string &postbody, |
2755 | + const string &content_type, |
2756 | + http::Request::Handler &handler) { |
2757 | std::lock_guard<std::mutex> lock(config_mutex_); |
2758 | http::Request::Configuration configuration = net_config(path, parameters); |
2759 | configuration.header.add("User-Agent", config_.user_agent); |
2760 | @@ -518,8 +511,8 @@ |
2761 | request->async_execute(handler); |
2762 | } |
2763 | |
2764 | - http::Request::Configuration net_config(const net::Uri::Path& path, |
2765 | - const net::Uri::QueryParameters& parameters) { |
2766 | + http::Request::Configuration net_config(const net::Uri::Path &path, |
2767 | + const net::Uri::QueryParameters ¶meters) { |
2768 | http::Request::Configuration configuration; |
2769 | net::Uri::QueryParameters complete_parameters(parameters); |
2770 | if (!config_.access_token.empty()) { |
2771 | @@ -543,14 +536,14 @@ |
2772 | } |
2773 | |
2774 | template<typename T> |
2775 | - future<T> async_get(const net::Uri::Path& path, |
2776 | - const net::Uri::QueryParameters& parameters, |
2777 | - const function<T(const tinyxml2::XMLElement* root)>& func) { |
2778 | + future<T> async_get(const net::Uri::Path &path, |
2779 | + const net::Uri::QueryParameters ¶meters, |
2780 | + const function<T(const tinyxml2::XMLElement *root)> &func) { |
2781 | auto prom = make_shared<promise<T>>(); |
2782 | |
2783 | http::Request::Handler handler; |
2784 | handler.on_progress( |
2785 | - [this](const http::Request::Progress& /*progress*/) { |
2786 | + [this](const http::Request::Progress & /*progress*/) { |
2787 | return cancelled_ ? |
2788 | http::Request::Progress::Next::abort_operation : |
2789 | http::Request::Progress::Next::continue_operation; |
2790 | @@ -562,7 +555,7 @@ |
2791 | [prom, func](const http::Response & response) { |
2792 | tinyxml2::XMLDocument doc; |
2793 | tinyxml2::XMLError error = doc.Parse(response.body.c_str()); |
2794 | - const tinyxml2::XMLElement* root = doc.FirstChildElement(); |
2795 | + const tinyxml2::XMLElement *root = doc.FirstChildElement(); |
2796 | |
2797 | if (error != tinyxml2::XML_SUCCESS) { |
2798 | prom->set_exception(make_exception_ptr(runtime_error("xml parse failed"))); |
2799 | @@ -579,16 +572,16 @@ |
2800 | } |
2801 | |
2802 | template<typename T> |
2803 | - future<T> async_post(const net::Uri::Path& path, |
2804 | - const net::Uri::QueryParameters& parameters, |
2805 | - const string& postmsg, |
2806 | - const string& content_type, |
2807 | - const function<T(const tinyxml2::XMLElement* root)>& func) { |
2808 | + future<T> async_post(const net::Uri::Path &path, |
2809 | + const net::Uri::QueryParameters ¶meters, |
2810 | + const string &postmsg, |
2811 | + const string &content_type, |
2812 | + const function<T(const tinyxml2::XMLElement *root)> &func) { |
2813 | auto prom = make_shared<promise<T>>(); |
2814 | |
2815 | http::Request::Handler handler; |
2816 | handler.on_progress( |
2817 | - [this](const http::Request::Progress& /*progress*/) { |
2818 | + [this](const http::Request::Progress & /*progress*/) { |
2819 | return cancelled_ ? |
2820 | http::Request::Progress::Next::abort_operation : |
2821 | http::Request::Progress::Next::continue_operation; |
2822 | @@ -614,7 +607,7 @@ |
2823 | } else { |
2824 | error = doc.Parse(response.body.c_str()); |
2825 | } |
2826 | - const tinyxml2::XMLElement* result = doc.FirstChildElement(); |
2827 | + const tinyxml2::XMLElement *result = doc.FirstChildElement(); |
2828 | |
2829 | if (error != tinyxml2::XML_SUCCESS) { |
2830 | set_auth_exception(prom, response.body); |
2831 | @@ -643,9 +636,9 @@ |
2832 | httpclient_->cancelled_ = true; |
2833 | } |
2834 | |
2835 | -string ClientPriv::cloud_sync_folder_id() { |
2836 | +string ClientPriv::root_folder_id() { |
2837 | Client::ResourceList folderlist = cloud_root_folder_list(); |
2838 | - for (auto& folder : folderlist) { |
2839 | + for (auto &folder : folderlist) { |
2840 | CloudFolder::Ptr cloudfolder = std::static_pointer_cast<CloudFolder>(folder); |
2841 | if (cloudfolder->folder_type() == CloudFolder::Type::Sync) { |
2842 | return cloudfolder->id(); |
2843 | @@ -655,14 +648,14 @@ |
2844 | return string(); |
2845 | } |
2846 | |
2847 | -void ClientPriv::set_access_token(const string& access_token) { |
2848 | +void ClientPriv::set_access_token(const string &access_token) { |
2849 | httpclient_->config_.access_token = access_token; |
2850 | } |
2851 | |
2852 | -bool ClientPriv::exist_on_cloud(const string& file_path, |
2853 | - const string& folder_id) { |
2854 | +bool ClientPriv::exist_on_cloud(const string &file_path, |
2855 | + const string &folder_id) { |
2856 | if (!fs::exists(file_path)) { |
2857 | - throw std::runtime_error(string("file not exists: ").append(file_path)); |
2858 | + throw runtime_error(string("file not exists: ").append(file_path)); |
2859 | } |
2860 | |
2861 | UploadRequest request_item{file_path, folder_id, ""}; |
2862 | @@ -688,7 +681,7 @@ |
2863 | Client::ResourceList ClientPriv::cloud_content_list(int start_index, |
2864 | int count, |
2865 | CloudContent::Type type, |
2866 | - const string& folder_id) { |
2867 | + const string &folder_id) { |
2868 | string postbody = generate_contents_body(start_index, |
2869 | count, |
2870 | type, |
2871 | @@ -696,122 +689,96 @@ |
2872 | return cloud_content_list_internal(postbody); |
2873 | } |
2874 | |
2875 | -CloudContent::Ptr ClientPriv::content_info(const string& content_id) { |
2876 | +CloudContent::Ptr ClientPriv::content_info(const string &content_id) { |
2877 | string postbody = generate_content_body(content_id); |
2878 | return content_item_internal(postbody); |
2879 | } |
2880 | |
2881 | -CloudFolder::Ptr ClientPriv::create_folder(const string& folder_name, |
2882 | - const string& folder_id) { |
2883 | +CloudFolder::Ptr ClientPriv::create_folder(const string &folder_name, |
2884 | + const string &folder_id) { |
2885 | string postbody = generate_create_folder_body(folder_name, folder_id); |
2886 | return create_folder_internal(postbody); |
2887 | } |
2888 | |
2889 | -Client::ResourceList ClientPriv::look_up(const string& name, |
2890 | - const string& folder_id, |
2891 | +Client::ResourceList ClientPriv::look_up(const string &name, |
2892 | + const string &folder_id, |
2893 | CloudResource::Property property) { |
2894 | string postbody = generate_look_up_body(name, folder_id, property); |
2895 | return look_up_internal(postbody); |
2896 | } |
2897 | |
2898 | -bool ClientPriv::move_items(const Client::Stringlist& folder_ids, |
2899 | - const Client::Stringlist& content_ids, |
2900 | - const string& folder_id) { |
2901 | +bool ClientPriv::move_items(const Client::Stringlist &folder_ids, |
2902 | + const Client::Stringlist &content_ids, |
2903 | + const string &folder_id) { |
2904 | string postbody = generate_move_body(folder_ids, content_ids, |
2905 | folder_id); |
2906 | return move_items_internal(postbody); |
2907 | } |
2908 | |
2909 | -bool ClientPriv::update_folder(const string& folder_id, |
2910 | - const string& new_folder_name) { |
2911 | +bool ClientPriv::update_folder(const string &folder_id, |
2912 | + const string &new_folder_name) { |
2913 | string postbody = generate_update_folder_body(folder_id, new_folder_name); |
2914 | return update_internal(postbody); |
2915 | } |
2916 | |
2917 | -bool ClientPriv::delete_contents(const Client::Stringlist& content_ids) { |
2918 | +bool ClientPriv::delete_contents(const Client::Stringlist &content_ids) { |
2919 | string postbody = generate_delete_body(content_ids); |
2920 | return delete_internal(postbody); |
2921 | } |
2922 | |
2923 | -Client::Stringlist ClientPriv::copy_folders(const Client::Stringlist& folder_ids, |
2924 | - const string& folder_id) { |
2925 | +Client::Stringlist ClientPriv::copy_folders(const Client::Stringlist &folder_ids, |
2926 | + const string &folder_id) { |
2927 | string postbody = generate_copy_body(folder_ids, vector<string> {}, |
2928 | folder_id); |
2929 | return copy_internal(postbody); |
2930 | } |
2931 | |
2932 | -Client::Stringlist ClientPriv::copy_contents(const Client::Stringlist& content_ids, |
2933 | - const string& folder_id) { |
2934 | +Client::Stringlist ClientPriv::copy_contents(const Client::Stringlist &content_ids, |
2935 | + const string &folder_id) { |
2936 | string postbody = generate_copy_body(Client::Stringlist{}, content_ids, |
2937 | folder_id); |
2938 | return copy_internal(postbody); |
2939 | } |
2940 | |
2941 | -Client::OutlinkList ClientPriv::create_folder_sharing_url(const Client::Stringlist& folder_ids) { |
2942 | +Client::OutlinkList ClientPriv::create_folder_sharing_url(const Client::Stringlist &folder_ids) { |
2943 | string postbody = generate_extranet_body(folder_ids, Client::Stringlist{}); |
2944 | return create_url_internal(postbody); |
2945 | } |
2946 | |
2947 | -Client::OutlinkList ClientPriv::create_content_sharing_url(const Client::Stringlist& content_ids) { |
2948 | +Client::OutlinkList ClientPriv::create_content_sharing_url(const Client::Stringlist &content_ids) { |
2949 | string postbody = generate_extranet_body(Client::Stringlist{}, content_ids); |
2950 | return create_url_internal(postbody); |
2951 | } |
2952 | |
2953 | -DownloadTaskPriv::Ptr ClientPriv::create_download_link(const string& content_id) { |
2954 | - string postbody = generate_download_body({{content_id}}); |
2955 | - |
2956 | - log(postbody); |
2957 | - |
2958 | - auto future = httpclient_->async_post<DownloadTaskPriv::Ptr>( |
2959 | - { "richlifeApp", "devapp", "IUploadAndDownload" }, { }, postbody, content_type, |
2960 | - [](const tinyxml2::XMLElement * root) { |
2961 | - |
2962 | - auto link_list = root->FirstChildElement("String"); |
2963 | - if (link_list) { |
2964 | - auto link = link_list->FirstChildElement(); |
2965 | - while (link) { |
2966 | - return std::make_shared<DownloadTaskPriv>(link); |
2967 | - } |
2968 | - |
2969 | - if (link_list->GetText()) { |
2970 | - return std::make_shared<DownloadTaskPriv>(link_list); |
2971 | - } |
2972 | - } |
2973 | - return DownloadTaskPriv::Ptr(); |
2974 | - }); |
2975 | - |
2976 | - return get_or_throw(future); |
2977 | -} |
2978 | - |
2979 | -DownloadTaskPriv::Ptr ClientPriv::create_download_link(const DownloadBufferCb& buffer_cb) { |
2980 | - string postbody = generate_download_body(buffer_cb.content_id); |
2981 | - |
2982 | - log(postbody); |
2983 | - |
2984 | - auto future = httpclient_->async_post<DownloadTaskPriv::Ptr>( |
2985 | - { "richlifeApp", "devapp", "IUploadAndDownload" }, { }, postbody, content_type, |
2986 | - [buffer_cb](const tinyxml2::XMLElement * root) { |
2987 | - |
2988 | - auto link_list = root->FirstChildElement("String"); |
2989 | - if (link_list) { |
2990 | - auto link = link_list->FirstChildElement(); |
2991 | - while (link) { |
2992 | - return std::make_shared<DownloadTaskPriv>(link, buffer_cb.write_cb); |
2993 | - } |
2994 | - |
2995 | - if (link_list->GetText()) { |
2996 | - return std::make_shared<DownloadTaskPriv>(link_list, buffer_cb.write_cb); |
2997 | - } |
2998 | - } |
2999 | - return DownloadTaskPriv::Ptr(); |
3000 | - }); |
3001 | - |
3002 | - return get_or_throw(future); |
3003 | -} |
3004 | - |
3005 | -UploadTaskPriv::Ptr ClientPriv::create_upload_link(const UploadRequest& request_item) { |
3006 | - if (!fs::exists(request_item.file_path)) { |
3007 | - throw std::runtime_error(string("file not exists: ").append(request_item.file_path)); |
3008 | +DownloadTaskPriv::Ptr ClientPriv::create_download_link(const DownloadRequest &request_item) { |
3009 | + string postbody = generate_download_body(request_item.item_id); |
3010 | + |
3011 | + log(postbody); |
3012 | + |
3013 | + auto future = httpclient_->async_post<DownloadTaskPriv::Ptr>( |
3014 | + { "richlifeApp", "devapp", "IUploadAndDownload" }, { }, postbody, content_type, |
3015 | + [request_item](const tinyxml2::XMLElement * root) { |
3016 | + |
3017 | + auto link_list = root->FirstChildElement("String"); |
3018 | + if (link_list) { |
3019 | + auto link = link_list->FirstChildElement(); |
3020 | + while (link) { |
3021 | + return std::make_shared<DownloadTaskPriv>(link, request_item.write_cb); |
3022 | + } |
3023 | + |
3024 | + if (link_list->GetText()) { |
3025 | + return std::make_shared<DownloadTaskPriv>(link_list, request_item.write_cb); |
3026 | + } |
3027 | + } |
3028 | + return DownloadTaskPriv::Ptr(); |
3029 | + }); |
3030 | + |
3031 | + return get_or_throw(future); |
3032 | +} |
3033 | + |
3034 | +UploadTaskPriv::Ptr ClientPriv::create_upload_link(const UploadRequest &request_item) { |
3035 | + if (!fs::exists(request_item.local_file_path)) { |
3036 | + throw runtime_error(string("file not exists: ").append(request_item.local_file_path)); |
3037 | } |
3038 | |
3039 | string postbody = generate_upload_body(request_item); |
3040 | @@ -835,7 +802,7 @@ |
3041 | return std::make_shared<UploadTaskPriv>(content, |
3042 | task_id, |
3043 | redirection_url, |
3044 | - request_item.file_path); |
3045 | + request_item.local_file_path); |
3046 | } |
3047 | } |
3048 | |
3049 | @@ -845,7 +812,7 @@ |
3050 | return get_or_throw(future); |
3051 | } |
3052 | |
3053 | -UploadTaskPriv::Ptr ClientPriv::create_upload_link(const UploadBufferCb& buffer_cb) { |
3054 | +UploadTaskPriv::Ptr ClientPriv::create_upload_link(const UploadBufferCb &buffer_cb) { |
3055 | string postbody = generate_upload_body(buffer_cb); |
3056 | |
3057 | log(postbody); |
3058 | @@ -870,7 +837,7 @@ |
3059 | return std::make_shared<UploadTaskPriv>(content, |
3060 | task_id, |
3061 | redirection_url, |
3062 | - buffer_cb.buffer_size, |
3063 | + buffer_cb.total_size, |
3064 | buffer_cb.read_cb); |
3065 | } |
3066 | } |
3067 | @@ -907,7 +874,7 @@ |
3068 | return get_or_throw(future); |
3069 | } |
3070 | |
3071 | -Client::ResourceList ClientPriv::cloud_content_list_internal(const string& postbody) { |
3072 | +Client::ResourceList ClientPriv::cloud_content_list_internal(const string &postbody) { |
3073 | log(postbody); |
3074 | |
3075 | auto future = httpclient_->async_post<Client::ResourceList>( |
3076 | @@ -921,7 +888,7 @@ |
3077 | auto folder_ele = folder_list->FirstChildElement(); |
3078 | while (folder_ele) { |
3079 | results.emplace_back(std::shared_ptr<CloudFolder>( |
3080 | - new CloudFolder(folder_ele))); |
3081 | + new CloudFolder(folder_ele))); |
3082 | folder_ele = folder_ele->NextSiblingElement(); |
3083 | } |
3084 | } |
3085 | @@ -941,7 +908,7 @@ |
3086 | return get_or_throw(future); |
3087 | } |
3088 | |
3089 | -CloudContent::Ptr ClientPriv::content_item_internal(const string& postbody) { |
3090 | +CloudContent::Ptr ClientPriv::content_item_internal(const string &postbody) { |
3091 | log(postbody); |
3092 | |
3093 | auto future = httpclient_->async_post<CloudContent::Ptr>( |
3094 | @@ -957,7 +924,7 @@ |
3095 | return get_or_throw(future); |
3096 | } |
3097 | |
3098 | -CloudFolder::Ptr ClientPriv::create_folder_internal(const string& postbody) { |
3099 | +CloudFolder::Ptr ClientPriv::create_folder_internal(const string &postbody) { |
3100 | log(postbody); |
3101 | |
3102 | auto future = httpclient_->async_post<CloudFolder::Ptr>( |
3103 | @@ -973,7 +940,7 @@ |
3104 | return get_or_throw(future); |
3105 | } |
3106 | |
3107 | -Client::ResourceList ClientPriv::look_up_internal(const string& postbody) { |
3108 | +Client::ResourceList ClientPriv::look_up_internal(const string &postbody) { |
3109 | log(postbody); |
3110 | |
3111 | auto future = httpclient_->async_post<Client::ResourceList>( |
3112 | @@ -987,7 +954,7 @@ |
3113 | auto folder_ele = folder_list->FirstChildElement(); |
3114 | while (folder_ele) { |
3115 | results.emplace_back(std::shared_ptr<CloudFolder>( |
3116 | - new CloudFolder(folder_ele))); |
3117 | + new CloudFolder(folder_ele))); |
3118 | folder_ele = folder_ele->NextSiblingElement(); |
3119 | } |
3120 | } |
3121 | @@ -1007,7 +974,7 @@ |
3122 | return get_or_throw(future); |
3123 | } |
3124 | |
3125 | -bool ClientPriv::exist_on_cloud_internal(const string& postbody) { |
3126 | +bool ClientPriv::exist_on_cloud_internal(const string &postbody) { |
3127 | log(postbody); |
3128 | |
3129 | auto future = httpclient_->async_post<bool>( |
3130 | @@ -1030,11 +997,11 @@ |
3131 | return get_or_throw(future); |
3132 | } |
3133 | |
3134 | -bool ClientPriv::move_items_internal(const string& postbody) { |
3135 | +bool ClientPriv::move_items_internal(const string &postbody) { |
3136 | return update_internal(postbody); |
3137 | } |
3138 | |
3139 | -bool ClientPriv::update_internal(const string& postbody) { |
3140 | +bool ClientPriv::update_internal(const string &postbody) { |
3141 | log(postbody); |
3142 | |
3143 | auto future = httpclient_->async_post<bool>( |
3144 | @@ -1046,7 +1013,7 @@ |
3145 | return get_or_throw(future); |
3146 | } |
3147 | |
3148 | -bool ClientPriv::delete_internal(const string& postbody) { |
3149 | +bool ClientPriv::delete_internal(const string &postbody) { |
3150 | log(postbody); |
3151 | |
3152 | auto future = httpclient_->async_post<bool>( |
3153 | @@ -1058,7 +1025,7 @@ |
3154 | return get_or_throw(future); |
3155 | } |
3156 | |
3157 | -Client::Stringlist ClientPriv::copy_internal(const string& postbody) { |
3158 | +Client::Stringlist ClientPriv::copy_internal(const string &postbody) { |
3159 | log(postbody); |
3160 | |
3161 | auto future = httpclient_->async_post<Client::Stringlist>( |
3162 | @@ -1081,7 +1048,7 @@ |
3163 | return get_or_throw(future); |
3164 | } |
3165 | |
3166 | -Client::OutlinkList ClientPriv::create_url_internal(const string& postbody) { |
3167 | +Client::OutlinkList ClientPriv::create_url_internal(const string &postbody) { |
3168 | log(postbody); |
3169 | |
3170 | auto future = httpclient_->async_post<Client::OutlinkList>( |
3171 | @@ -1104,7 +1071,7 @@ |
3172 | return get_or_throw(future); |
3173 | } |
3174 | |
3175 | -bool ClientPriv::refersh_token(const string& refresh_token) { |
3176 | +bool ClientPriv::refersh_token(const string &refresh_token) { |
3177 | const string content_type = "application/x-www-form-urlencoded"; |
3178 | const string postbody = "grant_type=refresh_token&refresh_token=" |
3179 | + refresh_token; |
3180 | @@ -1133,7 +1100,7 @@ |
3181 | httpclient_->cancelled_ = true; |
3182 | } |
3183 | |
3184 | -template<typename T> T ClientPriv::get_or_throw(std::future<T>& f) { |
3185 | +template<typename T> T ClientPriv::get_or_throw(std::future<T> &f) { |
3186 | if (f.wait_for(std::chrono::seconds(httpclient_->config_.request_timeout)) != |
3187 | std::future_status::ready) { |
3188 | throw HttpTimeoutException("HTTP request timeout"); |
3189 | |
3190 | === modified file 'src/mcloud/api/client_priv.h' |
3191 | --- src/mcloud/api/client_priv.h 2016-10-26 08:50:32 +0000 |
3192 | +++ src/mcloud/api/client_priv.h 2016-12-07 12:44:11 +0000 |
3193 | @@ -24,7 +24,6 @@ |
3194 | #include <mcloud/api/cloudresource.h> |
3195 | |
3196 | #include <future> |
3197 | -#include <string> |
3198 | #include <memory> |
3199 | |
3200 | #include "downloadtask_priv.h" |
3201 | @@ -53,57 +52,56 @@ |
3202 | |
3203 | virtual ~ClientPriv(); |
3204 | |
3205 | + void set_access_token(const std::string &access_token); |
3206 | + |
3207 | + bool refersh_token(const std::string &refresh_token); |
3208 | + |
3209 | DiskInfo::Ptr disk_info(); |
3210 | |
3211 | - std::string cloud_sync_folder_id(); |
3212 | - |
3213 | - void set_access_token(const std::string& access_token); |
3214 | - |
3215 | - CloudContent::Ptr content_info(const std::string& content_id); |
3216 | - |
3217 | - CloudFolder::Ptr create_folder(const std::string& folder_name, |
3218 | - const std::string& folder_id); |
3219 | - |
3220 | - Client::ResourceList look_up(const std::string& name, |
3221 | - const std::string& folder_id, |
3222 | + std::string root_folder_id(); |
3223 | + |
3224 | + CloudContent::Ptr content_info(const std::string &content_id); |
3225 | + |
3226 | + CloudFolder::Ptr create_folder(const std::string &folder_name, |
3227 | + const std::string &folder_id); |
3228 | + |
3229 | + Client::ResourceList look_up(const std::string &name, |
3230 | + const std::string &folder_id, |
3231 | CloudResource::Property property = CloudResource::Property::Content); |
3232 | |
3233 | - bool refersh_token(const std::string& refresh_token); |
3234 | - |
3235 | - bool move_items(const Client::Stringlist& folder_ids, |
3236 | - const Client::Stringlist& content_ids, |
3237 | - const std::string& folder_id); |
3238 | - |
3239 | - bool exist_on_cloud(const std::string& file_path, const std::string& folder_id); |
3240 | - |
3241 | - bool update_folder(const std::string& folder_id, |
3242 | - const std::string& new_name); |
3243 | - |
3244 | - bool delete_contents(const Client::Stringlist& content_ids); |
3245 | - |
3246 | - Client::Stringlist copy_folders(const Client::Stringlist& folder_ids, |
3247 | - const std::string& folder_id); |
3248 | - |
3249 | - Client::Stringlist copy_contents(const Client::Stringlist& content_ids, |
3250 | - const std::string& folder_id); |
3251 | + bool move_items(const Client::Stringlist &folder_ids, |
3252 | + const Client::Stringlist &content_ids, |
3253 | + const std::string &folder_id); |
3254 | + |
3255 | + bool exist_on_cloud(const std::string &file_path, const std::string &folder_id); |
3256 | + |
3257 | + bool update_folder(const std::string &folder_id, |
3258 | + const std::string &new_name); |
3259 | + |
3260 | + bool delete_contents(const Client::Stringlist &content_ids); |
3261 | + |
3262 | + Client::Stringlist copy_folders(const Client::Stringlist &folder_ids, |
3263 | + const std::string &folder_id); |
3264 | + |
3265 | + Client::Stringlist copy_contents(const Client::Stringlist &content_ids, |
3266 | + const std::string &folder_id); |
3267 | |
3268 | Client::ResourceList cloud_content_list(int start_index, |
3269 | int count, |
3270 | CloudContent::Type content_type = CloudContent::Type::All, |
3271 | - const std::string& folder_id = std::string()); |
3272 | - |
3273 | - Client::OutlinkList create_folder_sharing_url(const Client::Stringlist& folder_ids); |
3274 | - |
3275 | - Client::OutlinkList create_content_sharing_url(const Client::Stringlist& content_ids); |
3276 | - |
3277 | - DownloadTaskPriv::Ptr create_download_link(const std::string& content_id); |
3278 | - |
3279 | - DownloadTaskPriv::Ptr create_download_link(const DownloadBufferCb& buffer_cb); |
3280 | - |
3281 | - //Same name files in different directories are not allowed to upload to mcloud because of file names conflicts. |
3282 | - UploadTaskPriv::Ptr create_upload_link(const UploadRequest& reqeust_item); |
3283 | - |
3284 | - UploadTaskPriv::Ptr create_upload_link(const UploadBufferCb& buffer_cb); |
3285 | + const std::string &folder_id = std::string()); |
3286 | + |
3287 | + Client::OutlinkList create_folder_sharing_url(const Client::Stringlist &folder_ids); |
3288 | + |
3289 | + Client::OutlinkList create_content_sharing_url(const Client::Stringlist &content_ids); |
3290 | + |
3291 | + DownloadTaskPriv::Ptr create_download_link(const std::string &content_id); |
3292 | + |
3293 | + DownloadTaskPriv::Ptr create_download_link(const DownloadRequest &request_item); |
3294 | + |
3295 | + UploadTaskPriv::Ptr create_upload_link(const UploadRequest &reqeust_item); |
3296 | + |
3297 | + UploadTaskPriv::Ptr create_upload_link(const UploadBufferCb &buffer_cb); |
3298 | |
3299 | void cancel(); |
3300 | |
3301 | @@ -112,27 +110,27 @@ |
3302 | private: |
3303 | Client::ResourceList cloud_root_folder_list(); |
3304 | |
3305 | - Client::ResourceList cloud_content_list_internal(const std::string& postbody); |
3306 | - |
3307 | - CloudContent::Ptr content_item_internal(const std::string& postbody); |
3308 | - |
3309 | - CloudFolder::Ptr create_folder_internal(const std::string& postbody); |
3310 | - |
3311 | - Client::ResourceList look_up_internal(const std::string& postbody); |
3312 | - |
3313 | - bool exist_on_cloud_internal(const std::string& postbody); |
3314 | - |
3315 | - bool move_items_internal(const std::string& postbody); |
3316 | - |
3317 | - bool update_internal(const std::string& postbody); |
3318 | - |
3319 | - bool delete_internal(const std::string& postbody); |
3320 | - |
3321 | - Client::Stringlist copy_internal(const std::string& postbody); |
3322 | - |
3323 | - Client::OutlinkList create_url_internal(const std::string& postbody); |
3324 | - |
3325 | - template<typename T> T get_or_throw(std::future<T>& f); |
3326 | + Client::ResourceList cloud_content_list_internal(const std::string &postbody); |
3327 | + |
3328 | + CloudContent::Ptr content_item_internal(const std::string &postbody); |
3329 | + |
3330 | + CloudFolder::Ptr create_folder_internal(const std::string &postbody); |
3331 | + |
3332 | + Client::ResourceList look_up_internal(const std::string &postbody); |
3333 | + |
3334 | + bool exist_on_cloud_internal(const std::string &postbody); |
3335 | + |
3336 | + bool move_items_internal(const std::string &postbody); |
3337 | + |
3338 | + bool update_internal(const std::string &postbody); |
3339 | + |
3340 | + bool delete_internal(const std::string &postbody); |
3341 | + |
3342 | + Client::Stringlist copy_internal(const std::string &postbody); |
3343 | + |
3344 | + Client::OutlinkList create_url_internal(const std::string &postbody); |
3345 | + |
3346 | + template<typename T> T get_or_throw(std::future<T> &f); |
3347 | |
3348 | private: |
3349 | |
3350 | |
3351 | === modified file 'src/mcloud/api/cloudcontent.cpp' |
3352 | --- src/mcloud/api/cloudcontent.cpp 2016-10-26 08:50:32 +0000 |
3353 | +++ src/mcloud/api/cloudcontent.cpp 2016-12-07 12:44:11 +0000 |
3354 | @@ -23,11 +23,11 @@ |
3355 | using namespace mcloud::api; |
3356 | using namespace std; |
3357 | |
3358 | -extern time_t string_to_time(const string& dt); |
3359 | +extern time_t string_to_time(const string &dt); |
3360 | |
3361 | class CloudContent::Priv { |
3362 | public: |
3363 | - Priv(const tinyxml2::XMLElement* root) { |
3364 | + Priv(const tinyxml2::XMLElement *root) { |
3365 | name_ = root->FirstChildElement("contentName")->GetText(); |
3366 | id_ = root->FirstChildElement("contentID")->GetText(); |
3367 | created_date_ = string_to_time(root->FirstChildElement("uploadTime")->GetText()); |
3368 | @@ -101,38 +101,38 @@ |
3369 | string parent_catalog_id_; |
3370 | }; |
3371 | |
3372 | -CloudContent::CloudContent(const tinyxml2::XMLElement* root) |
3373 | +CloudContent::CloudContent(const tinyxml2::XMLElement *root) |
3374 | : p(new Priv(root)) { |
3375 | } |
3376 | |
3377 | CloudContent::~CloudContent() { |
3378 | } |
3379 | |
3380 | -const string& CloudContent::id() const { |
3381 | +const string &CloudContent::id() const { |
3382 | return p->id_; |
3383 | } |
3384 | |
3385 | -const string& CloudContent::name() const { |
3386 | +const string &CloudContent::name() const { |
3387 | return p->name_; |
3388 | } |
3389 | |
3390 | -const time_t& CloudContent::created_date() const { |
3391 | +const time_t &CloudContent::created_date() const { |
3392 | return p->created_date_; |
3393 | } |
3394 | |
3395 | -const time_t& CloudContent::updated_date() const { |
3396 | +const time_t &CloudContent::updated_date() const { |
3397 | return p->updated_date_; |
3398 | } |
3399 | |
3400 | -const string& CloudContent::parent_catalog_id() const { |
3401 | +const string &CloudContent::parent_catalog_id() const { |
3402 | return p->parent_catalog_id_; |
3403 | } |
3404 | |
3405 | -const string& CloudContent::etag() const { |
3406 | +const string &CloudContent::etag() const { |
3407 | return p->etag_; |
3408 | } |
3409 | |
3410 | -const string& CloudContent::owner() const { |
3411 | +const string &CloudContent::owner() const { |
3412 | return p->owner_; |
3413 | } |
3414 | |
3415 | @@ -140,7 +140,7 @@ |
3416 | return CloudResource::Property::Content; |
3417 | } |
3418 | |
3419 | -const string& CloudContent::suffix() const { |
3420 | +const string &CloudContent::suffix() const { |
3421 | return p->suffix_; |
3422 | } |
3423 | |
3424 | @@ -152,18 +152,18 @@ |
3425 | return p->content_size_; |
3426 | } |
3427 | |
3428 | -const string& CloudContent::description() const { |
3429 | +const string &CloudContent::description() const { |
3430 | return p->description_; |
3431 | } |
3432 | |
3433 | -const string& CloudContent::thumbnail_url() const { |
3434 | +const string &CloudContent::thumbnail_url() const { |
3435 | return p->thumbnail_url_; |
3436 | } |
3437 | |
3438 | -const string& CloudContent::big_thumbnail_url() const { |
3439 | +const string &CloudContent::big_thumbnail_url() const { |
3440 | return p->big_thumbnail_url_; |
3441 | } |
3442 | |
3443 | -const string& CloudContent::present_url() const { |
3444 | +const string &CloudContent::present_url() const { |
3445 | return p->present_url_; |
3446 | } |
3447 | |
3448 | === modified file 'src/mcloud/api/cloudfolder.cpp' |
3449 | --- src/mcloud/api/cloudfolder.cpp 2016-10-26 08:50:32 +0000 |
3450 | +++ src/mcloud/api/cloudfolder.cpp 2016-12-07 12:44:11 +0000 |
3451 | @@ -27,7 +27,7 @@ |
3452 | using namespace mcloud::api; |
3453 | using namespace std; |
3454 | |
3455 | -time_t string_to_time(const string& dt) { |
3456 | +time_t string_to_time(const string &dt) { |
3457 | struct tm tm; |
3458 | istringstream ss(dt); |
3459 | strptime(dt.c_str(), "%Y%m%d%H%M%S", &tm); // get put only available in GCC 5 |
3460 | @@ -36,7 +36,7 @@ |
3461 | |
3462 | class CloudFolder::Priv { |
3463 | public: |
3464 | - Priv(const tinyxml2::XMLElement* root) { |
3465 | + Priv(const tinyxml2::XMLElement *root) { |
3466 | name_ = root->FirstChildElement("catalogName")->GetText(); |
3467 | id_ = root->FirstChildElement("catalogID")->GetText(); |
3468 | created_date_ = string_to_time(root->FirstChildElement("createTime")->GetText()); |
3469 | @@ -97,42 +97,42 @@ |
3470 | string folder_path_; |
3471 | }; |
3472 | |
3473 | -CloudFolder::CloudFolder(const tinyxml2::XMLElement* root) |
3474 | +CloudFolder::CloudFolder(const tinyxml2::XMLElement *root) |
3475 | : p_(new Priv(root)) { |
3476 | } |
3477 | |
3478 | CloudFolder::~CloudFolder() { |
3479 | } |
3480 | |
3481 | -const string& CloudFolder::id() const { |
3482 | +const string &CloudFolder::id() const { |
3483 | return p_->id_; |
3484 | } |
3485 | |
3486 | -const string& CloudFolder::name() const { |
3487 | +const string &CloudFolder::name() const { |
3488 | return p_->name_; |
3489 | } |
3490 | |
3491 | -const time_t& CloudFolder::created_date() const { |
3492 | +const time_t &CloudFolder::created_date() const { |
3493 | return p_->created_date_; |
3494 | } |
3495 | |
3496 | -const time_t& CloudFolder::updated_date() const { |
3497 | +const time_t &CloudFolder::updated_date() const { |
3498 | return p_->update_date_; |
3499 | } |
3500 | |
3501 | -const string& CloudFolder::parent_catalog_id() const { |
3502 | +const string &CloudFolder::parent_catalog_id() const { |
3503 | return p_->parent_catalog_id_; |
3504 | } |
3505 | |
3506 | -const string& CloudFolder::folder_path() const { |
3507 | +const string &CloudFolder::folder_path() const { |
3508 | return p_->folder_path_; |
3509 | } |
3510 | |
3511 | -const string& CloudFolder::etag() const { |
3512 | +const string &CloudFolder::etag() const { |
3513 | return p_->etag_; |
3514 | } |
3515 | |
3516 | -const string& CloudFolder::owner() const { |
3517 | +const string &CloudFolder::owner() const { |
3518 | return p_->owner_; |
3519 | } |
3520 | |
3521 | |
3522 | === modified file 'src/mcloud/api/diskinfo.cpp' |
3523 | --- src/mcloud/api/diskinfo.cpp 2016-10-26 08:50:32 +0000 |
3524 | +++ src/mcloud/api/diskinfo.cpp 2016-12-07 12:44:11 +0000 |
3525 | @@ -25,8 +25,8 @@ |
3526 | |
3527 | class DiskInfo::Priv { |
3528 | public: |
3529 | - Priv(const tinyxml2::XMLElement* result) { |
3530 | - const tinyxml2::XMLElement* root = result->FirstChildElement(); |
3531 | + Priv(const tinyxml2::XMLElement *result) { |
3532 | + const tinyxml2::XMLElement *root = result->FirstChildElement(); |
3533 | free_disk_size_ = std::atoi(root->FirstChildElement("freeDiskSize")->GetText()); |
3534 | disk_size_ = std::atoi(root->FirstChildElement("diskSize")->GetText()); |
3535 | } |
3536 | @@ -36,7 +36,7 @@ |
3537 | int disk_size_; |
3538 | }; |
3539 | |
3540 | -DiskInfo::DiskInfo(const tinyxml2::XMLElement* result) |
3541 | +DiskInfo::DiskInfo(const tinyxml2::XMLElement *result) |
3542 | : p_(new Priv(result)) { |
3543 | } |
3544 | |
3545 | |
3546 | === modified file 'src/mcloud/api/downloadtask.cpp' |
3547 | --- src/mcloud/api/downloadtask.cpp 2016-10-26 08:50:32 +0000 |
3548 | +++ src/mcloud/api/downloadtask.cpp 2016-12-07 12:44:11 +0000 |
3549 | @@ -24,46 +24,46 @@ |
3550 | using namespace mcloud::api; |
3551 | using namespace std; |
3552 | |
3553 | -DownloadTask::DownloadTask(const shared_ptr<DownloadTaskPriv>& p) |
3554 | +DownloadTask::DownloadTask(const shared_ptr<DownloadTaskPriv> &p) |
3555 | : p_(p) { |
3556 | } |
3557 | |
3558 | -const string& DownloadTask::task_url() const { |
3559 | +const string &DownloadTask::task_url() const { |
3560 | return p_->task_url(); |
3561 | } |
3562 | |
3563 | Task::Status DownloadTask::status() const { |
3564 | - return p_->task_handler()->status(); |
3565 | + return p_->status(); |
3566 | } |
3567 | |
3568 | -const string& DownloadTask::task_id() const { |
3569 | +const string &DownloadTask::task_id() const { |
3570 | return p_->content_id(); //for content download, task id is the content's id. |
3571 | } |
3572 | |
3573 | -const string& DownloadTask::content_id() const { |
3574 | +const string &DownloadTask::content_id() const { |
3575 | return p_->content_id(); |
3576 | } |
3577 | |
3578 | -const string& DownloadTask::content_name() const { |
3579 | +const string &DownloadTask::content_name() const { |
3580 | return p_->content_name(); |
3581 | } |
3582 | |
3583 | -const string& DownloadTask::file_path() const { |
3584 | +const string &DownloadTask::file_path() const { |
3585 | return p_->file_path(); |
3586 | } |
3587 | |
3588 | -Task::ProgressHandler& DownloadTask::progress_changed() { |
3589 | +Task::ProgressHandler &DownloadTask::progress_changed() { |
3590 | return p_->progress_changed(); |
3591 | } |
3592 | |
3593 | -Task::StatusHandler& DownloadTask::status_changed() { |
3594 | +Task::StatusHandler &DownloadTask::status_changed() { |
3595 | return p_->status_changed(); |
3596 | } |
3597 | |
3598 | -const string& DownloadTask::error_string() const { |
3599 | +const string &DownloadTask::error_string() const { |
3600 | return p_->error_string(); |
3601 | } |
3602 | |
3603 | void DownloadTask::cancel() { |
3604 | - p_->task_handler()->cancel(); |
3605 | + p_->cancel(); |
3606 | } |
3607 | |
3608 | === modified file 'src/mcloud/api/downloadtask_priv.cpp' |
3609 | --- src/mcloud/api/downloadtask_priv.cpp 2016-10-26 08:50:32 +0000 |
3610 | +++ src/mcloud/api/downloadtask_priv.cpp 2016-12-07 12:44:11 +0000 |
3611 | @@ -38,7 +38,7 @@ |
3612 | namespace { |
3613 | static const string public_download_dir = string(getenv("HOME")) + "/Downloads"; |
3614 | |
3615 | -string decode64(const string& val) { |
3616 | +string decode64(const string &val) { |
3617 | using namespace boost::archive::iterators; |
3618 | typedef transform_width<binary_from_base64<string::const_iterator>, 8, 6> iter; |
3619 | return boost::algorithm::trim_right_copy_if(string(iter(begin(val)), |
3620 | @@ -48,7 +48,7 @@ |
3621 | } |
3622 | } |
3623 | |
3624 | -DownloadTaskPriv::DownloadTaskPriv(const tinyxml2::XMLElement* root, |
3625 | +DownloadTaskPriv::DownloadTaskPriv(const tinyxml2::XMLElement *root, |
3626 | const Task::Buffer_Callback write_cb) |
3627 | : progress_handler_(nullptr), |
3628 | status_handler_(nullptr), |
3629 | @@ -70,11 +70,10 @@ |
3630 | |
3631 | if (!buffer_callback_) { |
3632 | // create temp file path in temp path for writing |
3633 | - file_path_ = fs::path(fs::temp_directory_path() / fs::unique_path()) |
3634 | - .string(); |
3635 | + file_path_ = fs::path(fs::temp_directory_path() / fs::unique_path()).string(); |
3636 | } |
3637 | |
3638 | - task_handler_->on_prepare() = [this](void*) { |
3639 | + task_handler_->on_prepare() = [this](void *) { |
3640 | if (!buffer_callback_) { |
3641 | if (ofs_.is_open()) { |
3642 | ofs_.close(); |
3643 | @@ -116,7 +115,7 @@ |
3644 | if (!fs::exists(fs::path(download_dir))) { |
3645 | try { |
3646 | fs::create_directory(fs::path(download_dir)); |
3647 | - } catch (boost::filesystem::filesystem_error& e) { |
3648 | + } catch (boost::filesystem::filesystem_error &e) { |
3649 | cerr << "create download directory failed" << download_dir |
3650 | << "error: " << e.what() << endl; |
3651 | } |
3652 | @@ -138,7 +137,7 @@ |
3653 | // rename in final when download is complete. |
3654 | fs::rename(file_path_, dest); |
3655 | file_path_ = dest.string(); |
3656 | - } catch (boost::filesystem::filesystem_error& e) { |
3657 | + } catch (boost::filesystem::filesystem_error &e) { |
3658 | cerr << "create download directory failed" << download_dir |
3659 | << "error: " << e.what() << endl; |
3660 | return false; |
3661 | @@ -154,14 +153,14 @@ |
3662 | |
3663 | task_handler_->on_ready_read() = [this](const string & data) { |
3664 | if (buffer_callback_) { |
3665 | - buffer_callback_((void*)data.c_str(), data.size()); |
3666 | + buffer_callback_((void *)data.c_str(), data.size()); |
3667 | } else { |
3668 | ofs_.write(data.c_str(), data.size()); |
3669 | } |
3670 | }; |
3671 | } |
3672 | |
3673 | -const string& DownloadTaskPriv::task_url() const { |
3674 | +const string &DownloadTaskPriv::task_url() const { |
3675 | return task_url_; |
3676 | } |
3677 | |
3678 | @@ -169,39 +168,39 @@ |
3679 | return task_handler_->status(); |
3680 | } |
3681 | |
3682 | -const string& DownloadTaskPriv::task_id() const { |
3683 | +const string &DownloadTaskPriv::task_id() const { |
3684 | return content_id_; //for content download, task id is the content's id. |
3685 | } |
3686 | |
3687 | -const string& DownloadTaskPriv::content_id() const { |
3688 | +const string &DownloadTaskPriv::content_id() const { |
3689 | return content_id_; |
3690 | } |
3691 | |
3692 | -const string& DownloadTaskPriv::content_name() const { |
3693 | +const string &DownloadTaskPriv::content_name() const { |
3694 | return content_name_; |
3695 | } |
3696 | |
3697 | -const string& DownloadTaskPriv::file_path() const { |
3698 | +const string &DownloadTaskPriv::file_path() const { |
3699 | return file_path_; |
3700 | } |
3701 | |
3702 | -Task::ProgressHandler& DownloadTaskPriv::progress_changed() { |
3703 | +Task::ProgressHandler &DownloadTaskPriv::progress_changed() { |
3704 | return progress_handler_; |
3705 | } |
3706 | |
3707 | -Task::StatusHandler& DownloadTaskPriv::status_changed() { |
3708 | +Task::StatusHandler &DownloadTaskPriv::status_changed() { |
3709 | return status_handler_; |
3710 | } |
3711 | |
3712 | -Task::Buffer_Callback& DownloadTaskPriv::buffer_callback() { |
3713 | +Task::Buffer_Callback &DownloadTaskPriv::buffer_callback() { |
3714 | return buffer_callback_; |
3715 | } |
3716 | |
3717 | -const string& DownloadTaskPriv::error_string() const { |
3718 | +const string &DownloadTaskPriv::error_string() const { |
3719 | return error_string_; |
3720 | } |
3721 | |
3722 | -void DownloadTaskPriv::set_error_string(const string& err) { |
3723 | +void DownloadTaskPriv::set_error_string(const string &err) { |
3724 | error_string_ = err; |
3725 | } |
3726 | |
3727 | |
3728 | === modified file 'src/mcloud/api/downloadtask_priv.h' |
3729 | --- src/mcloud/api/downloadtask_priv.h 2016-10-26 08:50:32 +0000 |
3730 | +++ src/mcloud/api/downloadtask_priv.h 2016-12-07 12:44:11 +0000 |
3731 | @@ -25,7 +25,7 @@ |
3732 | #include <fstream> |
3733 | |
3734 | namespace tinyxml2 { |
3735 | -class XMLElement; |
3736 | + class XMLElement; |
3737 | } |
3738 | |
3739 | namespace mcloud { |
3740 | @@ -37,32 +37,32 @@ |
3741 | public: |
3742 | typedef std::shared_ptr<DownloadTaskPriv> Ptr; |
3743 | |
3744 | - DownloadTaskPriv(const tinyxml2::XMLElement* root, |
3745 | + DownloadTaskPriv(const tinyxml2::XMLElement *root, |
3746 | const Task::Buffer_Callback write_cb = nullptr); |
3747 | |
3748 | virtual ~DownloadTaskPriv() = default; |
3749 | |
3750 | - const std::string& task_url() const; |
3751 | + const std::string &task_url() const; |
3752 | |
3753 | Task::Status status() const; |
3754 | |
3755 | - const std::string& task_id() const; |
3756 | - |
3757 | - const std::string& content_id() const; |
3758 | - |
3759 | - const std::string& content_name() const; |
3760 | - |
3761 | - const std::string& file_path() const; |
3762 | - |
3763 | - const std::string& error_string() const; |
3764 | - |
3765 | - void set_error_string(const std::string& err); |
3766 | - |
3767 | - Task::ProgressHandler& progress_changed(); |
3768 | - |
3769 | - Task::StatusHandler& status_changed(); |
3770 | - |
3771 | - Task::Buffer_Callback& buffer_callback(); |
3772 | + const std::string &task_id() const; |
3773 | + |
3774 | + const std::string &content_id() const; |
3775 | + |
3776 | + const std::string &content_name() const; |
3777 | + |
3778 | + const std::string &file_path() const; |
3779 | + |
3780 | + const std::string &error_string() const; |
3781 | + |
3782 | + void set_error_string(const std::string &err); |
3783 | + |
3784 | + Task::ProgressHandler &progress_changed(); |
3785 | + |
3786 | + Task::StatusHandler &status_changed(); |
3787 | + |
3788 | + Task::Buffer_Callback &buffer_callback(); |
3789 | |
3790 | void cancel(); |
3791 | |
3792 | |
3793 | === modified file 'src/mcloud/api/outlink.cpp' |
3794 | --- src/mcloud/api/outlink.cpp 2016-10-26 08:50:32 +0000 |
3795 | +++ src/mcloud/api/outlink.cpp 2016-12-07 12:44:11 +0000 |
3796 | @@ -25,7 +25,7 @@ |
3797 | |
3798 | class Outlink::Priv { |
3799 | public: |
3800 | - Priv(const tinyxml2::XMLElement* root) { |
3801 | + Priv(const tinyxml2::XMLElement *root) { |
3802 | id_ = root->FirstChildElement("objID")->GetText(); |
3803 | link_ = root->FirstChildElement("linkUrl")->GetText(); |
3804 | } |
3805 | @@ -35,17 +35,17 @@ |
3806 | std::string link_; |
3807 | }; |
3808 | |
3809 | -Outlink::Outlink(const tinyxml2::XMLElement* root) |
3810 | +Outlink::Outlink(const tinyxml2::XMLElement *root) |
3811 | : p_(new Priv(root)) { |
3812 | } |
3813 | |
3814 | Outlink::~Outlink() { |
3815 | } |
3816 | |
3817 | -const string& Outlink::id() const { |
3818 | +const string &Outlink::id() const { |
3819 | return p_->id_; |
3820 | } |
3821 | |
3822 | -const string& Outlink::link() const { |
3823 | +const string &Outlink::link() const { |
3824 | return p_->link_; |
3825 | } |
3826 | |
3827 | === modified file 'src/mcloud/api/syncmanager.cpp' |
3828 | --- src/mcloud/api/syncmanager.cpp 2016-10-26 08:50:32 +0000 |
3829 | +++ src/mcloud/api/syncmanager.cpp 2016-12-07 12:44:11 +0000 |
3830 | @@ -22,12 +22,10 @@ |
3831 | #include "syncmanager_priv.h" |
3832 | #include "client_priv.h" |
3833 | |
3834 | -#include <iostream> |
3835 | - |
3836 | using namespace mcloud::api; |
3837 | using namespace std; |
3838 | |
3839 | -SyncManager::SyncManager(ClientPriv* client_priv) |
3840 | +SyncManager::SyncManager(ClientPriv *client_priv) |
3841 | : p_(new SyncManagerPriv(client_priv)) { |
3842 | |
3843 | } |
3844 | @@ -47,22 +45,18 @@ |
3845 | p_->pause(); |
3846 | } |
3847 | |
3848 | -UploadTask::Ptr SyncManager::add_upload_task(const UploadRequest& request_item) { |
3849 | +DownloadTask::Ptr SyncManager::add_download_task(const DownloadRequest &request_item) { |
3850 | + return p_->add_download_task(request_item); |
3851 | +} |
3852 | + |
3853 | +UploadTask::Ptr SyncManager::add_upload_task(const UploadRequest &request_item) { |
3854 | return p_->add_upload_task(request_item); |
3855 | } |
3856 | |
3857 | -UploadTask::Ptr SyncManager::add_upload_task(const UploadBufferCb& buffer_cb) { |
3858 | +UploadTask::Ptr SyncManager::add_upload_task(const UploadBufferCb &buffer_cb) { |
3859 | return p_->add_upload_task(buffer_cb); |
3860 | } |
3861 | |
3862 | -DownloadTask::Ptr SyncManager::add_download_task(const string& content_id) { |
3863 | - return p_->add_download_task(content_id); |
3864 | -} |
3865 | - |
3866 | -DownloadTask::Ptr SyncManager::add_download_task(const DownloadBufferCb& buffer_cb) { |
3867 | - return p_->add_download_task(buffer_cb); |
3868 | -} |
3869 | - |
3870 | TaskQueue<std::shared_ptr<DownloadTask>> SyncManager::download_queue() { |
3871 | return p_->download_queue(); |
3872 | } |
3873 | |
3874 | === modified file 'src/mcloud/api/syncmanager_priv.cpp' |
3875 | --- src/mcloud/api/syncmanager_priv.cpp 2016-10-24 15:25:02 +0000 |
3876 | +++ src/mcloud/api/syncmanager_priv.cpp 2016-12-07 12:44:11 +0000 |
3877 | @@ -24,7 +24,7 @@ |
3878 | using namespace mcloud::api; |
3879 | using namespace std; |
3880 | |
3881 | -SyncManagerPriv::SyncManagerPriv(ClientPriv* client) |
3882 | +SyncManagerPriv::SyncManagerPriv(ClientPriv *client) |
3883 | : download_thread_() |
3884 | , upload_thread_() |
3885 | , client_(client) { |
3886 | @@ -36,27 +36,17 @@ |
3887 | upload_thread_.stop(); |
3888 | } |
3889 | |
3890 | -DownloadTask::Ptr SyncManagerPriv::add_download_task(const string& content_id) { |
3891 | - auto item_p = client_->create_download_link(content_id); |
3892 | - cout << "push download link url in queue : " + item_p->task_url() << endl; |
3893 | - download_thread_.add_task(item_p); |
3894 | - |
3895 | - auto item = std::shared_ptr<DownloadTask>(new DownloadTask(item_p)); |
3896 | - download_queue_.push(item); |
3897 | - return item; |
3898 | -} |
3899 | - |
3900 | -DownloadTask::Ptr SyncManagerPriv::add_download_task(const DownloadBufferCb& buffer_cb) { |
3901 | - auto item_p = client_->create_download_link(buffer_cb); |
3902 | - cout << "push download link url in queue : " + item_p->task_url() << endl; |
3903 | - download_thread_.add_task(item_p); |
3904 | - |
3905 | - auto item = std::shared_ptr<DownloadTask>(new DownloadTask(item_p)); |
3906 | - download_queue_.push(item); |
3907 | - return item; |
3908 | -} |
3909 | - |
3910 | -UploadTask::Ptr SyncManagerPriv::add_upload_task(const UploadRequest& request_item) { |
3911 | +DownloadTask::Ptr SyncManagerPriv::add_download_task(const DownloadRequest &request_item) { |
3912 | + auto item_p = client_->create_download_link(request_item); |
3913 | + cout << "push download link url in queue : " + item_p->task_url() << endl; |
3914 | + download_thread_.add_task(item_p); |
3915 | + |
3916 | + auto item = std::shared_ptr<DownloadTask>(new DownloadTask(item_p)); |
3917 | + download_queue_.push(item); |
3918 | + return item; |
3919 | +} |
3920 | + |
3921 | +UploadTask::Ptr SyncManagerPriv::add_upload_task(const UploadRequest &request_item) { |
3922 | auto item_p = client_->create_upload_link(request_item); |
3923 | cout << "push upload link url in queue : " + item_p->task_url() << endl; |
3924 | upload_thread_.add_task(item_p); |
3925 | @@ -66,7 +56,7 @@ |
3926 | return item; |
3927 | } |
3928 | |
3929 | -UploadTask::Ptr SyncManagerPriv::add_upload_task(const UploadBufferCb& buffer_cb) { |
3930 | +UploadTask::Ptr SyncManagerPriv::add_upload_task(const UploadBufferCb &buffer_cb) { |
3931 | auto item_p = client_->create_upload_link(buffer_cb); |
3932 | cout << "push upload link url in queue : " + item_p->task_url() << endl; |
3933 | upload_thread_.add_task(item_p); |
3934 | |
3935 | === modified file 'src/mcloud/api/syncmanager_priv.h' |
3936 | --- src/mcloud/api/syncmanager_priv.h 2016-10-26 08:50:32 +0000 |
3937 | +++ src/mcloud/api/syncmanager_priv.h 2016-12-07 12:44:11 +0000 |
3938 | @@ -33,17 +33,15 @@ |
3939 | |
3940 | class SyncManagerPriv { |
3941 | public: |
3942 | - SyncManagerPriv(ClientPriv* client); |
3943 | + SyncManagerPriv(ClientPriv *client); |
3944 | |
3945 | ~SyncManagerPriv(); |
3946 | |
3947 | - DownloadTask::Ptr add_download_task(const std::string& content_id); |
3948 | - |
3949 | - DownloadTask::Ptr add_download_task(const DownloadBufferCb& buffer_cb); |
3950 | - |
3951 | - UploadTask::Ptr add_upload_task(const UploadRequest& request_item); |
3952 | - |
3953 | - UploadTask::Ptr add_upload_task(const UploadBufferCb& buffer_cb); |
3954 | + DownloadTask::Ptr add_download_task(const DownloadRequest &request_item); |
3955 | + |
3956 | + UploadTask::Ptr add_upload_task(const UploadRequest &request_item); |
3957 | + |
3958 | + UploadTask::Ptr add_upload_task(const UploadBufferCb &buffer_cb); |
3959 | |
3960 | TaskQueue<DownloadTask::Ptr> download_queue(); |
3961 | |
3962 | @@ -62,7 +60,7 @@ |
3963 | TaskQueue<DownloadTask::Ptr> download_queue_; |
3964 | TaskQueue<UploadTask::Ptr> upload_queue_; |
3965 | |
3966 | - ClientPriv* client_; |
3967 | + ClientPriv *client_; |
3968 | }; |
3969 | |
3970 | } |
3971 | |
3972 | === modified file 'src/mcloud/api/syncthread.cpp' |
3973 | --- src/mcloud/api/syncthread.cpp 2016-10-26 08:50:32 +0000 |
3974 | +++ src/mcloud/api/syncthread.cpp 2016-12-07 12:44:11 +0000 |
3975 | @@ -16,13 +16,12 @@ |
3976 | * Authored by: Gary Wang <gary.wang@canonical.com> |
3977 | */ |
3978 | |
3979 | -#include <boost/algorithm/string.hpp> |
3980 | #include <core/net/http/streaming_client.h> |
3981 | #include <core/net/http/streaming_request.h> |
3982 | #include <core/net/http/response.h> |
3983 | #include <core/net/http/status.h> |
3984 | |
3985 | -#include <fstream> |
3986 | +#include <algorithm> |
3987 | #include <future> |
3988 | #include <iostream> |
3989 | |
3990 | @@ -43,7 +42,7 @@ |
3991 | HttpStreamClient(int request_timeout) : |
3992 | request_timeout_(request_timeout), |
3993 | client_(http::make_streaming_client()), |
3994 | - worker_ {[this](){ client_->run();}} { |
3995 | + worker_ {[this]() { client_->run(); }} { |
3996 | } |
3997 | |
3998 | ~HttpStreamClient() { |
3999 | @@ -54,13 +53,13 @@ |
4000 | } |
4001 | |
4002 | void async_get(shared_ptr<T> ptr, |
4003 | - const http::Header& headers) { |
4004 | + const http::Header &headers) { |
4005 | auto prom = make_shared<promise<bool>>(); |
4006 | |
4007 | auto task_handler = ptr->task_handler(); |
4008 | http::Request::Handler handler; |
4009 | handler.on_progress([task_handler](const http::Request::Progress & progress) { |
4010 | - if (task_handler->status() == Task::Status::Canceled) { |
4011 | + if (task_handler->status() == Task::Status::Cancelled) { |
4012 | return http::Request::Progress::Next::abort_operation; |
4013 | } |
4014 | |
4015 | @@ -96,15 +95,15 @@ |
4016 | } |
4017 | |
4018 | void async_post(shared_ptr<T> ptr, |
4019 | - const http::Header& headers, |
4020 | - std::istream& payload, |
4021 | + const http::Header &headers, |
4022 | + std::istream &payload, |
4023 | std::size_t size) { |
4024 | auto prom = make_shared<promise<bool>>(); |
4025 | |
4026 | auto task_handler = ptr->task_handler(); |
4027 | http::Request::Handler handler; |
4028 | handler.on_progress([task_handler](const http::Request::Progress & progress) { |
4029 | - if (task_handler->status() == Task::Status::Canceled) { |
4030 | + if (task_handler->status() == Task::Status::Cancelled) { |
4031 | return http::Request::Progress::Next::abort_operation; |
4032 | } |
4033 | |
4034 | @@ -140,15 +139,15 @@ |
4035 | } |
4036 | |
4037 | void async_post(shared_ptr<T> ptr, |
4038 | - const http::Header& headers, |
4039 | - std::function<size_t(void* dest, size_t buf_size)> read_cb, |
4040 | + const http::Header &headers, |
4041 | + std::function<size_t(void *dest, size_t buf_size)> read_cb, |
4042 | std::size_t size) { |
4043 | auto prom = make_shared<promise<bool>>(); |
4044 | |
4045 | auto task_handler = ptr->task_handler(); |
4046 | http::Request::Handler handler; |
4047 | handler.on_progress([task_handler](const http::Request::Progress & progress) { |
4048 | - if (task_handler->status() == Task::Status::Canceled) { |
4049 | + if (task_handler->status() == Task::Status::Cancelled) { |
4050 | return http::Request::Progress::Next::abort_operation; |
4051 | } |
4052 | |
4053 | @@ -214,7 +213,7 @@ |
4054 | thread_ = std::thread(&SyncThread::run, this); |
4055 | } else { |
4056 | //if it's running, then resume |
4057 | - for (auto& item_ptr : task_queue_) { |
4058 | + for (auto &item_ptr : task_queue_) { |
4059 | if (item_ptr->status() == Task::Status::Paused) { |
4060 | item_ptr->task_handler()->resume(); |
4061 | } |
4062 | @@ -232,7 +231,7 @@ |
4063 | std::unique_lock<std::mutex> lock(mutex_); |
4064 | |
4065 | //pause task if it's running |
4066 | - for (auto& item_ptr : task_queue_) { |
4067 | + for (auto &item_ptr : task_queue_) { |
4068 | if (item_ptr->status() == Task::Status::Running) { |
4069 | item_ptr->task_handler()->pause(); |
4070 | } |
4071 | @@ -244,7 +243,7 @@ |
4072 | template <typename T> |
4073 | void SyncThread<T>::stop() { |
4074 | //cancel task if it's running or prepared in the queue. |
4075 | - for (auto& item_ptr : task_queue_) { |
4076 | + for (auto &item_ptr : task_queue_) { |
4077 | if (item_ptr->status() == Task::Status::Running |
4078 | || item_ptr->status() == Task::Status::Paused |
4079 | || item_ptr->status() == Task::Status::Unstart) { |
4080 | @@ -321,11 +320,11 @@ |
4081 | task_handler->detach_request(); |
4082 | task_ptr.reset(); |
4083 | } |
4084 | - } catch (std::runtime_error& e) { |
4085 | + } catch (std::runtime_error &e) { |
4086 | // if error is caused by net issue,not manually(application callback) |
4087 | // increase broken counter and try it again. Once broken counter exceeds broken limit, |
4088 | // it's regarded as the "broken" one and drop it |
4089 | - if (task_handler->status() != Task::Status::Canceled) { |
4090 | + if (task_handler->status() != Task::Status::Cancelled) { |
4091 | if (!task_handler->is_broken()) { |
4092 | task_handler->add_broken_counter(); |
4093 | task_handler->set_status(Task::Status::Unstart); |
4094 | @@ -372,7 +371,7 @@ |
4095 | |
4096 | task_ptr = (*it); |
4097 | http::Header headers; |
4098 | - task_ptr->task_handler()->on_prepare()((void*)&headers); |
4099 | + task_ptr->task_handler()->on_prepare()((void *)&headers); |
4100 | if (task_ptr->buffer_callback()) { |
4101 | client_->async_post(task_ptr, headers, task_ptr->buffer_callback(), task_ptr->file_size()); |
4102 | } else { |
4103 | @@ -392,13 +391,13 @@ |
4104 | task_handler->detach_request(); |
4105 | task_ptr.reset(); |
4106 | } |
4107 | - } catch (std::runtime_error& e) { |
4108 | + } catch (std::runtime_error &e) { |
4109 | //if content data is fetched chunk by chunk(buffering), set it broken once failed |
4110 | //as we didn't cache buffer locally. |
4111 | if (task_ptr->buffer_callback()) { |
4112 | task_ptr->set_error_string(e.what()); |
4113 | task_handler->set_status(Task::Status::Broken); |
4114 | - } else if (task_handler->status() != Task::Status::Canceled) { |
4115 | + } else if (task_handler->status() != Task::Status::Cancelled) { |
4116 | // if content data is local file, when error is caused by net issue, |
4117 | //increase broken counter and try it again. Once broken counter exceeds broken limit, |
4118 | //it's regarded as the "broken" one and we drop it. |
4119 | |
4120 | === modified file 'src/mcloud/api/taskhandler.h' |
4121 | --- src/mcloud/api/taskhandler.h 2016-10-26 08:50:32 +0000 |
4122 | +++ src/mcloud/api/taskhandler.h 2016-12-07 12:44:11 +0000 |
4123 | @@ -38,11 +38,11 @@ |
4124 | |
4125 | struct TaskHandler { |
4126 | |
4127 | - typedef std::function<void(void*)> PrepareHandler; |
4128 | + typedef std::function<void(void *)> PrepareHandler; |
4129 | |
4130 | typedef std::function<void(float)> ProgressHandler; |
4131 | |
4132 | - typedef std::function<void(const std::string&)> ReadyReadHandler; |
4133 | + typedef std::function<void(const std::string &)> ReadyReadHandler; |
4134 | |
4135 | typedef std::function<bool(void)> FinishedHandler; |
4136 | |
4137 | @@ -64,11 +64,11 @@ |
4138 | } |
4139 | |
4140 | /*! |
4141 | - * \brief Cancel a Task and set status as Canceled. |
4142 | + * \brief Cancel a Task and set status as Cancelled. |
4143 | * \sa status() |
4144 | */ |
4145 | void cancel() { |
4146 | - set_status(Task::Status::Canceled); |
4147 | + set_status(Task::Status::Cancelled); |
4148 | detach_request(); |
4149 | } |
4150 | |
4151 | @@ -143,8 +143,8 @@ |
4152 | * \brief attach network request \a request and \a future from internal http client |
4153 | * \sa detach_request() |
4154 | */ |
4155 | - void attach_request(const std::shared_ptr<core::net::http::StreamingRequest>& request, |
4156 | - const std::shared_future<bool>& future) { |
4157 | + void attach_request(const std::shared_ptr<core::net::http::StreamingRequest> &request, |
4158 | + const std::shared_future<bool> &future) { |
4159 | task_request = std::make_shared<TaskRequest>(request, future); |
4160 | } |
4161 | |
4162 | @@ -186,29 +186,29 @@ |
4163 | return false; |
4164 | } |
4165 | |
4166 | - TaskHandler::PrepareHandler& on_prepare() { |
4167 | + TaskHandler::PrepareHandler &on_prepare() { |
4168 | return prepare_handler; |
4169 | } |
4170 | |
4171 | - TaskHandler::ProgressHandler& on_progress() { |
4172 | + TaskHandler::ProgressHandler &on_progress() { |
4173 | return progress_handler; |
4174 | } |
4175 | |
4176 | - TaskHandler::FinishedHandler& on_finished() { |
4177 | + TaskHandler::FinishedHandler &on_finished() { |
4178 | return finished_handler; |
4179 | } |
4180 | |
4181 | - TaskHandler::ReadyReadHandler& on_ready_read() { |
4182 | + TaskHandler::ReadyReadHandler &on_ready_read() { |
4183 | return ready_read_handler; |
4184 | } |
4185 | |
4186 | - TaskHandler::StatusHandler& on_status() { |
4187 | + TaskHandler::StatusHandler &on_status() { |
4188 | return status_handler; |
4189 | } |
4190 | |
4191 | protected: |
4192 | - TaskHandler(const TaskHandler&) = delete; |
4193 | - TaskHandler(TaskHandler&&) = delete; |
4194 | + TaskHandler(const TaskHandler &) = delete; |
4195 | + TaskHandler(TaskHandler &&) = delete; |
4196 | |
4197 | private: |
4198 | struct BrokenCounter : std::atomic<int> { |
4199 | @@ -225,8 +225,8 @@ |
4200 | }; |
4201 | |
4202 | struct TaskRequest { |
4203 | - TaskRequest(const std::shared_ptr<core::net::http::StreamingRequest>& request, |
4204 | - const std::shared_future<bool>& future) : |
4205 | + TaskRequest(const std::shared_ptr<core::net::http::StreamingRequest> &request, |
4206 | + const std::shared_future<bool> &future) : |
4207 | request_(request), |
4208 | future_(future) { |
4209 | } |
4210 | |
4211 | === modified file 'src/mcloud/api/uploadtask.cpp' |
4212 | --- src/mcloud/api/uploadtask.cpp 2016-10-26 08:50:32 +0000 |
4213 | +++ src/mcloud/api/uploadtask.cpp 2016-12-07 12:44:11 +0000 |
4214 | @@ -24,33 +24,33 @@ |
4215 | using namespace mcloud::api; |
4216 | using namespace std; |
4217 | |
4218 | -UploadTask::UploadTask(const std::shared_ptr<UploadTaskPriv>& p) |
4219 | +UploadTask::UploadTask(const std::shared_ptr<UploadTaskPriv> &p) |
4220 | : p_(p) { |
4221 | |
4222 | } |
4223 | |
4224 | -const string& UploadTask::task_id() const { |
4225 | +const string &UploadTask::task_id() const { |
4226 | return p_->task_id(); |
4227 | } |
4228 | |
4229 | -const string& UploadTask::content_id() const { |
4230 | +const string &UploadTask::content_id() const { |
4231 | return p_->content_id(); |
4232 | } |
4233 | |
4234 | -const string& UploadTask::content_name() const { |
4235 | +const string &UploadTask::content_name() const { |
4236 | return p_->content_name(); |
4237 | } |
4238 | |
4239 | -const string& UploadTask::file_path() const { |
4240 | +const string &UploadTask::file_path() const { |
4241 | return p_->file_path(); |
4242 | } |
4243 | |
4244 | -const string& UploadTask::task_url() const { |
4245 | +const string &UploadTask::task_url() const { |
4246 | return p_->task_url(); |
4247 | } |
4248 | |
4249 | Task::Status UploadTask::status() const { |
4250 | - return p_->task_handler()->status(); |
4251 | + return p_->status(); |
4252 | } |
4253 | |
4254 | size_t UploadTask::file_size() const { |
4255 | @@ -61,18 +61,18 @@ |
4256 | return p_->is_need_upload(); |
4257 | } |
4258 | |
4259 | -Task::ProgressHandler& UploadTask::progress_changed() { |
4260 | +Task::ProgressHandler &UploadTask::progress_changed() { |
4261 | return p_->progress_changed(); |
4262 | } |
4263 | |
4264 | -Task::StatusHandler& UploadTask::status_changed() { |
4265 | +Task::StatusHandler &UploadTask::status_changed() { |
4266 | return p_->status_changed(); |
4267 | } |
4268 | |
4269 | -const string& UploadTask::error_string() const { |
4270 | +const string &UploadTask::error_string() const { |
4271 | return p_->error_string(); |
4272 | } |
4273 | |
4274 | void UploadTask::cancel() { |
4275 | - p_->task_handler()->cancel(); |
4276 | + p_->cancel(); |
4277 | } |
4278 | |
4279 | === modified file 'src/mcloud/api/uploadtask_priv.cpp' |
4280 | --- src/mcloud/api/uploadtask_priv.cpp 2016-10-24 15:25:02 +0000 |
4281 | +++ src/mcloud/api/uploadtask_priv.cpp 2016-12-07 12:44:11 +0000 |
4282 | @@ -30,10 +30,10 @@ |
4283 | using namespace mcloud::api; |
4284 | using namespace std; |
4285 | |
4286 | -UploadTaskPriv::UploadTaskPriv(const tinyxml2::XMLElement* root, |
4287 | - const string& task_id, |
4288 | - const string& redirection_url, |
4289 | - const string& file_path) |
4290 | +UploadTaskPriv::UploadTaskPriv(const tinyxml2::XMLElement *root, |
4291 | + const string &task_id, |
4292 | + const string &redirection_url, |
4293 | + const string &file_path) |
4294 | : file_path_(file_path), |
4295 | file_size_(fs::file_size(file_path_)), |
4296 | upload_task_id_(task_id), |
4297 | @@ -44,9 +44,9 @@ |
4298 | fillRequest(root); |
4299 | } |
4300 | |
4301 | -UploadTaskPriv::UploadTaskPriv(const tinyxml2::XMLElement* root, |
4302 | - const string& task_id, |
4303 | - const string& redirection_url, |
4304 | +UploadTaskPriv::UploadTaskPriv(const tinyxml2::XMLElement *root, |
4305 | + const string &task_id, |
4306 | + const string &redirection_url, |
4307 | size_t buffer_size, |
4308 | Task::Buffer_Callback buffer_callback) |
4309 | : file_size_(buffer_size), |
4310 | @@ -59,7 +59,7 @@ |
4311 | fillRequest(root); |
4312 | } |
4313 | |
4314 | -void UploadTaskPriv::fillRequest(const tinyxml2::XMLElement* root) { |
4315 | +void UploadTaskPriv::fillRequest(const tinyxml2::XMLElement *root) { |
4316 | content_id_ = root->FirstChildElement("contentID")->GetText(); |
4317 | content_name_ = root->FirstChildElement("contentName")->GetText(); |
4318 | is_need_upload_ = !strcmp(root->FirstChildElement("isNeedUpload")->GetText(), "1"); |
4319 | @@ -73,48 +73,51 @@ |
4320 | task_handler_->set_status(Task::Status::Complete); |
4321 | } |
4322 | |
4323 | - task_handler_->on_prepare() = [this](void* params) { |
4324 | + task_handler_->on_prepare() = [this](void *params) { |
4325 | //change status |
4326 | task_handler_->set_status(Task::Status::Running); |
4327 | |
4328 | //populate header info |
4329 | - http::Header* header = reinterpret_cast<http::Header*>(params); |
4330 | + http::Header *header = reinterpret_cast<http::Header *>(params); |
4331 | |
4332 | - string content_type; |
4333 | - string suffix = fs::path(file_path_).extension().string(); |
4334 | - if (suffix == "gif" || suffix == "jpg" || suffix == "jpeg" || suffix == "png") { |
4335 | - content_type = "image/" + suffix + "; name=" + content_name_; |
4336 | - } else if (suffix == "avi" || suffix == "mp4" || suffix == "mkv") { |
4337 | - content_type = "video/" + suffix + "; name=" + content_name_; |
4338 | - } else if (suffix == "wav" || suffix == "ogg") { |
4339 | - content_type = "audio/" + suffix + "; name=" + content_name_; |
4340 | - } else if (suffix == "mp3") { |
4341 | - content_type = "audio/mpeg; name=" + content_name_; |
4342 | - } else if (suffix == "ppt") { |
4343 | - content_type = "application/vnd.ms-powerpoint; name=" + content_name_; |
4344 | - } else if (suffix == "pptx") { |
4345 | - content_type = "application/vnd.openxmlformats-officedocument.presentationml.presentation; name=" + content_name_; |
4346 | - } else if (suffix == "doc") { |
4347 | - content_type = "application/msword; name=" + content_name_; |
4348 | - } else if (suffix == "docx") { |
4349 | - content_type = |
4350 | - "application/vnd.openxmlformats-officedocument.wordprocessingml.document; name=" + content_name_; |
4351 | - } else if (suffix == "xls") { |
4352 | - content_type = "application/vnd.ms-excel; name=" + content_name_; |
4353 | - } else if (suffix == "xlsx") { |
4354 | - content_type = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; name=" |
4355 | - + content_name_; |
4356 | - } else if (suffix == "odt") { |
4357 | - content_type = "application/vnd.oasis.opendocument.text; name=" + content_name_; |
4358 | - } else if (suffix == "ods") { |
4359 | - content_type = "application/vnd.oasis.opendocument.spreadsheet; name=" + content_name_; |
4360 | - } else if (suffix == "odp") { |
4361 | - content_type = "application/vnd.oasis.opendocument.presentation; name=" + content_name_; |
4362 | - } else if (suffix == "txt") { |
4363 | - content_type = "text/plain; name=" + content_name_; |
4364 | - } else { |
4365 | - content_type = "application/octet-stream; name=" + content_name_; |
4366 | - } |
4367 | + const string content_type = [this]() { |
4368 | + string type; |
4369 | + string suffix = fs::path(file_path_).extension().string(); |
4370 | + if (suffix == "gif" || suffix == "jpg" || suffix == "jpeg" || suffix == "png") { |
4371 | + type = "image/" + suffix + "; name=" + content_name_; |
4372 | + } else if (suffix == "avi" || suffix == "mp4" || suffix == "mkv") { |
4373 | + type = "video/" + suffix + "; name=" + content_name_; |
4374 | + } else if (suffix == "wav" || suffix == "ogg") { |
4375 | + type = "audio/" + suffix + "; name=" + content_name_; |
4376 | + } else if (suffix == "mp3") { |
4377 | + type = "audio/mpeg; name=" + content_name_; |
4378 | + } else if (suffix == "ppt") { |
4379 | + type = "application/vnd.ms-powerpoint; name=" + content_name_; |
4380 | + } else if (suffix == "pptx") { |
4381 | + type = "application/vnd.openxmlformats-officedocument.presentationml.presentation; name=" + content_name_; |
4382 | + } else if (suffix == "doc") { |
4383 | + type = "application/msword; name=" + content_name_; |
4384 | + } else if (suffix == "docx") { |
4385 | + type = "application/vnd.openxmlformats-officedocument.wordprocessingml.document; name=" + content_name_; |
4386 | + } else if (suffix == "xls") { |
4387 | + type = "application/vnd.ms-excel; name=" + content_name_; |
4388 | + } else if (suffix == "xlsx") { |
4389 | + type = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; name=" |
4390 | + + content_name_; |
4391 | + } else if (suffix == "odt") { |
4392 | + type = "application/vnd.oasis.opendocument.text; name=" + content_name_; |
4393 | + } else if (suffix == "ods") { |
4394 | + type = "application/vnd.oasis.opendocument.spreadsheet; name=" + content_name_; |
4395 | + } else if (suffix == "odp") { |
4396 | + type = "application/vnd.oasis.opendocument.presentation; name=" + content_name_; |
4397 | + } else if (suffix == "txt") { |
4398 | + type = "text/plain; name=" + content_name_; |
4399 | + } else { |
4400 | + type = "application/octet-stream; name=" + content_name_; |
4401 | + } |
4402 | + |
4403 | + return type; |
4404 | + }(); |
4405 | header->add("Content-Type", content_type); |
4406 | |
4407 | //mcloud proprioty header spec |
4408 | @@ -163,7 +166,7 @@ |
4409 | task_handler_->on_ready_read() = [this](const string & data) { |
4410 | tinyxml2::XMLDocument doc; |
4411 | tinyxml2::XMLError error = doc.Parse(data.c_str()); |
4412 | - const tinyxml2::XMLElement* result = doc.FirstChildElement(); |
4413 | + const tinyxml2::XMLElement *result = doc.FirstChildElement(); |
4414 | |
4415 | if (error != tinyxml2::XML_SUCCESS && !strcmp(result->Attribute("resultCode"), "0")) { |
4416 | cerr << "upload content interrupted " << endl; |
4417 | @@ -171,23 +174,23 @@ |
4418 | }; |
4419 | } |
4420 | |
4421 | -const string& UploadTaskPriv::task_id() const { |
4422 | +const string &UploadTaskPriv::task_id() const { |
4423 | return upload_task_id_; |
4424 | } |
4425 | |
4426 | -const string& UploadTaskPriv::content_id() const { |
4427 | +const string &UploadTaskPriv::content_id() const { |
4428 | return content_id_; |
4429 | } |
4430 | |
4431 | -const string& UploadTaskPriv::content_name() const { |
4432 | +const string &UploadTaskPriv::content_name() const { |
4433 | return content_name_; |
4434 | } |
4435 | |
4436 | -const string& UploadTaskPriv::file_path() const { |
4437 | +const string &UploadTaskPriv::file_path() const { |
4438 | return file_path_; |
4439 | } |
4440 | |
4441 | -const string& UploadTaskPriv::task_url() const { |
4442 | +const string &UploadTaskPriv::task_url() const { |
4443 | return task_url_; |
4444 | } |
4445 | |
4446 | @@ -203,27 +206,27 @@ |
4447 | return is_need_upload_; |
4448 | } |
4449 | |
4450 | -std::ifstream& UploadTaskPriv::ifstream() { |
4451 | +std::ifstream &UploadTaskPriv::ifstream() { |
4452 | return ifs_; |
4453 | } |
4454 | |
4455 | -const string& UploadTaskPriv::error_string() const { |
4456 | +const string &UploadTaskPriv::error_string() const { |
4457 | return error_string_; |
4458 | } |
4459 | |
4460 | -void UploadTaskPriv::set_error_string(const string& err) { |
4461 | +void UploadTaskPriv::set_error_string(const string &err) { |
4462 | error_string_ = err; |
4463 | } |
4464 | |
4465 | -Task::ProgressHandler& UploadTaskPriv::progress_changed() { |
4466 | +Task::ProgressHandler &UploadTaskPriv::progress_changed() { |
4467 | return progress_handler_; |
4468 | } |
4469 | |
4470 | -Task::StatusHandler& UploadTaskPriv::status_changed() { |
4471 | +Task::StatusHandler &UploadTaskPriv::status_changed() { |
4472 | return status_handler_; |
4473 | } |
4474 | |
4475 | -Task::Buffer_Callback& UploadTaskPriv::buffer_callback() { |
4476 | +Task::Buffer_Callback &UploadTaskPriv::buffer_callback() { |
4477 | return buffer_callback_; |
4478 | } |
4479 | |
4480 | |
4481 | === modified file 'src/mcloud/api/uploadtask_priv.h' |
4482 | --- src/mcloud/api/uploadtask_priv.h 2016-10-24 15:25:02 +0000 |
4483 | +++ src/mcloud/api/uploadtask_priv.h 2016-12-07 12:44:11 +0000 |
4484 | @@ -37,38 +37,38 @@ |
4485 | public: |
4486 | typedef std::shared_ptr<UploadTaskPriv> Ptr; |
4487 | |
4488 | - UploadTaskPriv(const tinyxml2::XMLElement* root, |
4489 | - const std::string& task_id, |
4490 | - const std::string& redirection_url, |
4491 | - const std::string& file_path); |
4492 | + UploadTaskPriv(const tinyxml2::XMLElement *root, |
4493 | + const std::string &task_id, |
4494 | + const std::string &redirection_url, |
4495 | + const std::string &file_path); |
4496 | |
4497 | - UploadTaskPriv(const tinyxml2::XMLElement* root, |
4498 | - const std::string& task_id, |
4499 | - const std::string& redirection_url, |
4500 | + UploadTaskPriv(const tinyxml2::XMLElement *root, |
4501 | + const std::string &task_id, |
4502 | + const std::string &redirection_url, |
4503 | size_t buffer_size, |
4504 | Task::Buffer_Callback buffer_callback); |
4505 | |
4506 | - const std::string& task_id() const; |
4507 | - |
4508 | - const std::string& content_id() const; |
4509 | - |
4510 | - const std::string& content_name() const; |
4511 | - |
4512 | - const std::string& file_path() const; |
4513 | - |
4514 | - const std::string& task_url() const; |
4515 | + const std::string &task_id() const; |
4516 | + |
4517 | + const std::string &content_id() const; |
4518 | + |
4519 | + const std::string &content_name() const; |
4520 | + |
4521 | + const std::string &file_path() const; |
4522 | + |
4523 | + const std::string &task_url() const; |
4524 | |
4525 | Task::Status status() const; |
4526 | |
4527 | - Task::ProgressHandler& progress_changed(); |
4528 | - |
4529 | - Task::StatusHandler& status_changed(); |
4530 | - |
4531 | - Task::Buffer_Callback& buffer_callback(); |
4532 | - |
4533 | - const std::string& error_string() const; |
4534 | - |
4535 | - void set_error_string(const std::string& err); |
4536 | + Task::ProgressHandler &progress_changed(); |
4537 | + |
4538 | + Task::StatusHandler &status_changed(); |
4539 | + |
4540 | + Task::Buffer_Callback &buffer_callback(); |
4541 | + |
4542 | + const std::string &error_string() const; |
4543 | + |
4544 | + void set_error_string(const std::string &err); |
4545 | |
4546 | void cancel(); |
4547 | |
4548 | @@ -78,10 +78,10 @@ |
4549 | |
4550 | std::shared_ptr<TaskHandler> task_handler() const; |
4551 | |
4552 | - std::ifstream& ifstream(); |
4553 | + std::ifstream &ifstream(); |
4554 | |
4555 | protected: |
4556 | - void fillRequest(const tinyxml2::XMLElement* root); |
4557 | + void fillRequest(const tinyxml2::XMLElement *root); |
4558 | |
4559 | private: |
4560 | std::string file_path_; |
4561 | |
4562 | === added file 'tests/server/resources/1011YfnDD09x03920151110171910rox.xml' |
4563 | --- tests/server/resources/1011YfnDD09x03920151110171910rox.xml 1970-01-01 00:00:00 +0000 |
4564 | +++ tests/server/resources/1011YfnDD09x03920151110171910rox.xml 2016-12-07 12:44:11 +0000 |
4565 | @@ -0,0 +1,1 @@ |
4566 | +<?xml version="1.0" encoding="UTF-8"?><result resultCode="9102" desc="[212|saes_CYCommon|673F558E07604214B59ACF5579CB4514]Failed to invoke the service.catalogID/contentID[1011YfnDD09x03920151110171910rox] invalid[NDA(100071)][Flag:673F558E07604214B59ACF5579CB4514]"></result> |
4567 | |
4568 | === added file 'tests/server/resources/1811asktx23a00019700101000000001.backup.xml' |
4569 | --- tests/server/resources/1811asktx23a00019700101000000001.backup.xml 1970-01-01 00:00:00 +0000 |
4570 | +++ tests/server/resources/1811asktx23a00019700101000000001.backup.xml 2016-12-07 12:44:11 +0000 |
4571 | @@ -0,0 +1,1 @@ |
4572 | +<?xml version="1.0" encoding="UTF-8"?><result resultCode="0"><getDiskResult><parentCatalogID>root</parentCatalogID><nodeCount>118</nodeCount><catalogList length="10"><catalogInfo><catalogName>手机图片</catalogName><catalogID>1811asktx23a00019700101000000043</catalogID><catalogType>7</catalogType><isShared>false</isShared><createTime>20160420134258</createTime><updateTime>20160420134258</updateTime><catalogLevel>2</catalogLevel><shareDoneeCount>0</shareDoneeCount><ETagOprType>1</ETagOprType><openType>0</openType><dirEtag>4194304</dirEtag><tombstoned>0</tombstoned><moved>0</moved><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><isFixedDir>1</isFixedDir><path>00019700101000000001/1811asktx23a00019700101000000043</path><owner>13718269220</owner><shareType>0</shareType></catalogInfo><catalogInfo><catalogName>手机视频</catalogName><catalogID>1811asktx23a00019700101000000044</catalogID><catalogType>7</catalogType><isShared>false</isShared><createTime>20160420134258</createTime><updateTime>20160420134258</updateTime><catalogLevel>2</catalogLevel><shareDoneeCount>0</shareDoneeCount><ETagOprType>1</ETagOprType><openType>0</openType><dirEtag>4194304</dirEtag><tombstoned>0</tombstoned><moved>0</moved><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><isFixedDir>1</isFixedDir><path>00019700101000000001/1811asktx23a00019700101000000044</path><owner>13718269220</owner><shareType>0</shareType></catalogInfo><catalogInfo><catalogName>sprint_test (1)</catalogName><catalogID>1811asktx23a054201608290159358tx</catalogID><catalogType>0</catalogType><isShared>false</isShared><createTime>20160829015935</createTime><updateTime>20160829015945</updateTime><catalogLevel>2</catalogLevel><shareDoneeCount>0</shareDoneeCount><ETagOprType>1</ETagOprType><openType>0</openType><dirEtag>4194304</dirEtag><tombstoned>0</tombstoned><moved>0</moved><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><isFixedDir>0</isFixedDir><path>00019700101000000001/1811asktx23a054201608290159358tx</path><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType></catalogInfo><catalogInfo><catalogName>sprint_test</catalogName><catalogID>1811asktx23a05720160824160623khm</catalogID><catalogType>0</catalogType><isShared>false</isShared><createTime>20160824160623</createTime><updateTime>20160824160623</updateTime><catalogLevel>2</catalogLevel><shareDoneeCount>0</shareDoneeCount><ETagOprType>1</ETagOprType><openType>0</openType><dirEtag>4194304</dirEtag><tombstoned>0</tombstoned><moved>0</moved><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><isFixedDir>0</isFixedDir><path>00019700101000000001/1811asktx23a05720160824160623khm</path><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType></catalogInfo><catalogInfo><catalogName>since_update</catalogName><catalogID>1811asktx23a057201608101011344kx</catalogID><catalogType>0</catalogType><isShared>false</isShared><createTime>20160810101134</createTime><updateTime>20160810101458</updateTime><catalogLevel>2</catalogLevel><shareDoneeCount>0</shareDoneeCount><ETagOprType>1</ETagOprType><openType>0</openType><dirEtag>4194304</dirEtag><tombstoned>0</tombstoned><moved>0</moved><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><isFixedDir>0</isFixedDir><path>00019700101000000001/1811asktx23a057201608101011344kx</path><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType></catalogInfo><catalogInfo><catalogName>Let it be</catalogName><catalogID>1811asktx23a05420160525143841ng2</catalogID><catalogType>0</catalogType><isShared>false</isShared><createTime>20160525143841</createTime><updateTime>20160721151538</updateTime><catalogLevel>2</catalogLevel><shareDoneeCount>0</shareDoneeCount><ETagOprType>0</ETagOprType><openType>0</openType><dirEtag>4194304</dirEtag><tombstoned>0</tombstoned><moved>0</moved><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><isFixedDir>0</isFixedDir><path>00019700101000000001/1811asktx23a05420160525143841ng2</path><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType></catalogInfo><catalogInfo><catalogName>Test</catalogName><catalogID>1811asktx23a057201607181609041x9</catalogID><catalogType>0</catalogType><isShared>false</isShared><createTime>20160718160904</createTime><updateTime>20160719115431</updateTime><catalogLevel>2</catalogLevel><shareDoneeCount>0</shareDoneeCount><ETagOprType>1</ETagOprType><openType>0</openType><dirEtag>4194304</dirEtag><tombstoned>0</tombstoned><moved>0</moved><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><isFixedDir>0</isFixedDir><path>00019700101000000001/1811asktx23a057201607181609041x9</path><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType></catalogInfo><catalogInfo><catalogName>Hahah</catalogName><catalogID>1811asktx23a05420160704141550940</catalogID><catalogType>0</catalogType><isShared>false</isShared><createTime>20160704141550</createTime><updateTime>20160704141550</updateTime><catalogLevel>2</catalogLevel><shareDoneeCount>0</shareDoneeCount><ETagOprType>1</ETagOprType><openType>0</openType><dirEtag>4194304</dirEtag><tombstoned>0</tombstoned><moved>0</moved><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><isFixedDir>0</isFixedDir><path>00019700101000000001/1811asktx23a05420160704141550940</path><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType></catalogInfo><catalogInfo><catalogName>Just 4 fun (1) (1)</catalogName><catalogID>1811asktx23a05820160526174424fx2</catalogID><catalogType>0</catalogType><isShared>false</isShared><createTime>20160526174424</createTime><updateTime>20160603141719</updateTime><catalogLevel>2</catalogLevel><shareDoneeCount>0</shareDoneeCount><ETagOprType>1</ETagOprType><openType>0</openType><dirEtag>4194304</dirEtag><tombstoned>0</tombstoned><moved>0</moved><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><isFixedDir>0</isFixedDir><path>00019700101000000001/1811asktx23a05820160526174424fx2</path><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType></catalogInfo><catalogInfo><catalogName>T-Folder</catalogName><catalogID>1811asktx23a05720160524103403cs1</catalogID><catalogType>0</catalogType><isShared>false</isShared><createTime>20160524103403</createTime><updateTime>20160524131800</updateTime><catalogLevel>2</catalogLevel><shareDoneeCount>0</shareDoneeCount><ETagOprType>1</ETagOprType><openType>0</openType><dirEtag>4194304</dirEtag><tombstoned>0</tombstoned><moved>0</moved><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><isFixedDir>0</isFixedDir><path>00019700101000000001/1811asktx23a05720160524103403cs1</path><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType></catalogInfo></catalogList><contentList length="40"><contentInfo><contentID>1811asktx23a05620160907094111z8s</contentID><contentName>sprint_file</contentName><contentSuffix></contentSuffix><contentSize>524292</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>0</contentType><contentOrigin>1</contentOrigin><updateTime>20160907094111</updateTime><commentCount>0</commentCount><thumbnailURL></thumbnailURL><bigthumbnailURL></bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs26&fileid=FR5eb3daa23f9cd2924aebb0fa1d9b6190&ct=0&type=2&code=776587993E253283EB3589BE34ED4F22E29E6216C3BB2BF00FD3A52A68A8B0FC&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05620160907094111z8s&cn=sprint_file&oprChannel=APP1ZtqoN3R0002&dom=D916</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>1</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160907094111</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>E79FEF3F1765E2F07A791ADD4C024725</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>884735041332437937</fileEtag><encryptFlag>0</encryptFlag><fileVersion>4194304</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a05620160826202333a5h</contentID><contentName>Backup_26.08.2016-14.23.33.473</contentName><contentSuffix>473</contentSuffix><contentSize>15564800</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>0</contentType><contentOrigin>1</contentOrigin><updateTime>20160826202359</updateTime><commentCount>0</commentCount><thumbnailURL></thumbnailURL><bigthumbnailURL></bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs14&fileid=Dl40a0cfdfe677e3b5f4b4521fd16958d4.473&ct=0&type=2&code=51E255BA10D8B252E7CAED09DCD3D59B9C0C865DB814E14137EF7D3867148687&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05620160826202333a5h&cn=Backup_26.08.2016-14...&oprChannel=APP1ZtqoN3R0002&dom=D914</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>1</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160826202333</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>89F692982E598D01DA1C5821D2288B9F</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>880548152215984919</fileEtag><encryptFlag>0</encryptFlag><fileVersion>880548044766306311</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a055201608262022276ju</contentID><contentName>Backup_26.08.2016-14.22.27.425</contentName><contentSuffix>425</contentSuffix><contentSize>15564800</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>0</contentType><contentOrigin>1</contentOrigin><updateTime>20160826202253</updateTime><commentCount>0</commentCount><thumbnailURL></thumbnailURL><bigthumbnailURL></bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs24&fileid=D00ed18e4117d0a43cd96b46adce513666.425&ct=0&type=2&code=16B77B592FFFE0D1507B7BB747E81607A6089EE144F9C3577A884F4B75DAB4B0&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a055201608262022276ju&cn=Backup_26.08.2016-14...&oprChannel=APP1ZtqoN3R0002&dom=D914</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>1</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160826202227</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>89F692982E598D01DA1C5821D2288B9F</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>880547875740050139</fileEtag><encryptFlag>0</encryptFlag><fileVersion>880547767728332062</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a058201608092154414jn</contentID><contentName>for_testing.jpg</contentName><contentSuffix>jpg</contentSuffix><contentSize>1829697</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160809215441</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=F2d5d521e8c40bde1499c37801a04e2cc6.jpg&ct=1&type=0&code=2BB66CF7FDC2A8391685BEFCFA0596A2E52F3C8CAE437FDE3432D73197BFDA00&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a058201608092154414jn&cn=for_testing&oprChannel=APP1ZtqoN3R0002&dom=D916</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=F2d5d521e8c40bde1499c37801a04e2cc6.jpg&ct=1&type=1&code=2BB66CF7FDC2A8391685BEFCFA0596A2E52F3C8CAE437FDE3432D73197BFDA00&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a058201608092154414jn&cn=for_testing&oprChannel=APP1ZtqoN3R0002&dom=D916</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=F2d5d521e8c40bde1499c37801a04e2cc6.jpg&ct=1&type=2&code=2BB66CF7FDC2A8391685BEFCFA0596A2E52F3C8CAE437FDE3432D73197BFDA00&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a058201608092154414jn&cn=for_testing&oprChannel=APP1ZtqoN3R0002&dom=D916</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>0</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160809215441</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>17B62C58946679F457D016727B542538</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>874410384460999329</fileEtag><encryptFlag>0</encryptFlag><fileVersion>4194304</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a05820160705201212e8q</contentID><contentName>don't remove.jpg</contentName><contentSuffix>jpg</contentSuffix><contentSize>16921</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160809201925</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs23&fileid=CU5a3b2ee2f3903b383ba08d3c06e189cf.jpg&ct=1&type=0&code=6C31792008C4440B8419C0E28B8607B878836BBF706B938E446ED3CBAF70AAE4&exp=34111&account=MTM3MTgyNjkyMjA=&p=1&ui=1811asktx23a&ci=1811asktx23a05820160705201212e8q&cn=don%27t+remove&oprChannel=APP1ZtqoN3R0002&dom=D913</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs23&fileid=CU5a3b2ee2f3903b383ba08d3c06e189cf.jpg&ct=1&type=1&code=6C31792008C4440B8419C0E28B8607B878836BBF706B938E446ED3CBAF70AAE4&exp=34111&account=MTM3MTgyNjkyMjA=&p=1&ui=1811asktx23a&ci=1811asktx23a05820160705201212e8q&cn=don%27t+remove&oprChannel=APP1ZtqoN3R0002&dom=D913</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs23&fileid=CU5a3b2ee2f3903b383ba08d3c06e189cf.jpg&ct=1&type=2&code=6C31792008C4440B8419C0E28B8607B878836BBF706B938E446ED3CBAF70AAE4&exp=34111&account=MTM3MTgyNjkyMjA=&p=1&ui=1811asktx23a&ci=1811asktx23a05820160705201212e8q&cn=don%27t+remove&oprChannel=APP1ZtqoN3R0002&dom=D913</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>1</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160705201212</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>99105FC17FE605BF9B292042DD1545CB</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>874386411505445204</fileEtag><encryptFlag>0</encryptFlag><fileVersion>861701020788845427</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>1</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a05720160513173235acx</contentID><contentName>screenshots.png</contentName><contentSuffix>png</contentSuffix><contentSize>274540</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160809201914</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs17&fileid=Glb2cef87ab2255970f45b7d9f5eeb5864.png&ct=1&type=0&code=977F8701658B2A04951AC9605ACC31DAEFBF2183CC0CD4DE581EF2A37B7E429A&exp=34111&account=MTM3MTgyNjkyMjA=&p=1&ui=1811asktx23a&ci=1811asktx23a05720160513173235acx&cn=screenshots&oprChannel=APP1ZtqoN3R0002&dom=D917</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs17&fileid=Glb2cef87ab2255970f45b7d9f5eeb5864.png&ct=1&type=1&code=977F8701658B2A04951AC9605ACC31DAEFBF2183CC0CD4DE581EF2A37B7E429A&exp=34111&account=MTM3MTgyNjkyMjA=&p=1&ui=1811asktx23a&ci=1811asktx23a05720160513173235acx&cn=screenshots&oprChannel=APP1ZtqoN3R0002&dom=D917</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs17&fileid=Glb2cef87ab2255970f45b7d9f5eeb5864.png&ct=1&type=2&code=977F8701658B2A04951AC9605ACC31DAEFBF2183CC0CD4DE581EF2A37B7E429A&exp=34111&account=MTM3MTgyNjkyMjA=&p=1&ui=1811asktx23a&ci=1811asktx23a05720160513173235acx&cn=screenshots&oprChannel=APP1ZtqoN3R0002&dom=D917</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>1</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160513173235</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>ABDD204E94C1E8CD9F5158D342C38DEA</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>874386364751535791</fileEtag><encryptFlag>0</encryptFlag><fileVersion>842454293183587347</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>1</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a05520160808154147snh</contentID><contentName>image20160808_154143457.jpg</contentName><contentSuffix>jpg</contentSuffix><contentSize>1736385</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160808154204</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=F221ebee94365fa01cd2a8329af79ef7cb.jpg&ct=1&type=0&code=BBAC291D85C201C51980DE00B7F91BC703BB0A8757BDED33BF7FEFDB1AC42022&exp=34111&account=MTM3MTgyNjkyMjA=&p=1&ui=1811asktx23a&ci=1811asktx23a05520160808154147snh&cn=image20160808_154143...&oprChannel=APP1ZtqoN3R0002&dom=D916</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=F221ebee94365fa01cd2a8329af79ef7cb.jpg&ct=1&type=1&code=BBAC291D85C201C51980DE00B7F91BC703BB0A8757BDED33BF7FEFDB1AC42022&exp=34111&account=MTM3MTgyNjkyMjA=&p=1&ui=1811asktx23a&ci=1811asktx23a05520160808154147snh&cn=image20160808_154143...&oprChannel=APP1ZtqoN3R0002&dom=D916</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=F221ebee94365fa01cd2a8329af79ef7cb.jpg&ct=1&type=2&code=BBAC291D85C201C51980DE00B7F91BC703BB0A8757BDED33BF7FEFDB1AC42022&exp=34111&account=MTM3MTgyNjkyMjA=&p=1&ui=1811asktx23a&ci=1811asktx23a05520160808154147snh&cn=image20160808_154143...&oprChannel=APP1ZtqoN3R0002&dom=D916</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>1</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160808154147</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>2307B5E1A65479CBB7A7EC78D2947526</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>884063314508111668</fileEtag><encryptFlag>0</encryptFlag><fileVersion>873954152457559838</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>1</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a05720160808154109pji</contentID><contentName>image20160808_154107174.jpg</contentName><contentSuffix>jpg</contentSuffix><contentSize>1706049</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160808154129</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=FNf89f70e4e8471924a359cb467ba35aa7.jpg&ct=1&type=0&code=2191F79ED915495ACFC47A8C622B71F79A072BED0511208FBAC411BD102CDC3B&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05720160808154109pji&cn=image20160808_154107...&oprChannel=APP1ZtqoN3R0002&dom=D916</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=FNf89f70e4e8471924a359cb467ba35aa7.jpg&ct=1&type=1&code=2191F79ED915495ACFC47A8C622B71F79A072BED0511208FBAC411BD102CDC3B&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05720160808154109pji&cn=image20160808_154107...&oprChannel=APP1ZtqoN3R0002&dom=D916</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=FNf89f70e4e8471924a359cb467ba35aa7.jpg&ct=1&type=2&code=2191F79ED915495ACFC47A8C622B71F79A072BED0511208FBAC411BD102CDC3B&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05720160808154109pji&cn=image20160808_154107...&oprChannel=APP1ZtqoN3R0002&dom=D916</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>1</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160808154109</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>13CBF873EB66907832C4E27737A9DCDA</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>873954076314166929</fileEtag><encryptFlag>0</encryptFlag><fileVersion>873953995603174938</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a05420160808154021sny</contentID><contentName>image20160808_154019946.jpg</contentName><contentSuffix>jpg</contentSuffix><contentSize>1457857</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160808154054</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=Fgf53b37fd55197641293885d2824c45d9.jpg&ct=1&type=0&code=1EAB46EF49E92F2481EA15D12ADD5CF848755C1BF09AEB2D4AA301F2C7E5BA0F&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05420160808154021sny&cn=image20160808_154019...&oprChannel=APP1ZtqoN3R0002&dom=D916</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=Fgf53b37fd55197641293885d2824c45d9.jpg&ct=1&type=1&code=1EAB46EF49E92F2481EA15D12ADD5CF848755C1BF09AEB2D4AA301F2C7E5BA0F&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05420160808154021sny&cn=image20160808_154019...&oprChannel=APP1ZtqoN3R0002&dom=D916</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=Fgf53b37fd55197641293885d2824c45d9.jpg&ct=1&type=2&code=1EAB46EF49E92F2481EA15D12ADD5CF848755C1BF09AEB2D4AA301F2C7E5BA0F&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05420160808154021sny&cn=image20160808_154019...&oprChannel=APP1ZtqoN3R0002&dom=D916</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>0</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160808154021</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>F0FE2EC03F2CF59158F15477A7532129</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>873953929995872964</fileEtag><encryptFlag>0</encryptFlag><fileVersion>873953792892459690</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a05720160808153826pde</contentID><contentName>image20160808_153825792.jpg</contentName><contentSuffix>jpg</contentSuffix><contentSize>1675841</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160808153831</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=F23e96881721ea8d24139302e13d9c5710.jpg&ct=1&type=0&code=3F2852D338CD4629F25BDED40BE90DD86D53116E4FF7F0C96C1729CC9FF5A500&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05720160808153826pde&cn=image20160808_153825...&oprChannel=APP1ZtqoN3R0002&dom=D916</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=F23e96881721ea8d24139302e13d9c5710.jpg&ct=1&type=1&code=3F2852D338CD4629F25BDED40BE90DD86D53116E4FF7F0C96C1729CC9FF5A500&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05720160808153826pde&cn=image20160808_153825...&oprChannel=APP1ZtqoN3R0002&dom=D916</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=F23e96881721ea8d24139302e13d9c5710.jpg&ct=1&type=2&code=3F2852D338CD4629F25BDED40BE90DD86D53116E4FF7F0C96C1729CC9FF5A500&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05720160808153826pde&cn=image20160808_153825...&oprChannel=APP1ZtqoN3R0002&dom=D916</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>0</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160808153826</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>D52CFC21664C2538828F71C299DC6D18</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>873953331405774851</fileEtag><encryptFlag>0</encryptFlag><fileVersion>873953311122122246</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a05820160808153806r26</contentID><contentName>image20160808_153804885.jpg</contentName><contentSuffix>jpg</contentSuffix><contentSize>1644993</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160808153811</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=FK854ad20042612bffd1ca1e44343112fa.jpg&ct=1&type=0&code=C4F3E7535A09D169595D4FEA9F23290FE4CA5C07F3F7878E9F399ADA70781E4E&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05820160808153806r26&cn=image20160808_153804...&oprChannel=APP1ZtqoN3R0002&dom=D916</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=FK854ad20042612bffd1ca1e44343112fa.jpg&ct=1&type=1&code=C4F3E7535A09D169595D4FEA9F23290FE4CA5C07F3F7878E9F399ADA70781E4E&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05820160808153806r26&cn=image20160808_153804...&oprChannel=APP1ZtqoN3R0002&dom=D916</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=FK854ad20042612bffd1ca1e44343112fa.jpg&ct=1&type=2&code=C4F3E7535A09D169595D4FEA9F23290FE4CA5C07F3F7878E9F399ADA70781E4E&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05820160808153806r26&cn=image20160808_153804...&oprChannel=APP1ZtqoN3R0002&dom=D916</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>1</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160808153806</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>3A0C8664A144165896001B62A0823C55</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>873953247809101228</fileEtag><encryptFlag>0</encryptFlag><fileVersion>873953226300713664</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a05720160808153730pby</contentID><contentName>image20160808_153728672.jpg</contentName><contentSuffix>jpg</contentSuffix><contentSize>1821249</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160808153733</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=Fma10b3d9ffd3c2d256ca4112dc8c27939.jpg&ct=1&type=0&code=87D2041F6C01822C672DF60E3FC8879A9A3B19A681F019694545E2261C7AD111&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05720160808153730pby&cn=image20160808_153728...&oprChannel=APP1ZtqoN3R0002&dom=D916</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=Fma10b3d9ffd3c2d256ca4112dc8c27939.jpg&ct=1&type=1&code=87D2041F6C01822C672DF60E3FC8879A9A3B19A681F019694545E2261C7AD111&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05720160808153730pby&cn=image20160808_153728...&oprChannel=APP1ZtqoN3R0002&dom=D916</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=Fma10b3d9ffd3c2d256ca4112dc8c27939.jpg&ct=1&type=2&code=87D2041F6C01822C672DF60E3FC8879A9A3B19A681F019694545E2261C7AD111&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05720160808153730pby&cn=image20160808_153728...&oprChannel=APP1ZtqoN3R0002&dom=D916</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>1</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160808153730</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>8F9EC5498358B4C06A6C6E8810C53C9B</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>873953090170382880</fileEtag><encryptFlag>0</encryptFlag><fileVersion>873953075070887151</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a05420160808153651sh5</contentID><contentName>image20160808_153649737.jpg</contentName><contentSuffix>jpg</contentSuffix><contentSize>1608129</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160808153722</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=FW409672c32427f1190994c8e97313c2e9.jpg&ct=1&type=0&code=9267903B86BA3198973DB2D7043CE188B79951557B22EBD519ABB42284C7254C&exp=34111&account=MTM3MTgyNjkyMjA=&p=1&ui=1811asktx23a&ci=1811asktx23a05420160808153651sh5&cn=image20160808_153649...&oprChannel=APP1ZtqoN3R0002&dom=D916</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=FW409672c32427f1190994c8e97313c2e9.jpg&ct=1&type=1&code=9267903B86BA3198973DB2D7043CE188B79951557B22EBD519ABB42284C7254C&exp=34111&account=MTM3MTgyNjkyMjA=&p=1&ui=1811asktx23a&ci=1811asktx23a05420160808153651sh5&cn=image20160808_153649...&oprChannel=APP1ZtqoN3R0002&dom=D916</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=FW409672c32427f1190994c8e97313c2e9.jpg&ct=1&type=2&code=9267903B86BA3198973DB2D7043CE188B79951557B22EBD519ABB42284C7254C&exp=34111&account=MTM3MTgyNjkyMjA=&p=1&ui=1811asktx23a&ci=1811asktx23a05420160808153651sh5&cn=image20160808_153649...&oprChannel=APP1ZtqoN3R0002&dom=D916</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>1</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160808153651</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>FCA7DA7537FE089FE390B932F0F7802D</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>874232376425044109</fileEtag><encryptFlag>0</encryptFlag><fileVersion>873952912969423229</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>1</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a05420160808153103s3p</contentID><contentName>image20160808_153100682.jpg</contentName><contentSuffix>jpg</contentSuffix><contentSize>1735361</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160808153144</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=F71519dd9d51e23a5c37b52620693761b4.jpg&ct=1&type=0&code=30E713CDD26321896A713015BE4FE883C9D7DE21439A9AD400806E811163556F&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05420160808153103s3p&cn=image20160808_153100...&oprChannel=APP1ZtqoN3R0002&dom=D916</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=F71519dd9d51e23a5c37b52620693761b4.jpg&ct=1&type=1&code=30E713CDD26321896A713015BE4FE883C9D7DE21439A9AD400806E811163556F&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05420160808153103s3p&cn=image20160808_153100...&oprChannel=APP1ZtqoN3R0002&dom=D916</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=F71519dd9d51e23a5c37b52620693761b4.jpg&ct=1&type=2&code=30E713CDD26321896A713015BE4FE883C9D7DE21439A9AD400806E811163556F&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05420160808153103s3p&cn=image20160808_153100...&oprChannel=APP1ZtqoN3R0002&dom=D916</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>1</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160808153103</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>A7E62C39FDC3363C23748B03D201F1FD</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>873951625280346689</fileEtag><encryptFlag>0</encryptFlag><fileVersion>873951451753601358</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a05620160808153059uoz</contentID><contentName>image20160808_153058223.jpg</contentName><contentSuffix>jpg</contentSuffix><contentSize>1729089</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160808153137</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=FC1285eb7993fbde6df5619ea3ea642f33.jpg&ct=1&type=0&code=D7A106C6F2B26BB1EA228E5B9DC29B5DFDF44FF1A7CA5D4A229724E8F18CD425&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05620160808153059uoz&cn=image20160808_153058...&oprChannel=APP1ZtqoN3R0002&dom=D916</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=FC1285eb7993fbde6df5619ea3ea642f33.jpg&ct=1&type=1&code=D7A106C6F2B26BB1EA228E5B9DC29B5DFDF44FF1A7CA5D4A229724E8F18CD425&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05620160808153059uoz&cn=image20160808_153058...&oprChannel=APP1ZtqoN3R0002&dom=D916</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=FC1285eb7993fbde6df5619ea3ea642f33.jpg&ct=1&type=2&code=D7A106C6F2B26BB1EA228E5B9DC29B5DFDF44FF1A7CA5D4A229724E8F18CD425&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05620160808153059uoz&cn=image20160808_153058...&oprChannel=APP1ZtqoN3R0002&dom=D916</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>1</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160808153059</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>7973615E30735947E55299E7290B5CA8</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>873951595865693251</fileEtag><encryptFlag>0</encryptFlag><fileVersion>873951435773305129</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a05620160808153057uow</contentID><contentName>image20160808_153056326.jpg</contentName><contentSuffix>jpg</contentSuffix><contentSize>1590721</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160808153123</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=F92aa031d67a4d1cd87fa9665bb88e7519.jpg&ct=1&type=0&code=182EE8ED822C70C8A86D42CC6E15A309BF5EA3ACA4E1EF36BA3D60267DACD572&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05620160808153057uow&cn=image20160808_153056...&oprChannel=APP1ZtqoN3R0002&dom=D916</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=F92aa031d67a4d1cd87fa9665bb88e7519.jpg&ct=1&type=1&code=182EE8ED822C70C8A86D42CC6E15A309BF5EA3ACA4E1EF36BA3D60267DACD572&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05620160808153057uow&cn=image20160808_153056...&oprChannel=APP1ZtqoN3R0002&dom=D916</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=F92aa031d67a4d1cd87fa9665bb88e7519.jpg&ct=1&type=2&code=182EE8ED822C70C8A86D42CC6E15A309BF5EA3ACA4E1EF36BA3D60267DACD572&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05620160808153057uow&cn=image20160808_153056...&oprChannel=APP1ZtqoN3R0002&dom=D916</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>0</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160808153057</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>F6EFEA0378ECD49BA968EA07D5D80BB0</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>873951536520486890</fileEtag><encryptFlag>0</encryptFlag><fileVersion>873951425455317279</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a05620160808153045uod</contentID><contentName>image20160808_153044632.jpg</contentName><contentSuffix>jpg</contentSuffix><contentSize>1603777</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160808153051</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=FJ4e44c2c6268b8cdd454928c254ba749a.jpg&ct=1&type=0&code=081C088734A1D4364D6C9F8CDDAF87F7CBFB06D563C55CFF93020E584E1F78BC&exp=34111&account=MTM3MTgyNjkyMjA=&p=1&ui=1811asktx23a&ci=1811asktx23a05620160808153045uod&cn=image20160808_153044...&oprChannel=APP1ZtqoN3R0002&dom=D916</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=FJ4e44c2c6268b8cdd454928c254ba749a.jpg&ct=1&type=1&code=081C088734A1D4364D6C9F8CDDAF87F7CBFB06D563C55CFF93020E584E1F78BC&exp=34111&account=MTM3MTgyNjkyMjA=&p=1&ui=1811asktx23a&ci=1811asktx23a05620160808153045uod&cn=image20160808_153044...&oprChannel=APP1ZtqoN3R0002&dom=D916</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=FJ4e44c2c6268b8cdd454928c254ba749a.jpg&ct=1&type=2&code=081C088734A1D4364D6C9F8CDDAF87F7CBFB06D563C55CFF93020E584E1F78BC&exp=34111&account=MTM3MTgyNjkyMjA=&p=1&ui=1811asktx23a&ci=1811asktx23a05620160808153045uod&cn=image20160808_153044...&oprChannel=APP1ZtqoN3R0002&dom=D916</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>0</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160808153045</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>923CF2DDF95B42CA093B14B148C4A1C5</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>877539566233709284</fileEtag><encryptFlag>0</encryptFlag><fileVersion>873951377279541464</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>1</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a05620160808153025unc</contentID><contentName>image20160808_153024931.jpg</contentName><contentSuffix>jpg</contentSuffix><contentSize>1401537</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160808153027</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=FI83d1d1ab43810048dbdf683afaf187b8.jpg&ct=1&type=0&code=B2BA22A112CE240620F3CA17AB23D2605A23F297D97696FF7790F05408E84EF1&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05620160808153025unc&cn=image20160808_153024...&oprChannel=APP1ZtqoN3R0002&dom=D916</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=FI83d1d1ab43810048dbdf683afaf187b8.jpg&ct=1&type=1&code=B2BA22A112CE240620F3CA17AB23D2605A23F297D97696FF7790F05408E84EF1&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05620160808153025unc&cn=image20160808_153024...&oprChannel=APP1ZtqoN3R0002&dom=D916</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=FI83d1d1ab43810048dbdf683afaf187b8.jpg&ct=1&type=2&code=B2BA22A112CE240620F3CA17AB23D2605A23F297D97696FF7790F05408E84EF1&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05620160808153025unc&cn=image20160808_153024...&oprChannel=APP1ZtqoN3R0002&dom=D916</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>1</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160808153025</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>6EAC2461B031B0BCD2407243A4278433</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>873951303099082775</fileEtag><encryptFlag>0</encryptFlag><fileVersion>873951293313769540</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a05520160808153021ryv</contentID><contentName>image20160808_153020827.jpg</contentName><contentSuffix>jpg</contentSuffix><contentSize>1388353</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160808153024</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=Fj721a200d9f1a440b5191785beeec755c.jpg&ct=1&type=0&code=18899C8123029346213D632D6AD3082B94803FCC851689F996898D202562F083&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05520160808153021ryv&cn=image20160808_153020...&oprChannel=APP1ZtqoN3R0002&dom=D916</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=Fj721a200d9f1a440b5191785beeec755c.jpg&ct=1&type=1&code=18899C8123029346213D632D6AD3082B94803FCC851689F996898D202562F083&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05520160808153021ryv&cn=image20160808_153020...&oprChannel=APP1ZtqoN3R0002&dom=D916</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=Fj721a200d9f1a440b5191785beeec755c.jpg&ct=1&type=2&code=18899C8123029346213D632D6AD3082B94803FCC851689F996898D202562F083&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05520160808153021ryv&cn=image20160808_153020...&oprChannel=APP1ZtqoN3R0002&dom=D916</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>0</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160808153021</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>F6600B17F8656D9AF0F266A8C22ECD9A</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>873951289878636219</fileEtag><encryptFlag>0</encryptFlag><fileVersion>873951276473638520</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a05520160808153016ryn</contentID><contentName>image20160808_153014545.jpg</contentName><contentSuffix>jpg</contentSuffix><contentSize>1349057</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160808153020</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=FK361a959fd78bb3fc35ca80a13ba845a0.jpg&ct=1&type=0&code=E4F7C2B13EA845161FB87525FCFB4254C01DFB924B8E8657723E42A1660381E8&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05520160808153016ryn&cn=image20160808_153014...&oprChannel=APP1ZtqoN3R0002&dom=D916</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=FK361a959fd78bb3fc35ca80a13ba845a0.jpg&ct=1&type=1&code=E4F7C2B13EA845161FB87525FCFB4254C01DFB924B8E8657723E42A1660381E8&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05520160808153016ryn&cn=image20160808_153014...&oprChannel=APP1ZtqoN3R0002&dom=D916</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=FK361a959fd78bb3fc35ca80a13ba845a0.jpg&ct=1&type=2&code=E4F7C2B13EA845161FB87525FCFB4254C01DFB924B8E8657723E42A1660381E8&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05520160808153016ryn&cn=image20160808_153014...&oprChannel=APP1ZtqoN3R0002&dom=D916</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>0</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160808153016</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>0EEBF680CBE1D931181BC29917998873</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>873951273340496893</fileEtag><encryptFlag>0</encryptFlag><fileVersion>873951256076738148</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a05520160808152556rpx</contentID><contentName>image20160808_152555494.jpg</contentName><contentSuffix>jpg</contentSuffix><contentSize>1048576</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160808152633</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=FX2891f8c605b88848729de23f3f23abbc.jpg&ct=1&type=0&code=FB3DACA72DA49B53E1F7CC7DB54616A109B339C350A6DBCD174B64685EC628A5&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05520160808152556rpx&cn=image20160808_152555...&oprChannel=APP1ZtqoN3R0002&dom=D916</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=FX2891f8c605b88848729de23f3f23abbc.jpg&ct=1&type=1&code=FB3DACA72DA49B53E1F7CC7DB54616A109B339C350A6DBCD174B64685EC628A5&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05520160808152556rpx&cn=image20160808_152555...&oprChannel=APP1ZtqoN3R0002&dom=D916</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=FX2891f8c605b88848729de23f3f23abbc.jpg&ct=1&type=2&code=FB3DACA72DA49B53E1F7CC7DB54616A109B339C350A6DBCD174B64685EC628A5&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05520160808152556rpx&cn=image20160808_152555...&oprChannel=APP1ZtqoN3R0002&dom=D916</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>1</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160808152556</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>81EF5BDE593637AD1C17535C5A0A42DB</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>873950320705002294</fileEtag><encryptFlag>0</encryptFlag><fileVersion>873950164429429830</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a05620160808152527ubk</contentID><contentName>image20160808_152525651.jpg</contentName><contentSuffix>jpg</contentSuffix><contentSize>1847361</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160808152537</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=F80eb470e90dde0989168148782bab13a2.jpg&ct=1&type=0&code=E92A2B7942E3F8F1DB564AF4C3D89E1DC1C2F40024847F1341C9DE0901F464E3&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05620160808152527ubk&cn=image20160808_152525...&oprChannel=APP1ZtqoN3R0002&dom=D916</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=F80eb470e90dde0989168148782bab13a2.jpg&ct=1&type=1&code=E92A2B7942E3F8F1DB564AF4C3D89E1DC1C2F40024847F1341C9DE0901F464E3&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05620160808152527ubk&cn=image20160808_152525...&oprChannel=APP1ZtqoN3R0002&dom=D916</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs35&fileid=F80eb470e90dde0989168148782bab13a2.jpg&ct=1&type=2&code=E92A2B7942E3F8F1DB564AF4C3D89E1DC1C2F40024847F1341C9DE0901F464E3&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05620160808152527ubk&cn=image20160808_152525...&oprChannel=APP1ZtqoN3R0002&dom=D916</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>1</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160808152527</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>B35A4A8638BF6BBF61C5C0FB44D1F8E5</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>873950083412255848</fileEtag><encryptFlag>0</encryptFlag><fileVersion>873950044015157501</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a05420160808115656f8t</contentID><contentName>image20160808_115654856.jpg</contentName><contentSuffix>jpg</contentSuffix><contentSize>1685185</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160808115700</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs15&fileid=Elb26069bce58c15488044e24e04c779b0.jpg&ct=1&type=0&code=E79C8A82B3B4F5020BA67D9F352B01B79894E44EDDA97241EBE5D660E7258083&exp=34111&account=MTM3MTgyNjkyMjA=&p=1&ui=1811asktx23a&ci=1811asktx23a05420160808115656f8t&cn=image20160808_115654...&oprChannel=APP1ZtqoN3R0002&dom=D915</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs15&fileid=Elb26069bce58c15488044e24e04c779b0.jpg&ct=1&type=1&code=E79C8A82B3B4F5020BA67D9F352B01B79894E44EDDA97241EBE5D660E7258083&exp=34111&account=MTM3MTgyNjkyMjA=&p=1&ui=1811asktx23a&ci=1811asktx23a05420160808115656f8t&cn=image20160808_115654...&oprChannel=APP1ZtqoN3R0002&dom=D915</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs15&fileid=Elb26069bce58c15488044e24e04c779b0.jpg&ct=1&type=2&code=E79C8A82B3B4F5020BA67D9F352B01B79894E44EDDA97241EBE5D660E7258083&exp=34111&account=MTM3MTgyNjkyMjA=&p=1&ui=1811asktx23a&ci=1811asktx23a05420160808115656f8t&cn=image20160808_115654...&oprChannel=APP1ZtqoN3R0002&dom=D915</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>1</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160808115656</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>F84C8883B1E9F5DBF3550886CCA32516</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>873897634009832775</fileEtag><encryptFlag>0</encryptFlag><fileVersion>873897569052646241</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>1</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a05720160808115615c3w</contentID><contentName>image20160808_115613739.jpg</contentName><contentSuffix>jpg</contentSuffix><contentSize>1455809</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160808115619</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs15&fileid=Ei1143c64b0cc43d7ddacb506b26222b54.jpg&ct=1&type=0&code=2B577F5BD18B44AF92110C25E582C1EB36C5BC3F33E1E859AF252EA104A27E30&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05720160808115615c3w&cn=image20160808_115613...&oprChannel=APP1ZtqoN3R0002&dom=D915</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs15&fileid=Ei1143c64b0cc43d7ddacb506b26222b54.jpg&ct=1&type=1&code=2B577F5BD18B44AF92110C25E582C1EB36C5BC3F33E1E859AF252EA104A27E30&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05720160808115615c3w&cn=image20160808_115613...&oprChannel=APP1ZtqoN3R0002&dom=D915</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs15&fileid=Ei1143c64b0cc43d7ddacb506b26222b54.jpg&ct=1&type=2&code=2B577F5BD18B44AF92110C25E582C1EB36C5BC3F33E1E859AF252EA104A27E30&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05720160808115615c3w&cn=image20160808_115613...&oprChannel=APP1ZtqoN3R0002&dom=D915</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>1</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160808115615</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>A8F07794F0DD1CE8DACEBAA82A5548DE</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>873897412839989174</fileEtag><encryptFlag>0</encryptFlag><fileVersion>873897397413340563</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a057201608081020062ze</contentID><contentName>image20160808_102004080.jpg</contentName><contentSuffix>jpg</contentSuffix><contentSize>1737409</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160808102121</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs19&fileid=IM6b7c475b8138f7fcbfdc26ff84c1796a.jpg&ct=1&type=0&code=A8C2A507713E7818A7355480857D791A69A43AA55E69FD07BB462B85D9045DC7&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a057201608081020062ze&cn=image20160808_102004...&oprChannel=APP1ZtqoN3R0002&dom=D919</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs19&fileid=IM6b7c475b8138f7fcbfdc26ff84c1796a.jpg&ct=1&type=1&code=A8C2A507713E7818A7355480857D791A69A43AA55E69FD07BB462B85D9045DC7&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a057201608081020062ze&cn=image20160808_102004...&oprChannel=APP1ZtqoN3R0002&dom=D919</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs19&fileid=IM6b7c475b8138f7fcbfdc26ff84c1796a.jpg&ct=1&type=2&code=A8C2A507713E7818A7355480857D791A69A43AA55E69FD07BB462B85D9045DC7&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a057201608081020062ze&cn=image20160808_102004...&oprChannel=APP1ZtqoN3R0002&dom=D919</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>1</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160808102006</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>212166608303487B64E918357E3AB6D0</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>873873513607716887</fileEtag><encryptFlag>0</encryptFlag><fileVersion>873873198674207768</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a057201608081018202v8</contentID><contentName>image20160808_101818975.jpg</contentName><contentSuffix>jpg</contentSuffix><contentSize>1561537</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160808101839</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs19&fileid=IKe206ed7b078c666a3af0708e7618f15f.jpg&ct=1&type=0&code=3FB9D16023AFCAEA2BFE561F49349603112252926A6F24576386A5C5B7F69C31&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a057201608081018202v8&cn=image20160808_101818...&oprChannel=APP1ZtqoN3R0002&dom=D919</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs19&fileid=IKe206ed7b078c666a3af0708e7618f15f.jpg&ct=1&type=1&code=3FB9D16023AFCAEA2BFE561F49349603112252926A6F24576386A5C5B7F69C31&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a057201608081018202v8&cn=image20160808_101818...&oprChannel=APP1ZtqoN3R0002&dom=D919</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs19&fileid=IKe206ed7b078c666a3af0708e7618f15f.jpg&ct=1&type=2&code=3FB9D16023AFCAEA2BFE561F49349603112252926A6F24576386A5C5B7F69C31&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a057201608081018202v8&cn=image20160808_101818...&oprChannel=APP1ZtqoN3R0002&dom=D919</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>1</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160808101820</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>F6B5B05BB45A1F8D95F3B015CACDA28E</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>873872834025610019</fileEtag><encryptFlag>0</encryptFlag><fileVersion>873872756472931751</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a058201608081006133lb</contentID><contentName>image20160808_100611956.jpg</contentName><contentSuffix>jpg</contentSuffix><contentSize>1113921</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160808100617</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs19&fileid=I737396e3d58ae0e76dce1422b4bb91ad6.jpg&ct=1&type=0&code=8A943B92B79A37D4282A5BEE116E6155EB6A0D86D918F73044AD6BAB69C54CDB&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a058201608081006133lb&cn=image20160808_100611...&oprChannel=APP1ZtqoN3R0002&dom=D919</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs19&fileid=I737396e3d58ae0e76dce1422b4bb91ad6.jpg&ct=1&type=1&code=8A943B92B79A37D4282A5BEE116E6155EB6A0D86D918F73044AD6BAB69C54CDB&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a058201608081006133lb&cn=image20160808_100611...&oprChannel=APP1ZtqoN3R0002&dom=D919</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs19&fileid=I737396e3d58ae0e76dce1422b4bb91ad6.jpg&ct=1&type=2&code=8A943B92B79A37D4282A5BEE116E6155EB6A0D86D918F73044AD6BAB69C54CDB&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a058201608081006133lb&cn=image20160808_100611...&oprChannel=APP1ZtqoN3R0002&dom=D919</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>1</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160808100613</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>CF3554BA6FB4B171B351FAA66E85361E</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>873869723705925749</fileEtag><encryptFlag>0</encryptFlag><fileVersion>873869706253428865</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a057201608080948440ye</contentID><contentName>image20160808_094842866.jpg</contentName><contentSuffix>jpg</contentSuffix><contentSize>1149889</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160808094900</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs17&fileid=G7e446b92e19120cdaa770ab01a4065f59.jpg&ct=1&type=0&code=403A50A60E7B59097DA06A1A964D8A19BF43EAC24A082EAB7580D5B0AAE8850B&exp=34111&account=MTM3MTgyNjkyMjA=&p=1&ui=1811asktx23a&ci=1811asktx23a057201608080948440ye&cn=image20160808_094842...&oprChannel=APP1ZtqoN3R0002&dom=D917</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs17&fileid=G7e446b92e19120cdaa770ab01a4065f59.jpg&ct=1&type=1&code=403A50A60E7B59097DA06A1A964D8A19BF43EAC24A082EAB7580D5B0AAE8850B&exp=34111&account=MTM3MTgyNjkyMjA=&p=1&ui=1811asktx23a&ci=1811asktx23a057201608080948440ye&cn=image20160808_094842...&oprChannel=APP1ZtqoN3R0002&dom=D917</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs17&fileid=G7e446b92e19120cdaa770ab01a4065f59.jpg&ct=1&type=2&code=403A50A60E7B59097DA06A1A964D8A19BF43EAC24A082EAB7580D5B0AAE8850B&exp=34111&account=MTM3MTgyNjkyMjA=&p=1&ui=1811asktx23a&ci=1811asktx23a057201608080948440ye&cn=image20160808_094842...&oprChannel=APP1ZtqoN3R0002&dom=D917</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>1</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160808094844</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>B6430836E655A78BCD896A031A7AB885</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>873865491833542753</fileEtag><encryptFlag>0</encryptFlag><fileVersion>873865306357229097</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>1</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a05520160718170034xh1</contentID><contentName>animal.png</contentName><contentSuffix>png</contentSuffix><contentSize>468839</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160718170048</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs14&fileid=Df4b1df344e4a4c8722f3c0f9f4b065fc3.png&ct=1&type=0&code=C663F8F11D9129522A6D40465624A6FBD215C97F5A6D3BA524BAED2EB05EFB26&exp=34111&account=MTM3MTgyNjkyMjA=&p=1&ui=1811asktx23a&ci=1811asktx23a05520160718170034xh1&cn=animal&oprChannel=APP1ZtqoN3R0002&dom=D914</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs14&fileid=Df4b1df344e4a4c8722f3c0f9f4b065fc3.png&ct=1&type=1&code=C663F8F11D9129522A6D40465624A6FBD215C97F5A6D3BA524BAED2EB05EFB26&exp=34111&account=MTM3MTgyNjkyMjA=&p=1&ui=1811asktx23a&ci=1811asktx23a05520160718170034xh1&cn=animal&oprChannel=APP1ZtqoN3R0002&dom=D914</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs14&fileid=Df4b1df344e4a4c8722f3c0f9f4b065fc3.png&ct=1&type=2&code=C663F8F11D9129522A6D40465624A6FBD215C97F5A6D3BA524BAED2EB05EFB26&exp=34111&account=MTM3MTgyNjkyMjA=&p=1&ui=1811asktx23a&ci=1811asktx23a05520160718170034xh1&cn=animal&oprChannel=APP1ZtqoN3R0002&dom=D914</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>0</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160718170034</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>583B7EFBA3E766EF9B52E7C2929D9308</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>867062051081937884</fileEtag><encryptFlag>0</encryptFlag><fileVersion>866363835197808497</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>1</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a05820160705201213e8r</contentID><contentName>mcloud5.png</contentName><contentSuffix>png</contentSuffix><contentSize>16157</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160705222532</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs23&fileid=C8bcb3bf84d0a682003fe4326fca727fdb.png&ct=1&type=0&code=E046516A498A3BFF895C455F231CBC9CAD0271AF88BF317748B3E6DBA26AF495&exp=34111&account=MTM3MTgyNjkyMjA=&p=1&ui=1811asktx23a&ci=1811asktx23a05820160705201213e8r&cn=mcloud5&oprChannel=APP1ZtqoN3R0002&dom=D913</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs23&fileid=C8bcb3bf84d0a682003fe4326fca727fdb.png&ct=1&type=1&code=E046516A498A3BFF895C455F231CBC9CAD0271AF88BF317748B3E6DBA26AF495&exp=34111&account=MTM3MTgyNjkyMjA=&p=1&ui=1811asktx23a&ci=1811asktx23a05820160705201213e8r&cn=mcloud5&oprChannel=APP1ZtqoN3R0002&dom=D913</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs23&fileid=C8bcb3bf84d0a682003fe4326fca727fdb.png&ct=1&type=2&code=E046516A498A3BFF895C455F231CBC9CAD0271AF88BF317748B3E6DBA26AF495&exp=34111&account=MTM3MTgyNjkyMjA=&p=1&ui=1811asktx23a&ci=1811asktx23a05820160705201213e8r&cn=mcloud5&oprChannel=APP1ZtqoN3R0002&dom=D913</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>1</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160705201213</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>8DAF4C77BBC1DD8E5A14DFE9FBB74EF7</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>874210104222017628</fileEtag><encryptFlag>0</encryptFlag><fileVersion>861701021568985974</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>1</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a058201606161116501cv</contentID><contentName>video20160616_111646382.mp4</contentName><contentSuffix>mp4</contentSuffix><contentSize>1456529</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>3</contentType><contentOrigin>1</contentOrigin><updateTime>20160616111652</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs25&fileid=E8a441f9931811e48ad1aca3704eff8a6a.mp4&ct=3&type=0&code=03AA3CA3B002E958DCD3BE73AD61372AF7F7BD17208478CB2AB2AAB8D2CBA02E&exp=34111&account=MTM3MTgyNjkyMjA=&p=1&ui=1811asktx23a&ci=1811asktx23a058201606161116501cv&cn=video20160616_111646...&oprChannel=APP1ZtqoN3R0002&dom=D915</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs25&fileid=E8a441f9931811e48ad1aca3704eff8a6a.mp4&ct=3&type=1&code=03AA3CA3B002E958DCD3BE73AD61372AF7F7BD17208478CB2AB2AAB8D2CBA02E&exp=34111&account=MTM3MTgyNjkyMjA=&p=1&ui=1811asktx23a&ci=1811asktx23a058201606161116501cv&cn=video20160616_111646...&oprChannel=APP1ZtqoN3R0002&dom=D915</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>http://media.caiyun.feixin.10086.cn:80/StorageWeb/servlet/GetFileByURLServlet?dm=D915&root=/mnt/wfs25&pt=/a44/1f&fileid=E8a441f9931811e48ad1aca3704eff8a6a.mp4&type=5&ui=13718269220&ci=1811asktx23a058201606161116501cv&cn=video20160616_111646...&ct=3&time=1473583981&exp=34111&code=E74D9370E08902774DFD8F37EF514E89C9C44214DF4318235D11D68508D70443&ec=0</presentURL><presentLURL>http://media.caiyun.feixin.10086.cn:80/StorageWeb/servlet/GetFileByURLServlet?dm=D915&root=/mnt/wfs25&pt=/a44/1f&fileid=E8a441f9931811e48ad1aca3704eff8a6a.mp4&type=51&ui=13718269220&ci=1811asktx23a058201606161116501cv&cn=video20160616_111646...&ct=3&time=1473583981&exp=34111&code=88B243A134727C34B99B228CA0756465CC544FEB1D7D38F458F3AA3721ED9B20&ec=0</presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>1</safestate><transferstate>3</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160616111650</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>B730E4AFC4B694A578D74EEDE516FD36</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>880789726938127876</fileEtag><encryptFlag>0</encryptFlag><fileVersion>854680921494121360</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>1</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a058201606161116361c3</contentID><contentName>image20160616_111635651.jpg</contentName><contentSuffix>jpg</contentSuffix><contentSize>1558721</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160616111638</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs15&fileid=EY2a047743edf94872a524fc6fc92faac5.jpg&ct=1&type=0&code=7BE33DA1DE97C4AF530FCAC006318CAD138B02FE026FA086E03F5E47C9C1AAF5&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a058201606161116361c3&cn=image20160616_111635...&oprChannel=APP1ZtqoN3R0002&dom=D915</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs15&fileid=EY2a047743edf94872a524fc6fc92faac5.jpg&ct=1&type=1&code=7BE33DA1DE97C4AF530FCAC006318CAD138B02FE026FA086E03F5E47C9C1AAF5&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a058201606161116361c3&cn=image20160616_111635...&oprChannel=APP1ZtqoN3R0002&dom=D915</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs15&fileid=EY2a047743edf94872a524fc6fc92faac5.jpg&ct=1&type=2&code=7BE33DA1DE97C4AF530FCAC006318CAD138B02FE026FA086E03F5E47C9C1AAF5&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a058201606161116361c3&cn=image20160616_111635...&oprChannel=APP1ZtqoN3R0002&dom=D915</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>1</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160616111636</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>85C203BC1EA9A2249AFD92B75355E782</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>854680869220505775</fileEtag><encryptFlag>0</encryptFlag><fileVersion>854680860513135373</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a05420160613111333j37</contentID><contentName>video20160613_111328528.mp4</contentName><contentSuffix>mp4</contentSuffix><contentSize>1953811</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>3</contentType><contentOrigin>1</contentOrigin><updateTime>20160613111337</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs34&fileid=ECf6a340ef7c52142a7149ad41a66a13eb.mp4&ct=3&type=0&code=4B46816E57917199DE5BAE035A5661B30DE986C29D01A942C35E39330AAC272A&exp=34111&account=MTM3MTgyNjkyMjA=&p=1&ui=1811asktx23a&ci=1811asktx23a05420160613111333j37&cn=video20160613_111328...&oprChannel=APP1ZtqoN3R0002&dom=D915</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs34&fileid=ECf6a340ef7c52142a7149ad41a66a13eb.mp4&ct=3&type=1&code=4B46816E57917199DE5BAE035A5661B30DE986C29D01A942C35E39330AAC272A&exp=34111&account=MTM3MTgyNjkyMjA=&p=1&ui=1811asktx23a&ci=1811asktx23a05420160613111333j37&cn=video20160613_111328...&oprChannel=APP1ZtqoN3R0002&dom=D915</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>http://media.caiyun.feixin.10086.cn:80/StorageWeb/servlet/GetFileByURLServlet?dm=D915&root=/mnt/wfs34&pt=/f6a/34&fileid=ECf6a340ef7c52142a7149ad41a66a13eb.mp4&type=5&ui=13718269220&ci=1811asktx23a05420160613111333j37&cn=video20160613_111328...&ct=3&time=1473583981&exp=34111&code=ADD671C40F93249A2648213BFE515086BE703A8B0470C04BFC0D5519E2ADEDF2&ec=0</presentURL><presentLURL>http://media.caiyun.feixin.10086.cn:80/StorageWeb/servlet/GetFileByURLServlet?dm=D915&root=/mnt/wfs34&pt=/f6a/34&fileid=ECf6a340ef7c52142a7149ad41a66a13eb.mp4&type=51&ui=13718269220&ci=1811asktx23a05420160613111333j37&cn=video20160613_111328...&ct=3&time=1473583981&exp=34111&code=1FBE00E0A30816B95C5125FC6872833A10CD2CFD1013553C4F83C7F1E4F106AF&ec=0</presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>1</safestate><transferstate>3</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160613111333</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>26FEF03A59DF0019F3FAB3DCB66AC434</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>880789752439497215</fileEtag><encryptFlag>0</encryptFlag><fileVersion>853592929597774536</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>1</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a05420160613103345gmp</contentID><contentName>video20160613_103339428.mp4</contentName><contentSuffix>mp4</contentSuffix><contentSize>1889709</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>3</contentType><contentOrigin>1</contentOrigin><updateTime>20160613103425</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs34&fileid=E0f11433bc89d613a6609e6cb710eb73a6.mp4&ct=3&type=0&code=B5786806A9E2052C5C0239EF80886A2F2961B4911B12A2AFAB342C99F71305D2&exp=34111&account=MTM3MTgyNjkyMjA=&p=1&ui=1811asktx23a&ci=1811asktx23a05420160613103345gmp&cn=video20160613_103339...&oprChannel=APP1ZtqoN3R0002&dom=D915</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs34&fileid=E0f11433bc89d613a6609e6cb710eb73a6.mp4&ct=3&type=1&code=B5786806A9E2052C5C0239EF80886A2F2961B4911B12A2AFAB342C99F71305D2&exp=34111&account=MTM3MTgyNjkyMjA=&p=1&ui=1811asktx23a&ci=1811asktx23a05420160613103345gmp&cn=video20160613_103339...&oprChannel=APP1ZtqoN3R0002&dom=D915</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>http://media.caiyun.feixin.10086.cn:80/StorageWeb/servlet/GetFileByURLServlet?dm=D915&root=/mnt/wfs34&pt=/f11/43&fileid=E0f11433bc89d613a6609e6cb710eb73a6.mp4&type=5&ui=13718269220&ci=1811asktx23a05420160613103345gmp&cn=video20160613_103339...&ct=3&time=1473583981&exp=34111&code=C1BC90873B8C9CBDDAC6EB4E054F7EB6BFAD424A9EADE94C21B7326E4BF77587&ec=0</presentURL><presentLURL>http://media.caiyun.feixin.10086.cn:80/StorageWeb/servlet/GetFileByURLServlet?dm=D915&root=/mnt/wfs34&pt=/f11/43&fileid=E0f11433bc89d613a6609e6cb710eb73a6.mp4&type=51&ui=13718269220&ci=1811asktx23a05420160613103345gmp&cn=video20160613_103339...&ct=3&time=1473583981&exp=34111&code=C139631F89D4C93EF23A2FDD97A50D29A68DA7FDC89FED218DD0C5306130F2D2&ec=0</presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>1</safestate><transferstate>3</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160613103345</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>1B10599108C8CBD7CF1BD0FB43CA4519</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>853593091955090454</fileEtag><encryptFlag>0</encryptFlag><fileVersion>853582912689658291</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>1</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a05620160613103319erg</contentID><contentName>image20160613_103315294.jpg</contentName><contentSuffix>jpg</contentSuffix><contentSize>1585857</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160613103347</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs34&fileid=EF932115d86c2b96ee8755a6f68a9508f9.jpg&ct=1&type=0&code=E3BDCE8A1F06927206F64BCA10F6A990EC6E4F614E249F1453CE6F14E35D0F44&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05620160613103319erg&cn=image20160613_103315...&oprChannel=APP1ZtqoN3R0002&dom=D915</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs34&fileid=EF932115d86c2b96ee8755a6f68a9508f9.jpg&ct=1&type=1&code=E3BDCE8A1F06927206F64BCA10F6A990EC6E4F614E249F1453CE6F14E35D0F44&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05620160613103319erg&cn=image20160613_103315...&oprChannel=APP1ZtqoN3R0002&dom=D915</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs34&fileid=EF932115d86c2b96ee8755a6f68a9508f9.jpg&ct=1&type=2&code=E3BDCE8A1F06927206F64BCA10F6A990EC6E4F614E249F1453CE6F14E35D0F44&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05620160613103319erg&cn=image20160613_103315...&oprChannel=APP1ZtqoN3R0002&dom=D915</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>1</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160613103319</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>1B9E87604E3B2F60E6C8299ABA1EDF92</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>853582923431270857</fileEtag><encryptFlag>0</encryptFlag><fileVersion>853582803272852364</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a05420160612142933pfs</contentID><contentName>image20160612_142936817.jpg</contentName><contentSuffix>jpg</contentSuffix><contentSize>2410433</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160612142937</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs34&fileid=Ekf5b951d02a1bb3df3c1aadff32977d3b.jpg&ct=1&type=0&code=676D92A26D751290ACAD6B106F2EEFAB374ED49F3A979302BAA256F4381C6444&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05420160612142933pfs&cn=image20160612_142936...&oprChannel=APP1ZtqoN3R0002&dom=D915</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs34&fileid=Ekf5b951d02a1bb3df3c1aadff32977d3b.jpg&ct=1&type=1&code=676D92A26D751290ACAD6B106F2EEFAB374ED49F3A979302BAA256F4381C6444&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05420160612142933pfs&cn=image20160612_142936...&oprChannel=APP1ZtqoN3R0002&dom=D915</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs34&fileid=Ekf5b951d02a1bb3df3c1aadff32977d3b.jpg&ct=1&type=2&code=676D92A26D751290ACAD6B106F2EEFAB374ED49F3A979302BAA256F4381C6444&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05420160612142933pfs&cn=image20160612_142936...&oprChannel=APP1ZtqoN3R0002&dom=D915</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>1</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160612142933</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>2B384328B7696BB42604B33A52FC1D95</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>853279885856467083</fileEtag><encryptFlag>0</encryptFlag><fileVersion>853279867703515723</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a05720160612142912kzz</contentID><contentName>image20160612_142914786.jpg</contentName><contentSuffix>jpg</contentSuffix><contentSize>2421057</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160612142915</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs34&fileid=EYe7406f163bad27f983dd48c11cd90123.jpg&ct=1&type=0&code=D103FDD33F91CDD74CE315B8CA37E68D1E7BB7E8D276052E69D6AD7814A8B983&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05720160612142912kzz&cn=image20160612_142914...&oprChannel=APP1ZtqoN3R0002&dom=D915</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs34&fileid=EYe7406f163bad27f983dd48c11cd90123.jpg&ct=1&type=1&code=D103FDD33F91CDD74CE315B8CA37E68D1E7BB7E8D276052E69D6AD7814A8B983&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05720160612142912kzz&cn=image20160612_142914...&oprChannel=APP1ZtqoN3R0002&dom=D915</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs34&fileid=EYe7406f163bad27f983dd48c11cd90123.jpg&ct=1&type=2&code=D103FDD33F91CDD74CE315B8CA37E68D1E7BB7E8D276052E69D6AD7814A8B983&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05720160612142912kzz&cn=image20160612_142914...&oprChannel=APP1ZtqoN3R0002&dom=D915</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>1</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160612142912</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>8AE777F4475FD768B3C257B3F0D71818</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>853279791140692523</fileEtag><encryptFlag>0</encryptFlag><fileVersion>853279780629767678</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a05620160607111020cdd</contentID><contentName>image20160607_111019308.jpg</contentName><contentSuffix>jpg</contentSuffix><contentSize>2479297</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160607111031</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs19&fileid=ID2f0c5e875910388c64edf16cb0c32cae.jpg&ct=1&type=0&code=50BC23CEE943B2B4AFB005D0BF8440A56CEE20786E1561AB3681BD0931B0F4E5&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05620160607111020cdd&cn=image20160607_111019...&oprChannel=APP1ZtqoN3R0002&dom=D919</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs19&fileid=ID2f0c5e875910388c64edf16cb0c32cae.jpg&ct=1&type=1&code=50BC23CEE943B2B4AFB005D0BF8440A56CEE20786E1561AB3681BD0931B0F4E5&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05620160607111020cdd&cn=image20160607_111019...&oprChannel=APP1ZtqoN3R0002&dom=D919</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs19&fileid=ID2f0c5e875910388c64edf16cb0c32cae.jpg&ct=1&type=2&code=50BC23CEE943B2B4AFB005D0BF8440A56CEE20786E1561AB3681BD0931B0F4E5&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05620160607111020cdd&cn=image20160607_111019...&oprChannel=APP1ZtqoN3R0002&dom=D919</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>1</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160607111020</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>8C057D4A9F294530946EB501B335EB00</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>851417841628736005</fileEtag><encryptFlag>0</encryptFlag><fileVersion>851417793708810269</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a05420160607110312eaz</contentID><contentName>image20160607_110310931.jpg</contentName><contentSuffix>jpg</contentSuffix><contentSize>2254401</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160607110340</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs19&fileid=IDffdc46f7e6f970c0341df871716a17f4.jpg&ct=1&type=0&code=20142D18AC1472474AEFF9FCA7F731E29A6CA2899AE51D9DE850F358C8F64FFE&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05420160607110312eaz&cn=image20160607_110310...&oprChannel=APP1ZtqoN3R0002&dom=D919</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs19&fileid=IDffdc46f7e6f970c0341df871716a17f4.jpg&ct=1&type=1&code=20142D18AC1472474AEFF9FCA7F731E29A6CA2899AE51D9DE850F358C8F64FFE&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05420160607110312eaz&cn=image20160607_110310...&oprChannel=APP1ZtqoN3R0002&dom=D919</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs19&fileid=IDffdc46f7e6f970c0341df871716a17f4.jpg&ct=1&type=2&code=20142D18AC1472474AEFF9FCA7F731E29A6CA2899AE51D9DE850F358C8F64FFE&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a05420160607110312eaz&cn=image20160607_110310...&oprChannel=APP1ZtqoN3R0002&dom=D919</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>1</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160607110312</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>7E49D35AEF93E930D793D7F383D989F8</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>851416114326265871</fileEtag><encryptFlag>0</encryptFlag><fileVersion>851415996806060983</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType><exif><createTime></createTime></exif></contentInfo><contentInfo><contentID>1811asktx23a058201606071031288jk</contentID><contentName>image20160607_103127278.jpg</contentName><contentSuffix>jpg</contentSuffix><contentSize>1803585</contentSize><contentDesc></contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160607103144</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs22&fileid=BN6d712b13ddedde0a810fa940f7fb6d59.jpg&ct=1&type=0&code=8D7C693F7CEE09547706415C5343D5243B1079D5E5CEB837B5C2E3236307B7AE&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a058201606071031288jk&cn=image20160607_103127...&oprChannel=APP1ZtqoN3R0002&dom=D981</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs22&fileid=BN6d712b13ddedde0a810fa940f7fb6d59.jpg&ct=1&type=1&code=8D7C693F7CEE09547706415C5343D5243B1079D5E5CEB837B5C2E3236307B7AE&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a058201606071031288jk&cn=image20160607_103127...&oprChannel=APP1ZtqoN3R0002&dom=D981</bigthumbnailURL><midthumbnailURL></midthumbnailURL><presentURL>https://download1.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?root=/mnt/wfs22&fileid=BN6d712b13ddedde0a810fa940f7fb6d59.jpg&ct=1&type=2&code=8D7C693F7CEE09547706415C5343D5243B1079D5E5CEB837B5C2E3236307B7AE&exp=34111&account=MTM3MTgyNjkyMjA=&p=0&ui=1811asktx23a&ci=1811asktx23a058201606071031288jk&cn=image20160607_103127...&oprChannel=APP1ZtqoN3R0002&dom=D981</presentURL><presentLURL></presentLURL><presentHURL></presentHURL><shareDoneeCount>0</shareDoneeCount><safestate>1</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160607103128</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>993ACF206B8C7439B60F0AA4D4484227</digest><geoLocFlag>0</geoLocFlag><version></version><fileEtag>851408079415533353</fileEtag><encryptFlag>0</encryptFlag><fileVersion>851408011140655376</fileVersion><tombstoned>0</tombstoned><proxyID></proxyID><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>0</shareType><exif><createTime></createTime></exif></contentInfo></contentList><isCompleted>0</isCompleted></getDiskResult></result> |
4573 | |
4574 | === added file 'tests/server/resources/1811asktx23a00019700101000000001.single.xml' |
4575 | --- tests/server/resources/1811asktx23a00019700101000000001.single.xml 1970-01-01 00:00:00 +0000 |
4576 | +++ tests/server/resources/1811asktx23a00019700101000000001.single.xml 2016-12-07 12:44:11 +0000 |
4577 | @@ -0,0 +1,1 @@ |
4578 | +<?xml version="1.0" encoding="UTF-8"?><result resultCode="0"><getDiskResult><parentCatalogID>root</parentCatalogID><nodeCount>118</nodeCount><catalogList length="1"><catalogInfo><catalogName>手机图片</catalogName><catalogID>1811asktx23a00019700101000000043</catalogID><catalogType>7</catalogType><isShared>false</isShared><createTime>20160420134258</createTime><updateTime>20160420134258</updateTime><catalogLevel>2</catalogLevel><shareDoneeCount>0</shareDoneeCount><ETagOprType>1</ETagOprType><openType>0</openType><dirEtag>4194304</dirEtag><tombstoned>0</tombstoned><moved>0</moved><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><isFixedDir>1</isFixedDir><path>00019700101000000001/1811asktx23a00019700101000000043</path><owner>13718269220</owner><shareType>0</shareType></catalogInfo></catalogList><isCompleted>0</isCompleted></getDiskResult></result> |
4579 | |
4580 | === modified file 'tests/server/resources/1811asktx23a00019700101000000001_index_101.xml' |
4581 | --- tests/server/resources/1811asktx23a00019700101000000001_index_101.xml 2016-09-13 06:55:27 +0000 |
4582 | +++ tests/server/resources/1811asktx23a00019700101000000001_index_101.xml 2016-12-07 12:44:11 +0000 |
4583 | @@ -2,7 +2,99 @@ |
4584 | <getDiskResult> |
4585 | <parentCatalogID>root</parentCatalogID> |
4586 | <nodeCount>118</nodeCount> |
4587 | -<contentList length="0"></contentList> |
4588 | +<contentList length="0"> |
4589 | +<contentInfo> |
4590 | +<contentID>1811asktx23a05420160607110312egd</contentID> |
4591 | +<contentName>image20160607_110310931.jpg</contentName> |
4592 | +<contentSuffix>jpg</contentSuffix> |
4593 | +<contentSize>2254401</contentSize> |
4594 | +<contentDesc/> |
4595 | +<isShared>false</isShared> |
4596 | +<contentType>1</contentType> |
4597 | +<contentOrigin>1</contentOrigin> |
4598 | +<updateTime>20160607110340</updateTime> |
4599 | +<commentCount>0</commentCount> |
4600 | +<thumbnailURL></thumbnailURL> |
4601 | +<bigthumbnailURL> |
4602 | +</bigthumbnailURL> |
4603 | +<midthumbnailURL/> |
4604 | +<presentURL> |
4605 | +</presentURL> |
4606 | +<presentLURL/> |
4607 | +<presentHURL/> |
4608 | +<shareDoneeCount>0</shareDoneeCount> |
4609 | +<safestate>1</safestate> |
4610 | +<transferstate>0</transferstate> |
4611 | +<isFocusContent>0</isFocusContent> |
4612 | +<uploadTime>20160607110312</uploadTime> |
4613 | +<ETagOprType>0</ETagOprType> |
4614 | +<openType>0</openType> |
4615 | +<auditResult>0</auditResult> |
4616 | +<parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId> |
4617 | +<channel>APP1ZtqoN3R0002</channel> |
4618 | +<digest>7E49D35AEF93E930D793D7F383D989F8</digest> |
4619 | +<geoLocFlag>0</geoLocFlag> |
4620 | +<version/> |
4621 | +<fileEtag>851416114326265871</fileEtag> |
4622 | +<encryptFlag>0</encryptFlag> |
4623 | +<fileVersion>851415996806060983</fileVersion> |
4624 | +<tombstoned>0</tombstoned> |
4625 | +<proxyID/> |
4626 | +<moved>0</moved> |
4627 | +<owner>13718269220</owner> |
4628 | +<modifier>13718269220</modifier> |
4629 | +<shareType>0</shareType> |
4630 | +<exif> |
4631 | +<createTime/> |
4632 | +</exif> |
4633 | +</contentInfo> |
4634 | +<contentInfo> |
4635 | +<contentID>1811asktx23a0582016060710312834k</contentID> |
4636 | +<contentName>image20160607_103127278.jpg</contentName> |
4637 | +<contentSuffix>jpg</contentSuffix> |
4638 | +<contentSize>1803585</contentSize> |
4639 | +<contentDesc/> |
4640 | +<isShared>false</isShared> |
4641 | +<contentType>1</contentType> |
4642 | +<contentOrigin>1</contentOrigin> |
4643 | +<updateTime>20160607103144</updateTime> |
4644 | +<commentCount>0</commentCount> |
4645 | +<thumbnailURL> |
4646 | +</thumbnailURL> |
4647 | +<bigthumbnailURL> |
4648 | +</bigthumbnailURL> |
4649 | +<midthumbnailURL/> |
4650 | +<presentURL> |
4651 | +</presentURL> |
4652 | +<presentLURL/> |
4653 | +<presentHURL/> |
4654 | +<shareDoneeCount>0</shareDoneeCount> |
4655 | +<safestate>1</safestate> |
4656 | +<transferstate>0</transferstate> |
4657 | +<isFocusContent>0</isFocusContent> |
4658 | +<uploadTime>20160607103128</uploadTime> |
4659 | +<ETagOprType>0</ETagOprType> |
4660 | +<openType>0</openType> |
4661 | +<auditResult>0</auditResult> |
4662 | +<parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId> |
4663 | +<channel>APP1ZtqoN3R0002</channel> |
4664 | +<digest>993ACF206B8C7439B60F0AA4D4484227</digest> |
4665 | +<geoLocFlag>0</geoLocFlag> |
4666 | +<version/> |
4667 | +<fileEtag>851408079415533353</fileEtag> |
4668 | +<encryptFlag>0</encryptFlag> |
4669 | +<fileVersion>851408011140655376</fileVersion> |
4670 | +<tombstoned>0</tombstoned> |
4671 | +<proxyID/> |
4672 | +<moved>0</moved> |
4673 | +<owner>13718269220</owner> |
4674 | +<modifier>13718269220</modifier> |
4675 | +<shareType>0</shareType> |
4676 | +<exif> |
4677 | +<createTime/> |
4678 | +</exif> |
4679 | +</contentInfo> |
4680 | +</contentList> |
4681 | <isCompleted>0</isCompleted> |
4682 | </getDiskResult> |
4683 | </result> |
4684 | |
4685 | === added file 'tests/server/resources/1811asktx23a057201605161542175lg.xml' |
4686 | --- tests/server/resources/1811asktx23a057201605161542175lg.xml 1970-01-01 00:00:00 +0000 |
4687 | +++ tests/server/resources/1811asktx23a057201605161542175lg.xml 2016-12-07 12:44:11 +0000 |
4688 | @@ -0,0 +1,1 @@ |
4689 | +<?xml version="1.0" encoding="UTF-8"?><result resultCode="9424" desc="[212|saes_CYCommon|673F558E07604214B59ACF5579CB4514] lacked sufficient storage space. [1811asktx23a057201605161542175lg] invalid[NDA(100071)][Flag:673F558E07604214B59ACF5579CB4514]"></result> |
4690 | |
4691 | === added file 'tests/server/resources/1811asktx23a058201609111803007pu.xml' |
4692 | --- tests/server/resources/1811asktx23a058201609111803007pu.xml 1970-01-01 00:00:00 +0000 |
4693 | +++ tests/server/resources/1811asktx23a058201609111803007pu.xml 2016-12-07 12:44:11 +0000 |
4694 | @@ -0,0 +1,1 @@ |
4695 | +<?xml version="1.0" encoding="UTF-8"?><result resultCode="9102" desc="[212|saes_CYCommon|673F558E07604214B59ACF5579CB4514]Failed to invoke the service.catalogID/contentID[1811asktx23a058201609111803007pu] invalid[NDA(100071)][Flag:673F558E07604214B59ACF5579CB4514]"></result> |
4696 | |
4697 | === modified file 'tests/server/resources/content_1811asktx23a05520160718170034xh1.xml' |
4698 | --- tests/server/resources/content_1811asktx23a05520160718170034xh1.xml 2016-09-13 06:55:27 +0000 |
4699 | +++ tests/server/resources/content_1811asktx23a05520160718170034xh1.xml 2016-12-07 12:44:11 +0000 |
4700 | @@ -1,1 +1,1 @@ |
4701 | -<?xml version="1.0" encoding="UTF-8"?><result resultCode="0"><contentInfo><contentID>1811asktx23a05520160718170034xh1</contentID><contentName>animal.png</contentName><contentSuffix>png</contentSuffix><contentSize>468839</contentSize><contentDesc/><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160718170048</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?1.png</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?1.png</bigthumbnailURL><midthumbnailURL/><presentURL>4</presentURL><presentLURL/><presentHURL/><shareDoneeCount>0</shareDoneeCount><safestate>0</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160718170034</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>583B7EFBA3E766EF9B52E7C2929D9308</digest><geoLocFlag>0</geoLocFlag><version/><fileEtag>867062051081937884</fileEtag><encryptFlag>0</encryptFlag><fileVersion>866363835197808497</fileVersion><tombstoned>0</tombstoned><proxyID/><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>1</shareType><exif><createTime/></exif></contentInfo></result> |
4702 | +<?xml version="1.0" encoding="UTF-8"?><result resultCode="0"><contentInfo><contentID>1811asktx23a05520160718170034xh1</contentID><contentName>animal.png</contentName><contentSuffix>png</contentSuffix><contentSize>468839</contentSize><contentDesc>Please don't remove it</contentDesc><isShared>false</isShared><contentType>1</contentType><contentOrigin>1</contentOrigin><updateTime>20160718170048</updateTime><commentCount>0</commentCount><thumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?1.png</thumbnailURL><bigthumbnailURL>https://download.caiyun.feixin.10086.cn:443/storageWeb/servlet/GetFileByURLServlet?1.png</bigthumbnailURL><midthumbnailURL/><presentURL>4</presentURL><presentLURL/><presentHURL/><shareDoneeCount>0</shareDoneeCount><safestate>0</safestate><transferstate>0</transferstate><isFocusContent>0</isFocusContent><uploadTime>20160718170034</uploadTime><ETagOprType>0</ETagOprType><openType>0</openType><auditResult>0</auditResult><parentCatalogId>1811asktx23a00019700101000000001</parentCatalogId><channel>APP1ZtqoN3R0002</channel><digest>583B7EFBA3E766EF9B52E7C2929D9308</digest><geoLocFlag>0</geoLocFlag><version/><fileEtag>867062051081937884</fileEtag><encryptFlag>0</encryptFlag><fileVersion>866363835197808497</fileVersion><tombstoned>0</tombstoned><proxyID/><moved>0</moved><owner>13718269220</owner><modifier>13718269220</modifier><shareType>1</shareType><exif><createTime/></exif></contentInfo></result> |
4703 | |
4704 | === added file 'tests/server/resources/copy_1811asktx23a057201605161542175gg.xml' |
4705 | --- tests/server/resources/copy_1811asktx23a057201605161542175gg.xml 1970-01-01 00:00:00 +0000 |
4706 | +++ tests/server/resources/copy_1811asktx23a057201605161542175gg.xml 2016-12-07 12:44:11 +0000 |
4707 | @@ -0,0 +1,1 @@ |
4708 | +<?xml version="1.0" encoding="UTF-8"?><result resultCode="0"><array length="2"><item>181111111111111TMSN6AA5NHVRCRY4V</item></array></result> |
4709 | |
4710 | === modified file 'tests/server/resources/download-file-request-template.xml' |
4711 | --- tests/server/resources/download-file-request-template.xml 2016-09-13 06:55:27 +0000 |
4712 | +++ tests/server/resources/download-file-request-template.xml 2016-12-07 12:44:11 +0000 |
4713 | @@ -1,1 +1,1 @@ |
4714 | -<?xml version="1.0" encoding="UTF-8"?><result resultCode="0"><String>http://127.0.0.1:[port]/storageWeb/servlet/pcDownloadFile?code=1811asktx23a054201604201417321zo01617dyp5-gOv&contentID=[download_file_id]&dom=D914&oprChannel=APP1ZtqoN3R0002&filename=QXBvbGxvIFJvYWQgd2l0aCBEYXNoIEJlcmxpbiAoMSkubXAz</String></result> |
4715 | +<?xml version="1.0" encoding="UTF-8"?><result resultCode="0"><String>http://127.0.0.1:[port]/storageWeb/servlet/pcDownloadFile?code=1811asktx23a054201604201417321zo01617dyp5-gOv&contentID=[download_file_id]&dom=D914&oprChannel=APP1ZtqoN3R0002&filename=[file_name]</String></result> |
4716 | |
4717 | === added file 'tests/server/resources/no_such_content_id.xml' |
4718 | --- tests/server/resources/no_such_content_id.xml 1970-01-01 00:00:00 +0000 |
4719 | +++ tests/server/resources/no_such_content_id.xml 2016-12-07 12:44:11 +0000 |
4720 | @@ -0,0 +1,1 @@ |
4721 | +<?xml version="1.0" encoding="UTF-8"?><result resultCode="9102" desc="[212|saes_CYCommon|673F558E07604214B59ACF5579CB4514]Failed to invoke the service.catalogID/contentID[id] invalid[NDA(100071)][Flag:673F558E07604214B59ACF5579CB4514]"></result> |
4722 | |
4723 | === modified file 'tests/server/resources/no_such_folder_id.xml' |
4724 | --- tests/server/resources/no_such_folder_id.xml 2016-09-13 06:55:27 +0000 |
4725 | +++ tests/server/resources/no_such_folder_id.xml 2016-12-07 12:44:11 +0000 |
4726 | @@ -1,1 +1,1 @@ |
4727 | -<?xml version="1.0" encoding="UTF-8"?><result resultCode="9101" desc="[212|saes_CYCommon|673F558E07604214B59ACF5579CB4514]Failed to invoke the service.catalogID[no_such_folder_id] invalid[NDA(100071)][Flag:673F558E07604214B59ACF5579CB4514]"></result> |
4728 | +<?xml version="1.0" encoding="UTF-8"?><result resultCode="9101" desc="[212|saes_CYCommon|673F558E07604214B59ACF5579CB4514]Failed to invoke the service.catalog/contentID[id] invalid[NDA(100071)][Flag:673F558E07604214B59ACF5579CB4514]"></result> |
4729 | |
4730 | === modified file 'tests/server/server.py' |
4731 | --- tests/server/server.py 2016-10-09 03:29:43 +0000 |
4732 | +++ tests/server/server.py 2016-12-07 12:44:11 +0000 |
4733 | @@ -30,6 +30,7 @@ |
4734 | import random |
4735 | import re |
4736 | import time |
4737 | +import shutil |
4738 | |
4739 | ACCESS_TOKEN = 'the_access_token' |
4740 | |
4741 | @@ -37,6 +38,19 @@ |
4742 | |
4743 | SOCK_PORT = 0 |
4744 | |
4745 | +ID_NAME_MAP = { |
4746 | + "1811asktx23a05620160425125424fle":"Ubuntu booth tour at MWC 2016.mp4", |
4747 | + "1811asktx23a054201604201417321zo":"Apollo Road with Dash Berlin.mp3", |
4748 | + "1811asktx23a0572016042014173129t":"IMG_1887.gif", |
4749 | + "1811asktx23a05620160420134213zx4":"欢迎使用和彩云.pdf", |
4750 | + "1811asktx23a058201604201519046ec":"Screenshot_2015-10-29-22-10-51.png", |
4751 | + "1811asktx23a05520160718170034xh1":"animal.png", |
4752 | + }; |
4753 | + |
4754 | +CONTENT_SIZE_MAP = { |
4755 | + "animal.png":468839, |
4756 | + }; |
4757 | + |
4758 | AUTHORIZATION_BEARER = 'Bearer %s' % ACCESS_TOKEN |
4759 | |
4760 | def read_file(path): |
4761 | @@ -48,10 +62,9 @@ |
4762 | raise Exception("File '%s' not found\n" % file) |
4763 | return content |
4764 | |
4765 | -def create_file(path): |
4766 | +def create_file(path, size = 1024 * 1024 * 10): |
4767 | file = os.path.join(os.path.dirname(__file__), path) |
4768 | with open(file, "wb") as fp: |
4769 | - size = random.randint(1024, 1024 * 1024 * 10) |
4770 | fp.truncate(size) |
4771 | |
4772 | def replace_folder_id(self, folder_id, resource_id): |
4773 | @@ -68,7 +81,21 @@ |
4774 | for line in newlines: |
4775 | f.write(line) |
4776 | |
4777 | -def generate_content_info(path, id, name, size, folder_id): |
4778 | +def replace_content_id(self, content_id, resource_id): |
4779 | + old_str = ('/?<contentID>.*</contentID>') |
4780 | + new_str = ('<contentID>%s</contentID>') % content_id |
4781 | + path = ('resources/content_%s.xml') % resource_id |
4782 | + file = os.path.join(os.path.dirname(__file__), path) |
4783 | + if os.path.isfile(file): |
4784 | + with open(file, 'r') as f: |
4785 | + newlines = [] |
4786 | + for line in f.readlines(): |
4787 | + newlines.append(re.sub(old_str, new_str, line)) |
4788 | + with open(file, 'w') as f: |
4789 | + for line in newlines: |
4790 | + f.write(line) |
4791 | + |
4792 | +def generate_content_info(id, name, size, folder_id): |
4793 | t_file = os.path.join(os.path.dirname(__file__), 'resources/content_info_template.xml') |
4794 | with open(t_file, 'r') as f: |
4795 | newlines = [] |
4796 | @@ -77,51 +104,56 @@ |
4797 | result = result.replace('[content_name]', name) |
4798 | result = result.replace('[content_size]', size) |
4799 | newlines.append(result.replace('[parent_folder_id]', folder_id)) |
4800 | - file = os.path.join(os.path.dirname(__file__), path) |
4801 | - with open(file, 'w') as f: |
4802 | - for line in newlines: |
4803 | - f.write(line) |
4804 | - |
4805 | -def generate_download_info(path, id): |
4806 | - d_file = os.path.join(os.path.dirname(__file__), 'resources/download_info_template.xml') |
4807 | - with open(d_file, 'r') as f: |
4808 | - newlines = [] |
4809 | - for line in f.readlines(): |
4810 | - newlines.append(line.replace('[content_id]', id)) |
4811 | - file = os.path.join(os.path.dirname(__file__), path) |
4812 | - with open(file, 'w') as f: |
4813 | - for line in newlines: |
4814 | - f.write(line) |
4815 | - |
4816 | -def generate_folder_info(path, name, folder_id): |
4817 | + file = os.path.join(os.path.dirname(__file__), ('resources/content_%s.xml') % id) |
4818 | + with open(file, 'w') as f: |
4819 | + for line in newlines: |
4820 | + f.write(line) |
4821 | + |
4822 | +def generate_folder_info(file_name, name, folder_id): |
4823 | d_file = os.path.join(os.path.dirname(__file__), 'resources/create_folder_template.xml') |
4824 | with open(d_file, 'r') as f: |
4825 | newlines = [] |
4826 | for line in f.readlines(): |
4827 | results = line.replace('[folder_name]', name) |
4828 | newlines.append(results.replace('[parent_folder_id]', folder_id)) |
4829 | - file = os.path.join(os.path.dirname(__file__), path) |
4830 | + file = os.path.join(os.path.dirname(__file__), ('resources/%s.xml') % file_name) |
4831 | with open(file, 'w') as f: |
4832 | for line in newlines: |
4833 | f.write(line) |
4834 | |
4835 | -def generate_move_info(path, resource_id, mode='content'): |
4836 | +def generate_move_info(file_name, resource_id, mode='content'): |
4837 | d_file = os.path.join(os.path.dirname(__file__), ('resources/move_%s_template.xml') % mode) |
4838 | with open(d_file, 'r') as f: |
4839 | newlines = [] |
4840 | for line in f.readlines(): |
4841 | newlines.append(line.replace('[%s_id]' % mode, resource_id)) |
4842 | - file = os.path.join(os.path.dirname(__file__), path) |
4843 | + file = os.path.join(os.path.dirname(__file__), ('resources/%s.xml') % file_name) |
4844 | with open(file, 'w') as f: |
4845 | for line in newlines: |
4846 | f.write(line) |
4847 | |
4848 | -def generate_copy_info(path, resource_id): |
4849 | +def generate_copy_info(file_name, resource_id): |
4850 | d_file = os.path.join(os.path.dirname(__file__), ('resources/copy_template.xml')) |
4851 | with open(d_file, 'r') as f: |
4852 | newlines = [] |
4853 | for line in f.readlines(): |
4854 | newlines.append(line.replace('[id]', resource_id)) |
4855 | + file = os.path.join(os.path.dirname(__file__), ('resources/%s.xml') % file_name) |
4856 | + with open(file, 'w') as f: |
4857 | + for line in newlines: |
4858 | + f.write(line) |
4859 | + |
4860 | +def copy_content_file(file_name, new_file_name): |
4861 | + s_file = os.path.join(os.path.dirname(__file__), ('resources/%s.xml') % file_name) |
4862 | + d_file = os.path.join(os.path.dirname(__file__), ('resources/%s.xml') % new_file_name) |
4863 | + shutil.copy(s_file, d_file) |
4864 | + |
4865 | +def generate_invalid_info(path, resource_id, item_type): |
4866 | + d_file = os.path.join(os.path.dirname(__file__), ('resources/no_such_%s_id.xml') % item_type) |
4867 | + with open(d_file, 'r') as f: |
4868 | + newlines = [] |
4869 | + for line in f.readlines(): |
4870 | + newlines.append(line.replace('[id]', ('[%s]') % resource_id)) |
4871 | file = os.path.join(os.path.dirname(__file__), path) |
4872 | with open(file, 'w') as f: |
4873 | for line in newlines: |
4874 | @@ -168,8 +200,7 @@ |
4875 | time.sleep(10) |
4876 | file = 'resources/upload-file-request-template.xml' |
4877 | contentId = generate_random_id() |
4878 | - content_file = 'resources/content_%s.xml' % (contentId) |
4879 | - generate_content_info(content_file, contentId, contentName, contentSize, parentCatalogID) |
4880 | + generate_content_info(contentId, contentName, contentSize, parentCatalogID) |
4881 | |
4882 | content = read_file(file) |
4883 | content = content.replace('[port]', str(SOCK_PORT)) |
4884 | @@ -188,9 +219,11 @@ |
4885 | else: |
4886 | file = 'resources/invalid_content_id.xml' |
4887 | |
4888 | + file_name = ID_NAME_MAP.get(contentId, 'default_file_name').encode('base64').rstrip() |
4889 | content = read_file(file) |
4890 | content = content.replace('[port]', str(SOCK_PORT)) |
4891 | content = content.replace('[download_file_id]', contentId) |
4892 | + content = content.replace('[file_name]', file_name) |
4893 | |
4894 | self.write(content) |
4895 | self.finish() |
4896 | @@ -227,8 +260,7 @@ |
4897 | parentCatalogID = catalog[0].getElementsByTagName('parentCatalogID')[0].firstChild.data |
4898 | if is_valid_id(parentCatalogID): |
4899 | catalogId = generate_random_id() |
4900 | - folder_file = 'resources/%s.xml' % (catalogId) |
4901 | - generate_folder_info(folder_file, catalogName, parentCatalogID) |
4902 | + generate_folder_info(catalogId, catalogName, parentCatalogID) |
4903 | else: |
4904 | catalogId = "invalid_folder_id" |
4905 | |
4906 | @@ -243,8 +275,7 @@ |
4907 | resourceId = catalogInfoList.getElementsByTagName('ID')[0].firstChild.data |
4908 | catalogId = 'move_' + resourceId |
4909 | folderId = 'folder_' + resourceId |
4910 | - move_file = 'resources/%s.xml' % (catalogId) |
4911 | - generate_move_info(move_file , resourceId , "folder"); |
4912 | + generate_move_info(catalogId , resourceId , "folder"); |
4913 | replace_folder_id(self, newCatalogID, folderId) |
4914 | if int(contentInfoList.attributes['length'].value) > 1: |
4915 | catalogId = 'move_content_multiple' |
4916 | @@ -252,8 +283,7 @@ |
4917 | resourceId = contentInfoList.getElementsByTagName('ID')[0].firstChild.data |
4918 | catalogId = 'move_' + resourceId |
4919 | contentId = 'content_' + resourceId |
4920 | - move_file = 'resources/%s.xml' % (catalogId) |
4921 | - generate_move_info(move_file , resourceId, "content"); |
4922 | + generate_move_info(catalogId , resourceId, "content"); |
4923 | replace_folder_id(self, newCatalogID, contentId) |
4924 | |
4925 | updates = dom.getElementsByTagName('updateCatalogInfo') |
4926 | @@ -265,24 +295,30 @@ |
4927 | newCatalogID = copies[0].getElementsByTagName('newCatalogID')[0].firstChild.data |
4928 | catalogInfoList = copies[0].getElementsByTagName('catalogInfoList')[0] |
4929 | contentInfoList = copies[0].getElementsByTagName('contentInfoList')[0] |
4930 | - if int(catalogInfoList.attributes["length"].value) > 1: |
4931 | - catalogId = 'copy_multiple_folder' |
4932 | - elif int(catalogInfoList.attributes["length"].value) > 0: |
4933 | - resourceId = catalogInfoList.getElementsByTagName('ID')[0].firstChild.data |
4934 | - catalogId = 'copy_' + resourceId |
4935 | - folderId = 'folder_' + resourceId |
4936 | - copy_file = 'resources/%s.xml' % (catalogId) |
4937 | - generate_copy_info(copy_file, resourceId); |
4938 | - replace_folder_id(self, newCatalogID, folderId) |
4939 | - if int(contentInfoList.attributes['length'].value) > 1: |
4940 | - catalogId = 'copy_multiple_content' |
4941 | - elif int(contentInfoList.attributes['length'].value) > 0: |
4942 | - resourceId = contentInfoList.getElementsByTagName('ID')[0].firstChild.data |
4943 | - catalogId = 'copy_' + resourceId |
4944 | - contentId = 'content_' + resourceId |
4945 | - copy_file = 'resources/%s.xml' % (catalogId) |
4946 | - generate_copy_info(copy_file, resourceId); |
4947 | - replace_folder_id(self, newCatalogID, contentId) |
4948 | + if newCatalogID == "1811asktx23a057201605161542175lg": #code coverage for storage quota. |
4949 | + catalogId = newCatalogID |
4950 | + else: |
4951 | + if int(catalogInfoList.attributes["length"].value) > 1: |
4952 | + catalogId = 'copy_multiple_folder' |
4953 | + elif int(catalogInfoList.attributes["length"].value) > 0: |
4954 | + resourceId = catalogInfoList.getElementsByTagName('ID')[0].firstChild.data |
4955 | + catalogId = 'copy_' + resourceId |
4956 | + folderId = 'folder_' + resourceId |
4957 | + generate_copy_info(catalogId, resourceId); |
4958 | + replace_folder_id(self, newCatalogID, folderId) |
4959 | + if int(contentInfoList.attributes['length'].value) > 1: |
4960 | + catalogId = 'copy_multiple_content' |
4961 | + elif int(contentInfoList.attributes['length'].value) > 0: |
4962 | + resourceId = contentInfoList.getElementsByTagName('ID')[0].firstChild.data |
4963 | + catalogId = 'copy_' + resourceId |
4964 | + contentId = 'content_' + resourceId |
4965 | + new_resourceId = generate_random_id() |
4966 | + generate_copy_info(catalogId, new_resourceId); |
4967 | + |
4968 | + new_contentId = 'content_' + new_resourceId; |
4969 | + copy_content_file(contentId, new_contentId) |
4970 | + replace_folder_id(self, newCatalogID, new_contentId) |
4971 | + replace_content_id(self, new_resourceId, new_resourceId) |
4972 | |
4973 | file = 'resources/%s.xml' % catalogId |
4974 | self.write(read_file(file)) |
4975 | @@ -298,8 +334,15 @@ |
4976 | if disk: |
4977 | catalogIdList = disk[0].getElementsByTagName('catalogIDs') |
4978 | contentIdList = disk[0].getElementsByTagName('contentIDs') |
4979 | - if (int(catalogIdList[0].attributes['length'].value) > 0 |
4980 | - or int(contentIdList[0].attributes['length'].value) > 0): |
4981 | + if int(catalogIdList[0].attributes['length'].value) > 0 : |
4982 | + folderId = catalogIdList[0].getElementsByTagName('ID')[0].firstChild.data |
4983 | + path = 'resources/%s.xml' % (folderId) |
4984 | + generate_invalid_info(path, folderId, 'folder') |
4985 | + file = 'resources/delete_result.xml' |
4986 | + if int(contentIdList[0].attributes['length'].value) > 0 : |
4987 | + contentId = contentIdList[0].getElementsByTagName('ID')[0].firstChild.data |
4988 | + path = 'resources/%s.xml' % (contentId) |
4989 | + generate_invalid_info(path, contentId, 'content') |
4990 | file = 'resources/delete_result.xml' |
4991 | |
4992 | content = dom.getElementsByTagName('getContentInfo') |
4993 | @@ -353,12 +396,15 @@ |
4994 | |
4995 | class DownloadFile(ErrorHandler): |
4996 | def get(self): |
4997 | - data = self.request.arguments['filename'][0] |
4998 | + data = self.get_argument('filename', 'default_name') |
4999 | data = data.replace(' ', '+') |
5000 | - contentName = str(data).decode('base64') |
PASSED: Continuous integration, rev:27 /jenkins. canonical. com/unity- api-1/job/ lp-mcloud- ci/29/ /jenkins. canonical. com/unity- api-1/job/ build/1111 /jenkins. canonical. com/unity- api-1/job/ build-0- fetch/1118 /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 909 /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 909/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=amd64, release= zesty/909 /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=amd64, release= zesty/909/ artifact/ output/ *zip*/output. zip /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 909 /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 909/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=armhf, release= zesty/909 /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=armhf, release= zesty/909/ artifact/ output/ *zip*/output. zip /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 909 /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 909/artifact/ output/ *zip*/output. zip /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=i386, release= zesty/909 /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=i386, release= zesty/909/ artifact/ output/ *zip*/output. zip
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild: /jenkins. canonical. com/unity- api-1/job/ lp-mcloud- ci/29/rebuild
https:/