Merge lp:~michihenning/storage-framework/exorcise-v1-api into lp:storage-framework/devel

Proposed by Michi Henning
Status: Needs review
Proposed branch: lp:~michihenning/storage-framework/exorcise-v1-api
Merge into: lp:storage-framework/devel
Diff against target: 14362 lines (+25/-13662)
107 files modified
CMakeLists.txt (+3/-6)
debian/changelog (+1/-0)
debian/control.in (+1/-24)
debian/libstorage-framework-qt-client-1-0.install (+0/-1)
debian/libstorage-framework-qt-client-1-0.shlibs (+0/-1)
include/unity/storage/common.h (+0/-1)
include/unity/storage/qt/CMakeLists.txt (+0/-2)
include/unity/storage/qt/client/Account.h (+0/-108)
include/unity/storage/qt/client/CMakeLists.txt (+0/-14)
include/unity/storage/qt/client/Downloader.h (+0/-139)
include/unity/storage/qt/client/Exceptions.h (+0/-255)
include/unity/storage/qt/client/File.h (+0/-109)
include/unity/storage/qt/client/Folder.h (+0/-127)
include/unity/storage/qt/client/Item.h (+0/-239)
include/unity/storage/qt/client/Root.h (+0/-92)
include/unity/storage/qt/client/Runtime.h (+0/-122)
include/unity/storage/qt/client/Uploader.h (+0/-144)
include/unity/storage/qt/client/internal/AccountBase.h (+0/-72)
include/unity/storage/qt/client/internal/DownloaderBase.h (+0/-63)
include/unity/storage/qt/client/internal/FileBase.h (+0/-53)
include/unity/storage/qt/client/internal/FolderBase.h (+0/-52)
include/unity/storage/qt/client/internal/ItemBase.h (+0/-101)
include/unity/storage/qt/client/internal/RootBase.h (+0/-69)
include/unity/storage/qt/client/internal/RuntimeBase.h (+0/-74)
include/unity/storage/qt/client/internal/UploaderBase.h (+0/-69)
include/unity/storage/qt/client/internal/local_client/AccountImpl.h (+0/-61)
include/unity/storage/qt/client/internal/local_client/DownloaderImpl.h (+0/-120)
include/unity/storage/qt/client/internal/local_client/FileImpl.h (+0/-55)
include/unity/storage/qt/client/internal/local_client/FolderImpl.h (+0/-57)
include/unity/storage/qt/client/internal/local_client/ItemImpl.h (+0/-86)
include/unity/storage/qt/client/internal/local_client/RootImpl.h (+0/-59)
include/unity/storage/qt/client/internal/local_client/RuntimeImpl.h (+0/-53)
include/unity/storage/qt/client/internal/local_client/UploaderImpl.h (+0/-141)
include/unity/storage/qt/client/internal/local_client/boost_filesystem.h (+0/-29)
include/unity/storage/qt/client/internal/local_client/storage_exception.h (+0/-94)
include/unity/storage/qt/client/internal/local_client/tmpfile_prefix.h (+0/-21)
include/unity/storage/qt/client/internal/make_future.h (+0/-85)
include/unity/storage/qt/client/internal/remote_client/AccountImpl.h (+0/-68)
include/unity/storage/qt/client/internal/remote_client/DownloaderImpl.h (+0/-76)
include/unity/storage/qt/client/internal/remote_client/FileImpl.h (+0/-61)
include/unity/storage/qt/client/internal/remote_client/FolderImpl.h (+0/-56)
include/unity/storage/qt/client/internal/remote_client/Handler.h (+0/-134)
include/unity/storage/qt/client/internal/remote_client/HandlerBase.h (+0/-76)
include/unity/storage/qt/client/internal/remote_client/ItemImpl.h (+0/-79)
include/unity/storage/qt/client/internal/remote_client/RootImpl.h (+0/-68)
include/unity/storage/qt/client/internal/remote_client/RuntimeImpl.h (+0/-81)
include/unity/storage/qt/client/internal/remote_client/UploaderImpl.h (+0/-84)
include/unity/storage/qt/client/internal/remote_client/dbusmarshal.h (+0/-45)
include/unity/storage/qt/client/internal/remote_client/validate.h (+0/-51)
plugins/Ubuntu/StorageFramework/CMakeLists.txt (+2/-1)
src/internal/CMakeLists.txt (+0/-1)
src/qt/CMakeLists.txt (+8/-10)
src/qt/client/Account.cpp (+0/-72)
src/qt/client/CMakeLists.txt (+0/-131)
src/qt/client/Downloader.cpp (+0/-62)
src/qt/client/Exceptions.cpp (+0/-304)
src/qt/client/File.cpp (+0/-61)
src/qt/client/Folder.cpp (+0/-65)
src/qt/client/Item.cpp (+0/-121)
src/qt/client/Root.cpp (+0/-65)
src/qt/client/Runtime.cpp (+0/-76)
src/qt/client/Uploader.cpp (+0/-67)
src/qt/client/internal/AccountBase.cpp (+0/-70)
src/qt/client/internal/CMakeLists.txt (+0/-5)
src/qt/client/internal/DownloaderBase.cpp (+0/-48)
src/qt/client/internal/FileBase.cpp (+0/-43)
src/qt/client/internal/FolderBase.cpp (+0/-46)
src/qt/client/internal/ItemBase.cpp (+0/-117)
src/qt/client/internal/RootBase.cpp (+0/-68)
src/qt/client/internal/RuntimeBase.cpp (+0/-47)
src/qt/client/internal/UploaderBase.cpp (+0/-59)
src/qt/client/internal/local_client/AccountImpl.cpp (+0/-159)
src/qt/client/internal/local_client/CMakeLists.txt (+0/-17)
src/qt/client/internal/local_client/DownloaderImpl.cpp (+0/-336)
src/qt/client/internal/local_client/FileImpl.cpp (+0/-136)
src/qt/client/internal/local_client/FolderImpl.cpp (+0/-283)
src/qt/client/internal/local_client/ItemImpl.cpp (+0/-496)
src/qt/client/internal/local_client/RootImpl.cpp (+0/-263)
src/qt/client/internal/local_client/RuntimeImpl.cpp (+0/-124)
src/qt/client/internal/local_client/Runtime_create.cpp (+0/-49)
src/qt/client/internal/local_client/UploaderImpl.cpp (+0/-444)
src/qt/client/internal/local_client/storage_exception.cpp (+0/-99)
src/qt/client/internal/remote_client/AccountImpl.cpp (+0/-135)
src/qt/client/internal/remote_client/CMakeLists.txt (+0/-16)
src/qt/client/internal/remote_client/DownloaderImpl.cpp (+0/-114)
src/qt/client/internal/remote_client/FileImpl.cpp (+0/-171)
src/qt/client/internal/remote_client/FolderImpl.cpp (+0/-295)
src/qt/client/internal/remote_client/HandlerBase.cpp (+0/-65)
src/qt/client/internal/remote_client/ItemImpl.cpp (+0/-332)
src/qt/client/internal/remote_client/RootImpl.cpp (+0/-187)
src/qt/client/internal/remote_client/RuntimeImpl.cpp (+0/-215)
src/qt/client/internal/remote_client/Runtime_create.cpp (+0/-47)
src/qt/client/internal/remote_client/UploaderImpl.cpp (+0/-150)
src/qt/client/internal/remote_client/dbusmarshal.cpp (+0/-138)
src/qt/client/internal/remote_client/validate.cpp (+0/-174)
src/qt/client/storage-framework-qt-client-1.pc.in (+0/-6)
src/qt/client/storage-framework-qt-local-client.pc.in (+0/-6)
tests/CMakeLists.txt (+2/-4)
tests/client/CMakeLists.txt (+6/-6)
tests/headers/CMakeLists.txt (+1/-4)
tests/local-client/CMakeLists.txt (+0/-15)
tests/local-client/local-client_test.cpp (+0/-2450)
tests/local-provider/CMakeLists.txt (+1/-1)
tests/remote-client-v1/CMakeLists.txt (+0/-20)
tests/remote-client-v1/MockProvider.cpp (+0/-236)
tests/remote-client-v1/MockProvider.h (+0/-101)
tests/remote-client-v1/remote-client-v1_test.cpp (+0/-1152)
To merge this branch: bzr merge lp:~michihenning/storage-framework/exorcise-v1-api
Reviewer Review Type Date Requested Status
unity-api-1-bot continuous-integration Approve
Unity API Team Pending
Review via email: mp+320300@code.launchpad.net

Commit message

Removed old Qt client API.

Description of the change

Removed old Qt client API. We'll should merge this once the 0.3 release is done and change the package version to 0.4 then.

To post a comment you must log in.
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

PASSED: Continuous integration, rev:119
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/268/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build/1833
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/1840
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1616
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1616/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1616
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1616/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1616
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1616/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1616
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1616/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1616
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1616/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1616
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1616/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/268/rebuild

review: Approve (continuous-integration)
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

PASSED: Continuous integration, rev:120
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/269/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build/1834
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/1841
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1617
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1617/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1617
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1617/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1617
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1617/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1617
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1617/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1617
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1617/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1617
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1617/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/269/rebuild

review: Approve (continuous-integration)
120. By Michi Henning

Removed old v1 enum definition for overwriting files.

121. By Michi Henning

Merged devel and updated changelog.

Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

PASSED: Continuous integration, rev:121
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/273/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build/1883
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/1890
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1672
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1672/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1672
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1672/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1672
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1672/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1672
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1672/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1672
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1672/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1672
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1672/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/273/rebuild

review: Approve (continuous-integration)
122. By Michi Henning

Merged devel and resolved conflicts.

Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

PASSED: Continuous integration, rev:122
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/279/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build/1919
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/1926
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1707
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1707/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1707
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1707/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1707
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1707/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1707
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1707/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1707
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1707/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1707
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1707/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/279/rebuild

review: Approve (continuous-integration)
123. By Michi Henning

Merged devel and resolved conflicts.

Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

PASSED: Continuous integration, rev:123
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/283/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build/1928
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/1935
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1715
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1715/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1715
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=zesty/1715/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1715
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1715/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1715
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=zesty/1715/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1715
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/1715/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1715
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=zesty/1715/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/283/rebuild

review: Approve (continuous-integration)

Unmerged revisions

123. By Michi Henning

Merged devel and resolved conflicts.

122. By Michi Henning

Merged devel and resolved conflicts.

121. By Michi Henning

Merged devel and updated changelog.

120. By Michi Henning

Removed old v1 enum definition for overwriting files.

119. By Michi Henning

Removed old Qt client API.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2017-03-30 06:43:01 +0000
3+++ CMakeLists.txt 2017-04-06 08:34:29 +0000
4@@ -139,14 +139,11 @@
5 enable_coverage_report(
6 TARGETS
7 local-provider-lib
8- qt-client-lib-common
9+ registry-static
10+ sf-provider-objects
11 storage-framework-common-internal
12+ storage-framework-provider
13 storage-framework-qt-client
14- storage-framework-qt-client-v2
15- storage-framework-qt-local-client
16- sf-provider-objects
17- storage-framework-provider
18- registry-static
19 storage-framework-registry
20 storage-provider-local
21 FILTER
22
23=== modified file 'debian/changelog'
24--- debian/changelog 2017-04-06 07:41:50 +0000
25+++ debian/changelog 2017-04-06 08:34:29 +0000
26@@ -1,6 +1,7 @@
27 storage-framework (0.4-0ubuntu2) UNRELEASED; urgency=medium
28
29 [ Michi Henning ]
30+ * Removed the deprecated v1 client API.
31 * Removed dependency on libgio.
32 * Added tutorial and provider reference documentation.
33
34
35=== modified file 'debian/control.in'
36--- debian/control.in 2017-03-30 06:31:03 +0000
37+++ debian/control.in 2017-04-06 08:34:29 +0000
38@@ -39,15 +39,6 @@
39 Description: Library for Storage Framework providers
40 Server-side runtime support for provider implementations.
41
42-Package: libstorage-framework-qt-client-1-0
43-Architecture: any
44-Multi-Arch: same
45-Pre-Depends: ${misc:Pre-Depends},
46-Depends: ${misc:Depends},
47- ${shlibs:Depends},
48-Description: Client library for the Storage Framework (API v1, soon to be removed)
49- Runtime support for storage framework clients.
50-
51 Package: storage-framework-registry
52 Architecture: any
53 Multi-Arch: foreign
54@@ -70,26 +61,12 @@
55 Description: Client library for the Storage Framework
56 Runtime support for storage framework clients.
57
58-Package: libstorage-framework-qt-local-client-1-0
59-Architecture: any
60-Multi-Arch: same
61-Pre-Depends: ${misc:Pre-Depends},
62-Depends: ${misc:Depends},
63- ${shlibs:Depends},
64-Description: Client library for the Storage Framework backed by the local file system
65- A version of the client-side API that implements a local
66- file system provider. This is intended mainly for testing;
67- it allows application code to use the storage framework
68- API without requiring use of DBus and cloud service account.
69-
70 Package: storage-framework-client-dev
71 Section: libdevel
72 Architecture: any
73 Multi-Arch: same
74 Pre-Depends: ${misc:Pre-Depends},
75-Depends: libstorage-framework-qt-client-1-0 (= ${binary:Version}),
76- libstorage-framework-qt-local-client-1-0 (= ${binary:Version}),
77- libstorage-framework-qt-client-2-0 (= ${binary:Version}),
78+Depends: libstorage-framework-qt-client-2-0 (= ${binary:Version}),
79 qtbase5-dev,
80 ${misc:Depends},
81 Description: Header files for the Storage Framework client libraries
82
83=== removed file 'debian/libstorage-framework-qt-client-1-0.install'
84--- debian/libstorage-framework-qt-client-1-0.install 2016-09-21 04:41:06 +0000
85+++ debian/libstorage-framework-qt-client-1-0.install 1970-01-01 00:00:00 +0000
86@@ -1,1 +0,0 @@
87-usr/lib/*/libstorage-framework-qt-client-1.so.*
88
89=== removed file 'debian/libstorage-framework-qt-client-1-0.shlibs'
90--- debian/libstorage-framework-qt-client-1-0.shlibs 2016-11-04 10:27:54 +0000
91+++ debian/libstorage-framework-qt-client-1-0.shlibs 1970-01-01 00:00:00 +0000
92@@ -1,1 +0,0 @@
93-libstorage-framework-qt-client-1 0 libstorage-framework-qt-client-1-0 (>= 0.1)
94
95=== modified file 'include/unity/storage/common.h'
96--- include/unity/storage/common.h 2017-03-29 01:01:24 +0000
97+++ include/unity/storage/common.h 2017-04-06 08:34:29 +0000
98@@ -43,7 +43,6 @@
99 {
100 error_if_conflict, /*!< Return an error if the ETag has changed. */
101 ignore_conflict, /*!< Ignore ETag mismatch and overwrite or replace the file. */
102- overwrite = ignore_conflict, // TODO: remove this, it's here only for compatibility with v1 API
103 };
104
105 /**
106
107=== modified file 'include/unity/storage/qt/CMakeLists.txt'
108--- include/unity/storage/qt/CMakeLists.txt 2016-09-08 08:33:59 +0000
109+++ include/unity/storage/qt/CMakeLists.txt 2017-04-06 08:34:29 +0000
110@@ -1,5 +1,3 @@
111-add_subdirectory(client) # Old (v1) API
112-
113 set(includeprefix unity/storage/qt)
114 file(GLOB public_hdrs *.h)
115 set(convenience_hdr ${CMAKE_CURRENT_BINARY_DIR}/client-api.h)
116
117=== removed directory 'include/unity/storage/qt/client'
118=== removed file 'include/unity/storage/qt/client/Account.h'
119--- include/unity/storage/qt/client/Account.h 2016-11-02 03:20:03 +0000
120+++ include/unity/storage/qt/client/Account.h 1970-01-01 00:00:00 +0000
121@@ -1,108 +0,0 @@
122-/*
123- * Copyright (C) 2016 Canonical Ltd
124- *
125- * This program is free software: you can redistribute it and/or modify
126- * it under the terms of the GNU Lesser General Public License version 3 as
127- * published by the Free Software Foundation.
128- *
129- * This program is distributed in the hope that it will be useful,
130- * but WITHOUT ANY WARRANTY; without even the implied warranty of
131- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
132- * GNU Lesser General Public License for more details.
133- *
134- * You should have received a copy of the GNU Lesser General Public License
135- * along with this program. If not, see <http://www.gnu.org/licenses/>.
136- *
137- * Authors: Michi Henning <michi.henning@canonical.com>
138- */
139-
140-#pragma once
141-
142-#include <unity/storage/visibility.h>
143-
144-#pragma GCC diagnostic push
145-#pragma GCC diagnostic ignored "-Wcast-align"
146-#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
147-#include <QFuture>
148-#pragma GCC diagnostic pop
149-#include <QVector>
150-
151-#include <memory>
152-
153-namespace unity
154-{
155-namespace storage
156-{
157-namespace qt
158-{
159-namespace client
160-{
161-
162-class Runtime;
163-class Root;
164-
165-namespace internal
166-{
167-
168-class AccountBase;
169-
170-namespace local_client
171-{
172-
173-class RuntimeImpl;
174-
175-} // namespace local_client
176-
177-namespace remote_client
178-{
179-
180-class ItemImpl;
181-class RuntimeImpl;
182-
183-} // namespace remote_client
184-} // namespace internal
185-
186-/**
187-\brief Class that represents an account.
188-*/
189-class UNITY_STORAGE_EXPORT Account final
190-{
191-public:
192- /// @cond
193- ~Account();
194- /// @endcond
195-
196- Account(Account&&);
197- Account& operator=(Account&&);
198-
199- typedef std::shared_ptr<Account> SPtr;
200-
201- std::shared_ptr<Runtime> runtime() const;
202-
203- QString owner() const;
204- QString owner_id() const;
205- QString description() const;
206-
207- // TODO: Will almost certainly need more here. Other details?
208-
209- /**
210- \brief Returns the root directories for the account.
211-
212- An account can have more than one root directory (for providers that support the concept of multiple drives).
213- */
214- QFuture<QVector<std::shared_ptr<Root>>> roots() const;
215-
216-private:
217- Account(internal::AccountBase*) UNITY_STORAGE_HIDDEN;
218-
219- std::shared_ptr<internal::AccountBase> p_;
220-
221- friend class internal::local_client::RuntimeImpl;
222- friend class internal::remote_client::ItemImpl;
223- friend class internal::remote_client::RuntimeImpl;
224-};
225-
226-} // namespace client
227-} // namespace qt
228-} // namespace storage
229-} // namespace unity
230
231=== removed file 'include/unity/storage/qt/client/CMakeLists.txt'
232--- include/unity/storage/qt/client/CMakeLists.txt 2016-09-21 04:41:06 +0000
233+++ include/unity/storage/qt/client/CMakeLists.txt 1970-01-01 00:00:00 +0000
234@@ -1,14 +0,0 @@
235-set(includeprefix unity/storage/qt/client)
236-file(GLOB public_hdrs *.h)
237-set(convenience_hdr ${CMAKE_CURRENT_BINARY_DIR}/client-api.h)
238-
239-add_custom_command(
240- OUTPUT ${convenience_hdr}
241- COMMAND ${CMAKE_SOURCE_DIR}/tools/create_globalheader.py
242- ${convenience_hdr} ${includeprefix} ${CMAKE_CURRENT_SOURCE_DIR}
243- DEPENDS ${public_hdrs})
244-
245-add_custom_target(qt-client-all-headers-v1 ALL DEPENDS ${convenience_hdr})
246-
247-install(FILES ${public_hdrs} ${convenience_hdr}
248- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/storage-framework-client-1/${includeprefix})
249
250=== removed file 'include/unity/storage/qt/client/Downloader.h'
251--- include/unity/storage/qt/client/Downloader.h 2016-07-22 02:35:12 +0000
252+++ include/unity/storage/qt/client/Downloader.h 1970-01-01 00:00:00 +0000
253@@ -1,139 +0,0 @@
254-/*
255- * Copyright (C) 2016 Canonical Ltd
256- *
257- * This program is free software: you can redistribute it and/or modify
258- * it under the terms of the GNU Lesser General Public License version 3 as
259- * published by the Free Software Foundation.
260- *
261- * This program is distributed in the hope that it will be useful,
262- * but WITHOUT ANY WARRANTY; without even the implied warranty of
263- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
264- * GNU Lesser General Public License for more details.
265- *
266- * You should have received a copy of the GNU Lesser General Public License
267- * along with this program. If not, see <http://www.gnu.org/licenses/>.
268- *
269- * Authors: Michi Henning <michi.henning@canonical.com>
270- */
271-
272-#pragma once
273-
274-#include <unity/storage/common.h>
275-#include <unity/storage/visibility.h>
276-
277-#pragma GCC diagnostic push
278-#pragma GCC diagnostic ignored "-Wcast-align"
279-#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
280-#include <QFuture>
281-#pragma GCC diagnostic pop
282-#include <QLocalSocket>
283-
284-#include <memory>
285-
286-class QLocalSocket;
287-
288-namespace unity
289-{
290-namespace storage
291-{
292-namespace qt
293-{
294-namespace client
295-{
296-
297-class File;
298-
299-namespace internal
300-{
301-
302-class DownloaderBase;
303-
304-namespace local_client
305-{
306-
307-class FileImpl;
308-
309-} // namespace local_client
310-
311-namespace remote_client
312-{
313-
314-class DownloaderImpl;
315-
316-} // namespace remote_client
317-} // namespace internal
318-
319-class UNITY_STORAGE_EXPORT Downloader final
320-{
321-public:
322- /**
323- \brief Destroys the downloader.
324-
325- The destructor implicitly calls cancel() if it has not been called already.
326- */
327- ~Downloader();
328-
329- Downloader(Downloader&&);
330- Downloader& operator=(Downloader&&);
331-
332- /**
333- \brief Convenience type definition.
334- */
335- typedef std::shared_ptr<Downloader> SPtr;
336-
337- /**
338- \brief Returns the file for this downloader.
339- */
340- std::shared_ptr<File> file() const;
341-
342- /**
343- \brief Returns a socket that is open for reading.
344-
345- To download the file contents, read from the returned socket.
346- \return A socket open for reading.
347- */
348- std::shared_ptr<QLocalSocket> socket() const;
349-
350- /**
351- \brief Finalizes the download.
352-
353- Once the returned socket indicates EOF, you must call finish_download(), which closes
354- the socket. Call `waitForFinished()` on the returned future to check for errors. If an error
355- occurred, `waitForFinished()` throws an exception. If the download was cancelled, `waitForFinished()` throws
356- CancelledException.
357-
358- \warning Do not assume that a download completed successfully once you detect EOF on the socket.
359- If something goes wrong during a download on the server side, the socket will return EOF
360- for a partially-downloaded file.
361- */
362- QFuture<void> finish_download();
363-
364- /**
365- \brief Cancels a download.
366-
367- Calling cancel() informs the provider that the download is no longer needed. The provider
368- will make a best-effort attempt to cancel the download from the remote service.
369-
370- You can check whether the cancel was successfully sent by calling `waitForFinished()` on the returned future.
371- If this does not throw an exception, the message was received and acted upon by the provider. However,
372- successful completion does _not_ indicate that the download was actually cancelled. (For example,
373- the download may have completed already by the time the provider received the cancel request, or the provider
374- may not support cancellation.)
375-
376- Calling cancel() more than once, or calling cancel() after a call to finish_download() is safe and does nothing.
377- */
378- QFuture<void> cancel();
379-
380-private:
381- Downloader(internal::DownloaderBase*) UNITY_STORAGE_HIDDEN;
382-
383- std::shared_ptr<internal::DownloaderBase> p_;
384-
385- friend class internal::local_client::FileImpl;
386- friend class internal::remote_client::DownloaderImpl;
387-};
388-
389-} // namespace client
390-} // namespace qt
391-} // namespace storage
392-} // namespace unity
393
394=== removed file 'include/unity/storage/qt/client/Exceptions.h'
395--- include/unity/storage/qt/client/Exceptions.h 2016-08-26 00:15:44 +0000
396+++ include/unity/storage/qt/client/Exceptions.h 1970-01-01 00:00:00 +0000
397@@ -1,255 +0,0 @@
398-/*
399- * Copyright (C) 2016 Canonical Ltd
400- *
401- * This program is free software: you can redistribute it and/or modify
402- * it under the terms of the GNU Lesser General Public License version 3 as
403- * published by the Free Software Foundation.
404- *
405- * This program is distributed in the hope that it will be useful,
406- * but WITHOUT ANY WARRANTY; without even the implied warranty of
407- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
408- * GNU Lesser General Public License for more details.
409- *
410- * You should have received a copy of the GNU Lesser General Public License
411- * along with this program. If not, see <http://www.gnu.org/licenses/>.
412- *
413- * Authors: Michi Henning <michi.henning@canonical.com>
414- */
415-
416-#pragma once
417-
418-#include <unity/storage/visibility.h>
419-
420-#pragma GCC diagnostic push
421-#pragma GCC diagnostic ignored "-Wcast-align"
422-#include <QException>
423-#pragma GCC diagnostic pop
424-#include <QString>
425-
426-namespace unity
427-{
428-namespace storage
429-{
430-namespace qt
431-{
432-namespace client
433-{
434-
435-/**
436-\brief Base exception class for all exceptions returned by the API.
437-*/
438-class UNITY_STORAGE_EXPORT StorageException : public QException
439-{
440-public:
441- StorageException(char const* exception_name, QString const& error_message);
442- ~StorageException();
443-
444- virtual StorageException* clone() const override = 0;
445- virtual void raise() const override = 0;
446-
447- virtual char const* what() const noexcept override;
448-
449- QString error_message() const;
450-
451-private:
452- std::string what_string_;
453- QString error_message_;
454-};
455-
456-/**
457-\brief Indicates errors in the communication with the storage provider service.
458-*/
459-class UNITY_STORAGE_EXPORT LocalCommsException : public StorageException
460-{
461-public:
462- LocalCommsException(QString const& error_message);
463- ~LocalCommsException();
464-
465- virtual LocalCommsException* clone() const override;
466- virtual void raise() const override;
467-};
468-
469-/**
470-\brief Indicates errors in the communication between the storage provider and the cloud service.
471-*/
472-class UNITY_STORAGE_EXPORT RemoteCommsException : public StorageException
473-{
474-public:
475- RemoteCommsException(QString const& error_message);
476- ~RemoteCommsException();
477-
478- virtual RemoteCommsException* clone() const override;
479- virtual void raise() const override;
480-};
481-
482-/**
483-\brief Indicates that the caller invoked an operation on a file or folder that was deleted.
484-*/
485-class UNITY_STORAGE_EXPORT DeletedException : public StorageException
486-{
487-public:
488- DeletedException(QString const& error_message, QString const& identity_);
489- ~DeletedException();
490-
491- virtual DeletedException* clone() const override;
492- virtual void raise() const override;
493-
494- QString native_identity() const;
495-
496-private:
497- QString identity_;
498-};
499-
500-/**
501-\brief Indicates that the caller destroyed the runtime.
502-*/
503-class UNITY_STORAGE_EXPORT RuntimeDestroyedException : public StorageException
504-{
505-public:
506- RuntimeDestroyedException(QString const& method);
507- ~RuntimeDestroyedException();
508-
509- virtual RuntimeDestroyedException* clone() const override;
510- virtual void raise() const override;
511-};
512-
513-/**
514-\brief Indicates that an item does not exist or could not be found.
515-*/
516-class UNITY_STORAGE_EXPORT NotExistsException : public StorageException
517-{
518-public:
519- NotExistsException(QString const& error_message, QString const& key);
520- ~NotExistsException();
521-
522- virtual NotExistsException* clone() const override;
523- virtual void raise() const override;
524-
525- QString key() const;
526-
527-private:
528- QString key_;
529-};
530-
531-/**
532-\brief Indicates that an item cannot be created because it exists already.
533-*/
534-class UNITY_STORAGE_EXPORT ExistsException : public StorageException
535-{
536-public:
537- ExistsException(QString const& error_message, QString const& identity, QString const& name);
538- ~ExistsException();
539-
540- virtual ExistsException* clone() const override;
541- virtual void raise() const override;
542-
543- QString native_identity() const;
544- QString name() const;
545-
546-private:
547- QString identity_;
548- QString name_;
549-};
550-
551-/**
552-\brief Indicates that an upload detected a version mismatch.
553-*/
554-class UNITY_STORAGE_EXPORT ConflictException : public StorageException
555-{
556-public:
557- ConflictException(QString const& error_message);
558- ~ConflictException();
559-
560- virtual ConflictException* clone() const override;
561- virtual void raise() const override;
562-};
563-
564-/**
565-\brief Indicates that an operation failed because of a permission problem.
566-*/
567-class UNITY_STORAGE_EXPORT PermissionException : public StorageException
568-{
569-public:
570- PermissionException(QString const& error_message);
571- ~PermissionException();
572-
573- virtual PermissionException* clone() const override;
574- virtual void raise() const override;
575-};
576-
577-/**
578-\brief Indicates that an update failed because the provider ran out of space.
579-*/
580-class UNITY_STORAGE_EXPORT QuotaException : public StorageException
581-{
582-public:
583- QuotaException(QString const& error_message);
584- ~QuotaException();
585-
586- virtual QuotaException* clone() const override;
587- virtual void raise() const override;
588-};
589-
590-/**
591-\brief Indicates that an upload or download was cancelled before it could complete.
592-*/
593-class UNITY_STORAGE_EXPORT CancelledException : public StorageException
594-{
595-public:
596- CancelledException(QString const& error_message);
597- ~CancelledException();
598-
599- virtual CancelledException* clone() const override;
600- virtual void raise() const override;
601-};
602-
603-/**
604-\brief Indicates incorrect use of the API, such as calling methods in the wrong order.
605-*/
606-class UNITY_STORAGE_EXPORT LogicException : public StorageException
607-{
608-public:
609- LogicException(QString const& error_message);
610- ~LogicException();
611-
612- virtual LogicException* clone() const override;
613- virtual void raise() const override;
614-};
615-
616-/**
617-\brief Indicates an invalid parameter, such as a negative value when a positive one was
618-expected, or a string that does not parse correctly or is empty when it should be non-empty.
619-*/
620-class UNITY_STORAGE_EXPORT InvalidArgumentException : public StorageException
621-{
622-public:
623- InvalidArgumentException(QString const& error_message);
624- ~InvalidArgumentException();
625-
626- virtual InvalidArgumentException* clone() const override;
627- virtual void raise() const override;
628-};
629-
630-/**
631-\brief Indicates a system error, such as failure to create a file or folder,
632-or any other (usually non-recoverable) kind of error that should not arise during normal operation.
633-*/
634-class UNITY_STORAGE_EXPORT ResourceException : public StorageException
635-{
636-public:
637- ResourceException(QString const& error_message, int error_code);
638- ~ResourceException();
639-
640- virtual ResourceException* clone() const override;
641- virtual void raise() const override;
642-
643- int error_code() const noexcept;
644-
645-private:
646- int error_code_;
647-};
648-
649-} // namespace client
650-} // namespace qt
651-} // namespace storage
652-} // namespace unity
653
654=== removed file 'include/unity/storage/qt/client/File.h'
655--- include/unity/storage/qt/client/File.h 2016-07-14 00:17:14 +0000
656+++ include/unity/storage/qt/client/File.h 1970-01-01 00:00:00 +0000
657@@ -1,109 +0,0 @@
658-/*
659- * Copyright (C) 2016 Canonical Ltd
660- *
661- * This program is free software: you can redistribute it and/or modify
662- * it under the terms of the GNU Lesser General Public License version 3 as
663- * published by the Free Software Foundation.
664- *
665- * This program is distributed in the hope that it will be useful,
666- * but WITHOUT ANY WARRANTY; without even the implied warranty of
667- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
668- * GNU Lesser General Public License for more details.
669- *
670- * You should have received a copy of the GNU Lesser General Public License
671- * along with this program. If not, see <http://www.gnu.org/licenses/>.
672- *
673- * Authors: Michi Henning <michi.henning@canonical.com>
674- */
675-
676-#pragma once
677-
678-#include <unity/storage/qt/client/Item.h>
679-
680-namespace unity
681-{
682-namespace storage
683-{
684-namespace qt
685-{
686-namespace client
687-{
688-
689-class Downloader;
690-class Uploader;
691-namespace internal
692-{
693-
694-class FileBase;
695-
696-namespace local_client
697-{
698-
699-class FileImpl;
700-
701-} // namespace local_client
702-
703-namespace remote_client
704-{
705-
706-class FileImpl;
707-
708-} // namespace remotelocal_client
709-} // namespace internal
710-
711-/**
712-\brief Class that represents a file.
713-
714-A file is a sequence of bytes.
715-*/
716-class UNITY_STORAGE_EXPORT File final : public Item
717-{
718-public:
719- /// @cond
720- virtual ~File();
721- /// @endcond
722-
723- File(File&&);
724- File& operator=(File&&);
725-
726- /**
727- \brief Convenience type definition.
728- */
729- typedef std::shared_ptr<File> SPtr;
730-
731- /**
732- \brief Returns the size of the file in bytes.
733- \throws DestroyedException if the file has been destroyed.
734- */
735- int64_t size() const;
736-
737- /**
738- \brief Creates an uploader for the file.
739- \param policy The conflict resolution policy. If set to ConflictPolicy::overwrite,
740- the contents of the file will be overwritten even if the file was modified
741- after this File instance was retrieved. Otherwise, if set to ConflictPolicy::error_if_conflict,
742- an attempt to retrieve the File instance from the future returned by Uploader::finish_upload()
743- throws ConflictException if the file was was modified via some other channel.
744- \param size The size of the upload in bytes.
745- \note The provided file size must match the number of bytes that you write for the upload, otherwise
746- an attampt to retrive the File instance from the future returned by Uploader::finish_upload()
747- throws LogicException.
748- */
749- QFuture<std::shared_ptr<Uploader>> create_uploader(ConflictPolicy policy, int64_t size);
750-
751- /**
752- \brief Creates a downloader for the file.
753- */
754- QFuture<std::shared_ptr<Downloader>> create_downloader();
755-
756-private:
757- File(internal::FileBase*) UNITY_STORAGE_HIDDEN;
758-
759- friend class internal::local_client::FileImpl;
760- friend class internal::remote_client::FileImpl;
761-};
762-
763-} // namespace client
764-} // namespace qt
765-} // namespace storage
766-} // namespace unity
767
768=== removed file 'include/unity/storage/qt/client/Folder.h'
769--- include/unity/storage/qt/client/Folder.h 2016-07-14 00:17:14 +0000
770+++ include/unity/storage/qt/client/Folder.h 1970-01-01 00:00:00 +0000
771@@ -1,127 +0,0 @@
772-/*
773- * Copyright (C) 2016 Canonical Ltd
774- *
775- * This program is free software: you can redistribute it and/or modify
776- * it under the terms of the GNU Lesser General Public License version 3 as
777- * published by the Free Software Foundation.
778- *
779- * This program is distributed in the hope that it will be useful,
780- * but WITHOUT ANY WARRANTY; without even the implied warranty of
781- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
782- * GNU Lesser General Public License for more details.
783- *
784- * You should have received a copy of the GNU Lesser General Public License
785- * along with this program. If not, see <http://www.gnu.org/licenses/>.
786- *
787- * Authors: Michi Henning <michi.henning@canonical.com>
788- */
789-
790-#pragma once
791-
792-#include <unity/storage/qt/client/File.h>
793-
794-namespace unity
795-{
796-namespace storage
797-{
798-namespace qt
799-{
800-namespace client
801-{
802-namespace internal
803-{
804-
805-class FolderBase;
806-
807-namespace local_client
808-{
809-
810-class FolderImpl;
811-class ItemImpl;
812-
813-} // namespace local_client
814-
815-namespace remote_client
816-{
817-
818-class FolderImpl;
819-class ItemImpl;
820-
821-} // namespace local_client
822-} // namespace internal
823-
824-/**
825-\brief Class that represents a folder.
826-
827-A folder is an unordered set of files and/or folders.
828-*/
829-class UNITY_STORAGE_EXPORT Folder : public Item
830-{
831-public:
832- /// @cond
833- virtual ~Folder();
834- /// @endcond
835-
836- Folder(Folder&&);
837- Folder& operator=(Folder&&);
838-
839- typedef std::shared_ptr<Folder> SPtr;
840-
841- /**
842- \brief Returns the contents of a folder.
843- \return A vector of items or, if this folder is empty,
844- an empty vector. If there is a large number of items,
845- the returned future may become ready
846- more than once. (See QFutureWatcher for more information.)
847- */
848- QFuture<QVector<Item::SPtr>> list() const;
849-
850- /**
851- \brief Returns the item within this folder with the given name.
852- \return The item. If no such item exists, retrieving the result
853- from the future throws an exception.
854- */
855- QFuture<QVector<Item::SPtr>> lookup(QString const& name) const;
856-
857- /**
858- \brief Creates a new folder with the current folder as the parent.
859- \param name The name of the new folder. Note that the actual name may be changed
860- by the provider; call Item::name() once the folder is created to get its actual name.
861- \warn Do not rely on create_folder() to fail if an attempt is made to create
862- a folder with the same name as an already existing folder or file. Depending on the cloud
863- provider, it may be possible to have several folders with the same name.
864- // TODO: Explain issues with metacharacters.
865- \return The new folder.
866- */
867- QFuture<Folder::SPtr> create_folder(QString const& name);
868-
869- /**
870- \brief Creates a new file with the current folder as the parent.
871-
872- Use the returned Uploader to write data to the file. You must call Uploader::finish_upload()
873- for the file to actually be created (whether data was written to the file or not).
874- \param name The name of the new file. Note that the actual name may be changed
875- by the provider; call Item::name() once the file is created to get its actual name.
876- \param size The size of the upload in bytes.
877- \note The provided file size must match the number of bytes that you write for the upload, otherwise
878- an attampt to retrive the File instance from the future returned by Uploader::finish_upload()
879- throws LogicException.
880- \warn Do not rely on create_file() to fail if an attempt is made to create
881- a file with the same name as an already existing file or folder. Depending on the cloud
882- provider, it may be possible to have several files with the same name.
883- // TODO: Explain issues with metacharacters.
884- */
885- QFuture<std::shared_ptr<Uploader>> create_file(QString const& name, int64_t size);
886-
887-protected:
888- Folder(internal::FolderBase*) UNITY_STORAGE_HIDDEN;
889-
890- friend class internal::local_client::FolderImpl;
891- friend class internal::local_client::ItemImpl;
892- friend class internal::remote_client::FolderImpl;
893-};
894-
895-} // namespace client
896-} // namespace qt
897-} // namespace storage
898-} // namespace unity
899
900=== removed file 'include/unity/storage/qt/client/Item.h'
901--- include/unity/storage/qt/client/Item.h 2016-07-25 03:45:41 +0000
902+++ include/unity/storage/qt/client/Item.h 1970-01-01 00:00:00 +0000
903@@ -1,239 +0,0 @@
904-/*
905- * Copyright (C) 2016 Canonical Ltd
906- *
907- * This program is free software: you can redistribute it and/or modify
908- * it under the terms of the GNU Lesser General Public License version 3 as
909- * published by the Free Software Foundation.
910- *
911- * This program is distributed in the hope that it will be useful,
912- * but WITHOUT ANY WARRANTY; without even the implied warranty of
913- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
914- * GNU Lesser General Public License for more details.
915- *
916- * You should have received a copy of the GNU Lesser General Public License
917- * along with this program. If not, see <http://www.gnu.org/licenses/>.
918- *
919- * Authors: Michi Henning <michi.henning@canonical.com>
920- */
921-
922-#pragma once
923-
924-#include <unity/storage/common.h>
925-#include <unity/storage/visibility.h>
926-
927-#pragma GCC diagnostic push
928-#pragma GCC diagnostic ignored "-Wcast-align"
929-#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
930-#include <QDateTime>
931-#include <QFuture>
932-#pragma GCC diagnostic pop
933-
934-#include <memory>
935-
936-namespace unity
937-{
938-namespace storage
939-{
940-namespace qt
941-{
942-namespace client
943-{
944-
945-class Folder;
946-class Root;
947-
948-typedef QMap<QString, QVariant> MetadataMap;
949-
950-namespace internal
951-{
952-
953-class ItemBase;
954-
955-namespace local_client
956-{
957-
958-class UploadWorker;
959-
960-} // namespace local_client
961-
962-namespace remote_client
963-{
964-
965-class CopyHandler;
966-class ItemImpl;
967-class LookupHandler;
968-class MetadataHandler;
969-
970-} // namespace remote_client
971-} // namespace internal
972-
973-/**
974-\brief Base class for files and folders.
975-*/
976-class UNITY_STORAGE_EXPORT Item
977-{
978-public:
979- /// @cond
980- virtual ~Item();
981- /// @endcond
982-
983- Item(Item&&);
984- Item& operator=(Item&&);
985-
986- /**
987- \brief Convenience type definition.
988- */
989- typedef std::shared_ptr<Item> SPtr;
990-
991- /**
992- \brief Returns the native identifier used by the provider.
993- */
994- QString native_identity() const;
995-
996- /**
997- \brief Returns the name of the file or folder.
998-
999- The returned name may not be the same as the name that was used to create the item because the provider
1000- may have changed it in some way (such as converting upper case characters to lower case).
1001- */
1002- QString name() const;
1003-
1004- /**
1005- \brief Returns the root folder for this item.
1006-
1007- If this item is a root, the returned pointer points at this item.
1008- */
1009- std::shared_ptr<Root> root() const;
1010-
1011- /**
1012- \brief Returns the type of the item.
1013- */
1014- ItemType type() const;
1015-
1016- /**
1017- \brief Returns a version identifier for the item.
1018-
1019- The version identifier changes each time the file is updated (possibly
1020- via some channel other than this API).
1021- */
1022- QString etag() const;
1023-
1024- /**
1025- \brief Returns metadata for the item.
1026-
1027- TODO: Needs a lot more doc. Explain standard and provider-specific metadata.
1028- */
1029- QVariantMap metadata() const;
1030-
1031- /**
1032- \brief Returns the time at which the item was last modified.
1033- */
1034- QDateTime last_modified_time() const;
1035-
1036- /**
1037- \brief Returns a list of parent folders of this item.
1038- \return A vector of parents. For a root, the returned vector is empty.
1039- \warn Depending on the provider, a single file or folder may have multiple
1040- parents. Do not assume that only a single parent will be returned, or that
1041- parents are returned in a particular order.
1042- */
1043- QFuture<QVector<std::shared_ptr<Folder>>> parents() const;
1044-
1045- /**
1046- \brief Returns the native identities of the parents of this item.
1047- \return A vector of parent identities. For a root, the returned vector is empty.
1048- \warn Depending on the provider, a single file or folder may have multiple
1049- parents. Do not assume that only a single parent ID will be returned, or that
1050- parent IDs are returned in a particular order.
1051- */
1052- QVector<QString> parent_ids() const;
1053-
1054- /**
1055- \brief Copies this item.
1056-
1057- Copying a folder recursively copies its contents.
1058- \param new_parent The new parent folder for the item. If the item is to be copied within
1059- its current folder, this parameter must designate the currently existing parent.
1060- \param new_name The new name for the file.
1061- \warn Do not rely on copy() to fail if an attempt is made to copy
1062- a file or folder to a destination name that is the same as that of an already existing file or folder.
1063- Depending on the cloud provider, it may be possible to have several folders with the same name.
1064- */
1065- QFuture<Item::SPtr> copy(std::shared_ptr<Folder> const& new_parent, QString const& new_name);
1066-
1067- /**
1068- \brief Renames and/or moves a file or folder.
1069- \param new_parent The new parent folder for the item. If the item is to be renamed within
1070- its current folder, this parameter must designate the currently existing parent.
1071- \param new_name The new name for the item.
1072- \warn Do not rely on move() to fail if an attempt is made to move
1073- a file or folder to a destination name that is the same as that of an already existing file or folder.
1074- Depending on the cloud provider, it may be possible to have several files or folders with the same name.
1075- \note It is not possible to move or rename the root folder.
1076- */
1077- QFuture<Item::SPtr> move(std::shared_ptr<Folder> const& new_parent, QString const& new_name);
1078-
1079- /**
1080- \brief Permamently deletes the item.
1081- \warning Deleting a folder recursively deletes its contents.
1082- */
1083- QFuture<void> delete_item();
1084-
1085- /**
1086- \brief Returns the time at which an item was created.
1087- \return If a provider does not support this method, the returned `QDateTime`'s `isValid()`
1088- method returns false.
1089- */
1090- QDateTime creation_time() const;
1091-
1092- /**
1093- \brief Returns provider-specific metadata.
1094-
1095- The contents of the returned map depend on the actual provider. This method is provided
1096- to allow applications to use provider-specific features that may not be
1097- supported by all providers.
1098- \return The returned map may be empty if a provider does not support this feature. If a provider
1099- supports it, the following keys are guaranteed to be present:
1100- - `native_provider_id` (string)
1101- A string that identifies the provider, such as "mCloud".
1102- - `native_provider_version` (string)
1103- A string that provides a version identifier.
1104- \warn Unless you know that your application will only be used with a specific provider,
1105- avoid using this method. If you do use provider-specific data, ensure reasonable fallback
1106- behavior for your application if it encounters a different provider that does not support
1107- a particular metadata item.
1108- // TODO: document where to find the list of metadata items for each concrete provider.
1109- */
1110- MetadataMap native_metadata() const;
1111-
1112- /**
1113- \brief Compares two items for equality.
1114-
1115- Equality comparison is deep, that is, it compares the native identities of two items, not
1116- their `shared_ptr` values.
1117- \note If you retrieve the same item more than once (such as by calling Root::get() twice
1118- with the same file ID) and then perform an upload using one of the two file handles, the
1119- files still have the same identity after the upload. However, the etag() values of the two
1120- file handles differ after the upload. Despite this, equal_to() still returns `true` for
1121- the two files, that is, the ETags are ignored for equality comparison.
1122- \return `!this->native_identity() == other->native_identity()`
1123- \throws DeletedException if `this` or `other` have been deleted.
1124- */
1125- bool equal_to(Item::SPtr const& other) const noexcept;
1126-
1127-protected:
1128- Item(internal::ItemBase* p) UNITY_STORAGE_HIDDEN;
1129-
1130- std::shared_ptr<internal::ItemBase> p_;
1131-
1132- friend class internal::local_client::UploadWorker;
1133- friend class internal::remote_client::CopyHandler;
1134- friend class internal::remote_client::ItemImpl;
1135- friend class internal::remote_client::LookupHandler;
1136- friend class internal::remote_client::MetadataHandler;
1137-};
1138-
1139-} // namespace client
1140-} // namespace qt
1141-} // namespace storage
1142-} // namespace unity
1143
1144=== removed file 'include/unity/storage/qt/client/Root.h'
1145--- include/unity/storage/qt/client/Root.h 2016-07-20 06:58:30 +0000
1146+++ include/unity/storage/qt/client/Root.h 1970-01-01 00:00:00 +0000
1147@@ -1,92 +0,0 @@
1148-/*
1149- * Copyright (C) 2016 Canonical Ltd
1150- *
1151- * This program is free software: you can redistribute it and/or modify
1152- * it under the terms of the GNU Lesser General Public License version 3 as
1153- * published by the Free Software Foundation.
1154- *
1155- * This program is distributed in the hope that it will be useful,
1156- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1157- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1158- * GNU Lesser General Public License for more details.
1159- *
1160- * You should have received a copy of the GNU Lesser General Public License
1161- * along with this program. If not, see <http://www.gnu.org/licenses/>.
1162- *
1163- * Authors: Michi Henning <michi.henning@canonical.com>
1164- */
1165-
1166-#pragma once
1167-
1168-#include <unity/storage/qt/client/Folder.h>
1169-
1170-namespace unity
1171-{
1172-namespace storage
1173-{
1174-namespace qt
1175-{
1176-namespace client
1177-{
1178-
1179-class Account;
1180-class Item;
1181-
1182-namespace internal
1183-{
1184-
1185-class RootBase;
1186-
1187-namespace local_client
1188-{
1189-
1190-class RootImpl;
1191-
1192-} // namespace local_client
1193-
1194-namespace remote_client
1195-{
1196-
1197-class RootImpl;
1198-
1199-} // namespace remote_client
1200-} // namespace internal
1201-
1202-/**
1203-\brief Class that represents a root folder.
1204-*/
1205-class UNITY_STORAGE_EXPORT Root final : public Folder
1206-{
1207-public:
1208- // @cond
1209- virtual ~Root();
1210- /// @endcond
1211-
1212- Root(Root&&);
1213- Root& operator=(Root&&);
1214-
1215- typedef std::shared_ptr<Root> SPtr;
1216-
1217- /**
1218- \brief Returns the account for this root.
1219- */
1220- std::shared_ptr<Account> account() const;
1221-
1222- QFuture<int64_t> free_space_bytes() const;
1223- QFuture<int64_t> used_space_bytes() const;
1224-
1225- QFuture<Item::SPtr> get(QString native_identity) const;
1226-
1227- // TODO: Do we need a method to get lots of things?
1228-
1229-private:
1230- Root(internal::RootBase*) UNITY_STORAGE_HIDDEN;
1231-
1232- friend class internal::local_client::RootImpl;
1233- friend class internal::remote_client::RootImpl;
1234-};
1235-
1236-} // namespace client
1237-} // namespace qt
1238-} // namespace storage
1239-} // namespace unity
1240
1241=== removed file 'include/unity/storage/qt/client/Runtime.h'
1242--- include/unity/storage/qt/client/Runtime.h 2016-08-12 00:32:42 +0000
1243+++ include/unity/storage/qt/client/Runtime.h 1970-01-01 00:00:00 +0000
1244@@ -1,122 +0,0 @@
1245-/*
1246- * Copyright (C) 2016 Canonical Ltd
1247- *
1248- * This program is free software: you can redistribute it and/or modify
1249- * it under the terms of the GNU Lesser General Public License version 3 as
1250- * published by the Free Software Foundation.
1251- *
1252- * This program is distributed in the hope that it will be useful,
1253- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1254- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1255- * GNU Lesser General Public License for more details.
1256- *
1257- * You should have received a copy of the GNU Lesser General Public License
1258- * along with this program. If not, see <http://www.gnu.org/licenses/>.
1259- *
1260- * Authors: Michi Henning <michi.henning@canonical.com>
1261- */
1262-
1263-#pragma once
1264-
1265-#include <unity/storage/visibility.h>
1266-
1267-#pragma GCC diagnostic push
1268-#pragma GCC diagnostic ignored "-Wcast-align"
1269-#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
1270-#include <QFuture>
1271-#pragma GCC diagnostic pop
1272-
1273-#include <memory>
1274-
1275-class QDBusConnection;
1276-
1277-namespace unity
1278-{
1279-namespace storage
1280-{
1281-namespace qt
1282-{
1283-namespace client
1284-{
1285-
1286-class Account;
1287-
1288-namespace internal
1289-{
1290-
1291-class AccountBase;
1292-class RuntimeBase;
1293-
1294-namespace remote_client
1295-{
1296-
1297-class AccountImpl;
1298-
1299-} // namespace remote_client
1300-
1301-} // namespace internal
1302-
1303-/**
1304-TODO
1305-*/
1306-class UNITY_STORAGE_EXPORT Runtime final
1307-{
1308-public:
1309- /**
1310- \brief Destroys the runtime.
1311-
1312- The destructor implicitly calls shutdown().
1313-
1314- \warning Do not invoke methods on any other part of the API once the runtime is destroyed;
1315- doing so has undefined behavior.
1316- */
1317- ~Runtime();
1318-
1319- Runtime(Runtime&&);
1320- Runtime& operator=(Runtime&&);
1321-
1322- typedef std::shared_ptr<Runtime> SPtr;
1323-
1324- /**
1325- \brief Initializes the runtime.
1326- */
1327- static SPtr create();
1328- static SPtr create(QDBusConnection const& bus);
1329-
1330- /**
1331- \brief Shuts down the runtime.
1332-
1333- This method shuts down the runtime. Calling shutdown() more than once is safe and does nothing.
1334-
1335- The destructor implicitly calls shutdown(). This method is provided mainly to permit logging of any
1336- errors that might arise during shut-down.
1337- \throws Various exceptions, depending on the error. TODO
1338- */
1339- void shutdown();
1340-
1341- QFuture<QVector<std::shared_ptr<Account>>> accounts();
1342-
1343- /// @cond
1344- /**
1345- \brief Creates an Account object pointing at (bus_name, object_path)
1346-
1347- This method is intended for use in tests, where you want to talk
1348- to a provider that has already been set up on the bus.
1349- */
1350- std::shared_ptr<Account> make_test_account(QString const& bus_name,
1351- QString const& object_path);
1352- /// @endcond
1353-
1354-private:
1355- Runtime(internal::RuntimeBase* p) UNITY_STORAGE_HIDDEN;
1356-
1357- std::shared_ptr<internal::RuntimeBase> p_;
1358-
1359- friend class internal::AccountBase;
1360- friend class internal::remote_client::AccountImpl;
1361-};
1362-
1363-} // namespace client
1364-} // namespace qt
1365-} // namespace storage
1366-} // namespace unity
1367
1368=== removed file 'include/unity/storage/qt/client/Uploader.h'
1369--- include/unity/storage/qt/client/Uploader.h 2016-08-03 03:20:39 +0000
1370+++ include/unity/storage/qt/client/Uploader.h 1970-01-01 00:00:00 +0000
1371@@ -1,144 +0,0 @@
1372-/*
1373- * Copyright (C) 2016 Canonical Ltd
1374- *
1375- * This program is free software: you can redistribute it and/or modify
1376- * it under the terms of the GNU Lesser General Public License version 3 as
1377- * published by the Free Software Foundation.
1378- *
1379- * This program is distributed in the hope that it will be useful,
1380- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1381- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1382- * GNU Lesser General Public License for more details.
1383- *
1384- * You should have received a copy of the GNU Lesser General Public License
1385- * along with this program. If not, see <http://www.gnu.org/licenses/>.
1386- *
1387- * Authors: Michi Henning <michi.henning@canonical.com>
1388- */
1389-
1390-#pragma once
1391-
1392-#include <unity/storage/visibility.h>
1393-
1394-#pragma GCC diagnostic push
1395-#pragma GCC diagnostic ignored "-Wcast-align"
1396-#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
1397-#include <QFuture>
1398-#pragma GCC diagnostic pop
1399-#include <QLocalSocket>
1400-
1401-#include <memory>
1402-
1403-class QLocalSocket;
1404-
1405-namespace unity
1406-{
1407-namespace storage
1408-{
1409-namespace qt
1410-{
1411-namespace client
1412-{
1413-
1414-class File;
1415-
1416-namespace internal
1417-{
1418-
1419-class UploaderBase;
1420-
1421-namespace local_client
1422-{
1423-
1424-class FileImpl;
1425-class FolderImpl;
1426-
1427-} // namespace local_client
1428-
1429-namespace remote_client
1430-{
1431-
1432-class UploaderImpl;
1433-
1434-} // namespace remote_client
1435-} // namespace internal
1436-
1437-class UNITY_STORAGE_EXPORT Uploader final
1438-{
1439-public:
1440- /**
1441- \brief Destroys the uploader.
1442-
1443- The destructor implicitly calls cancel() if it has not been called already.
1444- */
1445- ~Uploader();
1446-
1447- Uploader(Uploader&&);
1448- Uploader& operator=(Uploader&&);
1449-
1450- /**
1451- \brief Convenience type definition.
1452- */
1453- typedef std::shared_ptr<Uploader> SPtr;
1454-
1455- /**
1456- \brief Returns a socket that is open for writing.
1457-
1458- To upload the file contents, write to the returned socket.
1459- If an operation on the socket returns an error, the file is in an indeterminate state.
1460-
1461- \return A socket open for writing.
1462- */
1463- std::shared_ptr<QLocalSocket> socket() const;
1464-
1465- /**
1466- \brief Returns the size that was passed to Folder::create_file() or File::create_uploader().
1467-
1468- \return The number of bytes that the uploader expects to be written to the `QLocalSocket` returned
1469- from socket().
1470- */
1471- int64_t size() const;
1472-
1473- /**
1474- \brief Finalizes the upload.
1475-
1476- Once you have written the file contents to the socket returned by socket(), you must call finish_upload(),
1477- which closes the socket. Call `result()` on the returned future to check for errors. If an error
1478- occurred, `result()` throws an exception. If the upload was cancelled, `result` throws CancelledException.
1479- Otherwise, it returns the File that was uploaded.
1480-
1481- Calling finish_upload() more than once is safe; subsequent calls do nothing and return the future
1482- that was returned by the first call.
1483- */
1484- QFuture<std::shared_ptr<File>> finish_upload();
1485-
1486- /**
1487- \brief Cancels an upload.
1488-
1489- Calling cancel() informs the provider that the upload is no longer needed. The provider
1490- will make a best-effort attempt to cancel the upload to the remote service.
1491-
1492- You can check whether the cancel was successfully sent by calling `waitForFinished()` on the returned future.
1493- If this does not throw an exception, the message was received and acted upon by the provider. However,
1494- successful completion does _not_ indicate that the upload was actually cancelled. (For example,
1495- the upload may have completed already by the time the provider received the cancel request, or the provider
1496- may not support cancellation.)
1497-
1498- Calling cancel() more than once, or calling cancel() after a call to finish_upload() is safe and does nothing.
1499- */
1500- QFuture<void> cancel();
1501-
1502-private:
1503- Uploader(internal::UploaderBase*) UNITY_STORAGE_HIDDEN;
1504-
1505- std::shared_ptr<internal::UploaderBase> p_;
1506-
1507- friend class internal::local_client::FileImpl;
1508- friend class internal::local_client::FolderImpl;
1509- friend class internal::remote_client::UploaderImpl;
1510-};
1511-
1512-} // namespace client
1513-} // namespace qt
1514-} // namespace storage
1515-} // namespace unity
1516
1517=== removed directory 'include/unity/storage/qt/client/internal'
1518=== removed file 'include/unity/storage/qt/client/internal/AccountBase.h'
1519--- include/unity/storage/qt/client/internal/AccountBase.h 2016-07-25 03:45:41 +0000
1520+++ include/unity/storage/qt/client/internal/AccountBase.h 1970-01-01 00:00:00 +0000
1521@@ -1,72 +0,0 @@
1522-/*
1523- * Copyright (C) 2016 Canonical Ltd
1524- *
1525- * This program is free software: you can redistribute it and/or modify
1526- * it under the terms of the GNU Lesser General Public License version 3 as
1527- * published by the Free Software Foundation.
1528- *
1529- * This program is distributed in the hope that it will be useful,
1530- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1531- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1532- * GNU Lesser General Public License for more details.
1533- *
1534- * You should have received a copy of the GNU Lesser General Public License
1535- * along with this program. If not, see <http://www.gnu.org/licenses/>.
1536- *
1537- * Authors: Michi Henning <michi.henning@canonical.com>
1538- */
1539-
1540-#pragma once
1541-
1542-#pragma GCC diagnostic push
1543-#pragma GCC diagnostic ignored "-Wcast-align"
1544-#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
1545-#include <QFuture>
1546-#pragma GCC diagnostic pop
1547-#include <QVector>
1548-
1549-#include <atomic>
1550-#include <memory>
1551-
1552-namespace unity
1553-{
1554-namespace storage
1555-{
1556-namespace qt
1557-{
1558-namespace client
1559-{
1560-
1561-class Account;
1562-class Root;
1563-class Runtime;
1564-
1565-namespace internal
1566-{
1567-
1568-class AccountBase
1569-{
1570-public:
1571- AccountBase(std::weak_ptr<Runtime> const& runtime);
1572- virtual ~AccountBase() = default;
1573- AccountBase(AccountBase const&) = delete;
1574- AccountBase& operator=(AccountBase const&) = delete;
1575-
1576- std::shared_ptr<Runtime> runtime() const;
1577- virtual QString owner() const = 0;
1578- virtual QString owner_id() const = 0;
1579- virtual QString description() const = 0;
1580- virtual QFuture<QVector<std::shared_ptr<Root>>> roots() = 0;
1581-
1582- void set_public_instance(std::weak_ptr<Account> const& p);
1583-
1584-protected:
1585- std::weak_ptr<Runtime> runtime_; // Immutable once set
1586- std::weak_ptr<Account> public_instance_; // Immutable once set
1587-};
1588-
1589-} // namespace internal
1590-} // namespace client
1591-} // namespace qt
1592-} // namespace storage
1593-} // namespace unity
1594
1595=== removed file 'include/unity/storage/qt/client/internal/DownloaderBase.h'
1596--- include/unity/storage/qt/client/internal/DownloaderBase.h 2016-07-22 02:35:12 +0000
1597+++ include/unity/storage/qt/client/internal/DownloaderBase.h 1970-01-01 00:00:00 +0000
1598@@ -1,63 +0,0 @@
1599-/*
1600- * Copyright (C) 2016 Canonical Ltd
1601- *
1602- * This program is free software: you can redistribute it and/or modify
1603- * it under the terms of the GNU Lesser General Public License version 3 as
1604- * published by the Free Software Foundation.
1605- *
1606- * This program is distributed in the hope that it will be useful,
1607- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1608- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1609- * GNU Lesser General Public License for more details.
1610- *
1611- * You should have received a copy of the GNU Lesser General Public License
1612- * along with this program. If not, see <http://www.gnu.org/licenses/>.
1613- *
1614- * Authors: Michi Henning <michi.henning@canonical.com>
1615- */
1616-
1617-#pragma once
1618-
1619-#pragma GCC diagnostic push
1620-#pragma GCC diagnostic ignored "-Wcast-align"
1621-#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
1622-#include <QFuture>
1623-#pragma GCC diagnostic pop
1624-
1625-#include <memory>
1626-
1627-class QLocalSocket;
1628-
1629-namespace unity
1630-{
1631-namespace storage
1632-{
1633-namespace qt
1634-{
1635-namespace client
1636-{
1637-
1638-class File;
1639-
1640-namespace internal
1641-{
1642-
1643-class DownloaderBase : public QObject
1644-{
1645-public:
1646- DownloaderBase(std::weak_ptr<File> file);
1647-
1648- virtual std::shared_ptr<File> file() const = 0;
1649- virtual std::shared_ptr<QLocalSocket> socket() const = 0;
1650- virtual QFuture<void> finish_download() = 0;
1651- virtual QFuture<void> cancel() noexcept = 0;
1652-
1653-protected:
1654- std::shared_ptr<File> file_;
1655-};
1656-
1657-} // namespace internal
1658-} // namespace client
1659-} // namespace qt
1660-} // namespace storage
1661-} // namespace unity
1662
1663=== removed file 'include/unity/storage/qt/client/internal/FileBase.h'
1664--- include/unity/storage/qt/client/internal/FileBase.h 2016-07-14 00:17:14 +0000
1665+++ include/unity/storage/qt/client/internal/FileBase.h 1970-01-01 00:00:00 +0000
1666@@ -1,53 +0,0 @@
1667-/*
1668- * Copyright (C) 2016 Canonical Ltd
1669- *
1670- * This program is free software: you can redistribute it and/or modify
1671- * it under the terms of the GNU Lesser General Public License version 3 as
1672- * published by the Free Software Foundation.
1673- *
1674- * This program is distributed in the hope that it will be useful,
1675- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1676- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1677- * GNU Lesser General Public License for more details.
1678- *
1679- * You should have received a copy of the GNU Lesser General Public License
1680- * along with this program. If not, see <http://www.gnu.org/licenses/>.
1681- *
1682- * Authors: Michi Henning <michi.henning@canonical.com>
1683- */
1684-
1685-#pragma once
1686-
1687-#include <unity/storage/qt/client/internal/ItemBase.h>
1688-
1689-namespace unity
1690-{
1691-namespace storage
1692-{
1693-namespace qt
1694-{
1695-namespace client
1696-{
1697-
1698-class Downloader;
1699-class File;
1700-class Uploader;
1701-
1702-namespace internal
1703-{
1704-
1705-class FileBase : public virtual ItemBase
1706-{
1707-public:
1708- FileBase(QString const& identity);
1709-
1710- virtual int64_t size() const = 0;
1711- virtual QFuture<std::shared_ptr<Uploader>> create_uploader(ConflictPolicy policy, int64_t size) = 0;
1712- virtual QFuture<std::shared_ptr<Downloader>> create_downloader() = 0;
1713-};
1714-
1715-} // namespace internal
1716-} // namespace client
1717-} // namespace qt
1718-} // namespace storage
1719-} // namespace unity
1720
1721=== removed file 'include/unity/storage/qt/client/internal/FolderBase.h'
1722--- include/unity/storage/qt/client/internal/FolderBase.h 2016-07-22 00:17:24 +0000
1723+++ include/unity/storage/qt/client/internal/FolderBase.h 1970-01-01 00:00:00 +0000
1724@@ -1,52 +0,0 @@
1725-/*
1726- * Copyright (C) 2016 Canonical Ltd
1727- *
1728- * This program is free software: you can redistribute it and/or modify
1729- * it under the terms of the GNU Lesser General Public License version 3 as
1730- * published by the Free Software Foundation.
1731- *
1732- * This program is distributed in the hope that it will be useful,
1733- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1734- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1735- * GNU Lesser General Public License for more details.
1736- *
1737- * You should have received a copy of the GNU Lesser General Public License
1738- * along with this program. If not, see <http://www.gnu.org/licenses/>.
1739- *
1740- * Authors: Michi Henning <michi.henning@canonical.com>
1741- */
1742-
1743-#pragma once
1744-
1745-#include <unity/storage/qt/client/internal/ItemBase.h>
1746-
1747-namespace unity
1748-{
1749-namespace storage
1750-{
1751-namespace qt
1752-{
1753-namespace client
1754-{
1755-
1756-class Uploader;
1757-
1758-namespace internal
1759-{
1760-
1761-class FolderBase : public virtual ItemBase
1762-{
1763-public:
1764- FolderBase(QString const& identity, ItemType type);
1765-
1766- virtual QFuture<QVector<std::shared_ptr<Item>>> list() const = 0;
1767- virtual QFuture<QVector<std::shared_ptr<Item>>> lookup(QString const& name) const = 0;
1768- virtual QFuture<std::shared_ptr<Folder>> create_folder(QString const& name) = 0;
1769- virtual QFuture<std::shared_ptr<Uploader>> create_file(QString const& name, int64_t size) = 0;
1770-};
1771-
1772-} // namespace internal
1773-} // namespace client
1774-} // namespace qt
1775-} // namespace storage
1776-} // namespace unity
1777
1778=== removed file 'include/unity/storage/qt/client/internal/ItemBase.h'
1779--- include/unity/storage/qt/client/internal/ItemBase.h 2016-08-05 05:37:23 +0000
1780+++ include/unity/storage/qt/client/internal/ItemBase.h 1970-01-01 00:00:00 +0000
1781@@ -1,101 +0,0 @@
1782-/*
1783- * Copyright (C) 2016 Canonical Ltd
1784- *
1785- * This program is free software: you can redistribute it and/or modify
1786- * it under the terms of the GNU Lesser General Public License version 3 as
1787- * published by the Free Software Foundation.
1788- *
1789- * This program is distributed in the hope that it will be useful,
1790- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1791- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1792- * GNU Lesser General Public License for more details.
1793- *
1794- * You should have received a copy of the GNU Lesser General Public License
1795- * along with this program. If not, see <http://www.gnu.org/licenses/>.
1796- *
1797- * Authors: Michi Henning <michi.henning@canonical.com>
1798- */
1799-
1800-#pragma once
1801-
1802-#include <unity/storage/common.h>
1803-
1804-#pragma GCC diagnostic push
1805-#pragma GCC diagnostic ignored "-Wcast-align"
1806-#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
1807-#include <QDateTime>
1808-#include <QFuture>
1809-#pragma GCC diagnostic pop
1810-#include <QVariantMap>
1811-
1812-#include <memory>
1813-
1814-namespace unity
1815-{
1816-namespace storage
1817-{
1818-namespace qt
1819-{
1820-namespace client
1821-{
1822-
1823-class Folder;
1824-class Item;
1825-class Root;
1826-
1827-typedef QMap<QString, QVariant> MetadataMap;
1828-
1829-namespace internal
1830-{
1831-
1832-class ItemImpl;
1833-
1834-class ItemBase : public std::enable_shared_from_this<ItemBase>
1835-{
1836-public:
1837- ItemBase(QString const& identity, ItemType type);
1838- virtual ~ItemBase();
1839- ItemBase(ItemBase const&) = delete;
1840- ItemBase& operator=(ItemBase const&) = delete;
1841-
1842- QString native_identity() const;
1843- ItemType type() const;
1844- std::shared_ptr<Root> root() const;
1845-
1846- virtual QString name() const = 0;
1847- virtual QString etag() const = 0;
1848- virtual QVariantMap metadata() const = 0;
1849- virtual QDateTime last_modified_time() const = 0;
1850-
1851- virtual QFuture<std::shared_ptr<Item>> copy(std::shared_ptr<Folder> const& new_parent, QString const& new_name) = 0;
1852- virtual QFuture<std::shared_ptr<Item>> move(std::shared_ptr<Folder> const& new_parent, QString const& new_name) = 0;
1853- virtual QFuture<QVector<std::shared_ptr<Folder>>> parents() const = 0;
1854- virtual QVector<QString> parent_ids() const = 0;
1855- virtual QFuture<void> delete_item() = 0;
1856-
1857- virtual QDateTime creation_time() const = 0;
1858- virtual MetadataMap native_metadata() const = 0;
1859-
1860- virtual bool equal_to(ItemBase const& other) const noexcept = 0;
1861-
1862- void set_root(std::weak_ptr<Root> p);
1863- void set_public_instance(std::weak_ptr<Item> p);
1864-
1865-protected:
1866- std::shared_ptr<Root> get_root() const noexcept;
1867- void throw_if_destroyed(QString const& method) const;
1868-
1869- const QString identity_;
1870- const ItemType type_;
1871- std::weak_ptr<Root> root_;
1872- std::weak_ptr<Item> public_instance_;
1873- bool deleted_ = false;
1874-
1875- friend class ItemImpl;
1876-};
1877-
1878-} // namespace internal
1879-} // namespace client
1880-} // namespace qt
1881-} // namespace storage
1882-} // namespace unity
1883
1884=== removed file 'include/unity/storage/qt/client/internal/RootBase.h'
1885--- include/unity/storage/qt/client/internal/RootBase.h 2016-07-20 06:58:30 +0000
1886+++ include/unity/storage/qt/client/internal/RootBase.h 1970-01-01 00:00:00 +0000
1887@@ -1,69 +0,0 @@
1888-/*
1889- * Copyright (C) 2016 Canonical Ltd
1890- *
1891- * This program is free software: you can redistribute it and/or modify
1892- * it under the terms of the GNU Lesser General Public License version 3 as
1893- * published by the Free Software Foundation.
1894- *
1895- * This program is distributed in the hope that it will be useful,
1896- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1897- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1898- * GNU Lesser General Public License for more details.
1899- *
1900- * You should have received a copy of the GNU Lesser General Public License
1901- * along with this program. If not, see <http://www.gnu.org/licenses/>.
1902- *
1903- * Authors: Michi Henning <michi.henning@canonical.com>
1904- */
1905-
1906-#pragma once
1907-
1908-#include <unity/storage/qt/client/Root.h>
1909-#include <unity/storage/qt/client/internal/FolderBase.h>
1910-
1911-namespace unity
1912-{
1913-namespace storage
1914-{
1915-namespace qt
1916-{
1917-namespace client
1918-{
1919-namespace internal
1920-{
1921-namespace remote_client
1922-{
1923-
1924-class CopyHandler;
1925-class ItemImpl;
1926-class LookupHandler;
1927-class MetadataHandler;
1928-
1929-} // namespace remote_client
1930-
1931-class RootBase : public virtual FolderBase
1932-{
1933-public:
1934- RootBase(QString const& identity, std::weak_ptr<Account> const& account);
1935-
1936- std::shared_ptr<Account> account() const;
1937- virtual QFuture<int64_t> free_space_bytes() const = 0;
1938- virtual QFuture<int64_t> used_space_bytes() const = 0;
1939- virtual QFuture<Item::SPtr> get(QString native_identity) const = 0;
1940-
1941- static std::shared_ptr<Root> make_root(QString const& identity, std::weak_ptr<Account> const& account);
1942-
1943-protected:
1944- std::weak_ptr<Account> account_;
1945-
1946- friend class remote_client::CopyHandler;
1947- friend class remote_client::ItemImpl; // TODO: probably no longer needed
1948- friend class remote_client::LookupHandler;
1949- friend class remote_client::MetadataHandler;
1950-};
1951-
1952-} // namespace internal
1953-} // namespace client
1954-} // namespace qt
1955-} // namespace storage
1956-} // namespace unity
1957
1958=== removed file 'include/unity/storage/qt/client/internal/RuntimeBase.h'
1959--- include/unity/storage/qt/client/internal/RuntimeBase.h 2016-08-11 23:55:40 +0000
1960+++ include/unity/storage/qt/client/internal/RuntimeBase.h 1970-01-01 00:00:00 +0000
1961@@ -1,74 +0,0 @@
1962-/*
1963- * Copyright (C) 2016 Canonical Ltd
1964- *
1965- * This program is free software: you can redistribute it and/or modify
1966- * it under the terms of the GNU Lesser General Public License version 3 as
1967- * published by the Free Software Foundation.
1968- *
1969- * This program is distributed in the hope that it will be useful,
1970- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1971- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1972- * GNU Lesser General Public License for more details.
1973- *
1974- * You should have received a copy of the GNU Lesser General Public License
1975- * along with this program. If not, see <http://www.gnu.org/licenses/>.
1976- *
1977- * Authors: Michi Henning <michi.henning@canonical.com>
1978- */
1979-
1980-#pragma once
1981-
1982-#pragma GCC diagnostic push
1983-#pragma GCC diagnostic ignored "-Wcast-align"
1984-#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
1985-#include <QFuture>
1986-#pragma GCC diagnostic pop
1987-#include <QVector>
1988-
1989-#include <memory>
1990-
1991-namespace unity
1992-{
1993-namespace storage
1994-{
1995-namespace qt
1996-{
1997-namespace client
1998-{
1999-
2000-class Account;
2001-class Runtime;
2002-
2003-namespace internal
2004-{
2005-
2006-class AccountBase;
2007-
2008-class RuntimeBase : public QObject
2009-{
2010-public:
2011- RuntimeBase() = default;
2012- virtual ~RuntimeBase() = default;
2013- RuntimeBase(RuntimeBase const&) = delete;
2014- RuntimeBase& operator=(RuntimeBase const&) = delete;
2015-
2016- virtual void shutdown() = 0;
2017- virtual QFuture<QVector<std::shared_ptr<Account>>> accounts() = 0;
2018- virtual std::shared_ptr<Account> make_test_account(QString const& bus_name,
2019- QString const& object_path) = 0;
2020-
2021- void set_public_instance(std::weak_ptr<Runtime> p);
2022-
2023-protected:
2024- bool destroyed_ = false;
2025- QVector<std::shared_ptr<Account>> accounts_;
2026- std::weak_ptr<Runtime> public_instance_; // Immutable once set
2027-
2028- friend class unity::storage::qt::client::internal::AccountBase;
2029-};
2030-
2031-} // namespace internal
2032-} // namespace client
2033-} // namespace qt
2034-} // namespace storage
2035-} // namespace unity
2036
2037=== removed file 'include/unity/storage/qt/client/internal/UploaderBase.h'
2038--- include/unity/storage/qt/client/internal/UploaderBase.h 2016-08-03 03:20:39 +0000
2039+++ include/unity/storage/qt/client/internal/UploaderBase.h 1970-01-01 00:00:00 +0000
2040@@ -1,69 +0,0 @@
2041-/*
2042- * Copyright (C) 2016 Canonical Ltd
2043- *
2044- * This program is free software: you can redistribute it and/or modify
2045- * it under the terms of the GNU Lesser General Public License version 3 as
2046- * published by the Free Software Foundation.
2047- *
2048- * This program is distributed in the hope that it will be useful,
2049- * but WITHOUT ANY WARRANTY; without even the implied warranty of
2050- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2051- * GNU Lesser General Public License for more details.
2052- *
2053- * You should have received a copy of the GNU Lesser General Public License
2054- * along with this program. If not, see <http://www.gnu.org/licenses/>.
2055- *
2056- * Authors: Michi Henning <michi.henning@canonical.com>
2057- */
2058-
2059-#pragma once
2060-
2061-#include <unity/storage/common.h>
2062-
2063-#pragma GCC diagnostic push
2064-#pragma GCC diagnostic ignored "-Wcast-align"
2065-#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
2066-#include <QFuture>
2067-#pragma GCC diagnostic pop
2068-
2069-#include <memory>
2070-
2071-class QLocalSocket;
2072-
2073-namespace unity
2074-{
2075-namespace storage
2076-{
2077-namespace qt
2078-{
2079-namespace client
2080-{
2081-
2082-class File;
2083-
2084-namespace internal
2085-{
2086-
2087-class UploaderBase : public QObject
2088-{
2089-public:
2090- UploaderBase(ConflictPolicy policy, int64_t size);
2091- UploaderBase(UploaderBase&) = delete;
2092- UploaderBase& operator=(UploaderBase const&) = delete;
2093-
2094- virtual std::shared_ptr<QLocalSocket> socket() const = 0;
2095- virtual QFuture<std::shared_ptr<File>> finish_upload() = 0;
2096- virtual QFuture<void> cancel() noexcept = 0;
2097-
2098- int64_t size() const;
2099-
2100-protected:
2101- ConflictPolicy policy_;
2102- int64_t size_;
2103-};
2104-
2105-} // namespace internal
2106-} // namespace client
2107-} // namespace qt
2108-} // namespace storage
2109-} // namespace unity
2110
2111=== removed directory 'include/unity/storage/qt/client/internal/local_client'
2112=== removed file 'include/unity/storage/qt/client/internal/local_client/AccountImpl.h'
2113--- include/unity/storage/qt/client/internal/local_client/AccountImpl.h 2016-07-13 04:19:12 +0000
2114+++ include/unity/storage/qt/client/internal/local_client/AccountImpl.h 1970-01-01 00:00:00 +0000
2115@@ -1,61 +0,0 @@
2116-/*
2117- * Copyright (C) 2016 Canonical Ltd
2118- *
2119- * This program is free software: you can redistribute it and/or modify
2120- * it under the terms of the GNU Lesser General Public License version 3 as
2121- * published by the Free Software Foundation.
2122- *
2123- * This program is distributed in the hope that it will be useful,
2124- * but WITHOUT ANY WARRANTY; without even the implied warranty of
2125- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2126- * GNU Lesser General Public License for more details.
2127- *
2128- * You should have received a copy of the GNU Lesser General Public License
2129- * along with this program. If not, see <http://www.gnu.org/licenses/>.
2130- *
2131- * Authors: Michi Henning <michi.henning@canonical.com>
2132- */
2133-
2134-#pragma once
2135-
2136-#include <unity/storage/qt/client/internal/AccountBase.h>
2137-
2138-namespace unity
2139-{
2140-namespace storage
2141-{
2142-namespace qt
2143-{
2144-namespace client
2145-{
2146-namespace internal
2147-{
2148-namespace local_client
2149-{
2150-
2151-class AccountImpl : public virtual AccountBase
2152-{
2153-public:
2154- AccountImpl(std::weak_ptr<Runtime> const& runtime,
2155- QString const& owner,
2156- QString const& owner_id,
2157- QString const& description);
2158-
2159- virtual QString owner() const override;
2160- virtual QString owner_id() const override;
2161- virtual QString description() const override;
2162- virtual QFuture<QVector<std::shared_ptr<Root>>> roots() override;
2163-
2164-private:
2165- QString owner_; // Immutable
2166- QString owner_id_; // Immutable
2167- QString description_; // Immutable
2168- QVector<std::shared_ptr<Root>> roots_; // Immutable
2169-};
2170-
2171-} // namespace local_client
2172-} // namespace internal
2173-} // namespace client
2174-} // namespace qt
2175-} // namespace storage
2176-} // namespace unity
2177
2178=== removed file 'include/unity/storage/qt/client/internal/local_client/DownloaderImpl.h'
2179--- include/unity/storage/qt/client/internal/local_client/DownloaderImpl.h 2016-07-18 05:14:09 +0000
2180+++ include/unity/storage/qt/client/internal/local_client/DownloaderImpl.h 1970-01-01 00:00:00 +0000
2181@@ -1,120 +0,0 @@
2182-/*
2183- * Copyright (C) 2016 Canonical Ltd
2184- *
2185- * This program is free software: you can redistribute it and/or modify
2186- * it under the terms of the GNU Lesser General Public License version 3 as
2187- * published by the Free Software Foundation.
2188- *
2189- * This program is distributed in the hope that it will be useful,
2190- * but WITHOUT ANY WARRANTY; without even the implied warranty of
2191- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2192- * GNU Lesser General Public License for more details.
2193- *
2194- * You should have received a copy of the GNU Lesser General Public License
2195- * along with this program. If not, see <http://www.gnu.org/licenses/>.
2196- *
2197- * Authors: Michi Henning <michi.henning@canonical.com>
2198- */
2199-
2200-#pragma once
2201-
2202-#include <unity/storage/qt/client/internal/DownloaderBase.h>
2203-
2204-#include <QFile>
2205-#include <QThread>
2206-
2207-class QLocalSocket;
2208-
2209-namespace unity
2210-{
2211-namespace storage
2212-{
2213-namespace qt
2214-{
2215-namespace client
2216-{
2217-namespace internal
2218-{
2219-namespace local_client
2220-{
2221-
2222-class DownloadWorker : public QObject
2223-{
2224- Q_OBJECT
2225-
2226-public:
2227- DownloadWorker(int write_fd,
2228- QString const& filename,
2229- QFutureInterface<void>& qf,
2230- QFutureInterface<void>& worker_initialized);
2231- void start_downloading() noexcept;
2232-
2233-public Q_SLOTS:
2234- void do_finish();
2235- void do_cancel();
2236-
2237-private Q_SLOTS:
2238- void on_bytes_written(qint64 bytes);
2239- void on_disconnected();
2240- void on_error();
2241-
2242-private:
2243- void read_and_write_chunk();
2244- void handle_error(QString const& msg, int error_code);
2245-
2246- enum State { in_progress, finalized, cancelled, error };
2247-
2248- State state_ = in_progress;
2249- int write_fd_;
2250- std::shared_ptr<QLocalSocket> write_socket_;
2251- QString filename_;
2252- std::unique_ptr<QFile> input_file_;
2253- QFutureInterface<void>& qf_;
2254- QFutureInterface<void>& worker_initialized_;
2255- qint64 bytes_to_write_;
2256- QString error_msg_;
2257- int error_code_ = 0;
2258-};
2259-
2260-class DownloadThread : public QThread
2261-{
2262- Q_OBJECT
2263-
2264-public:
2265- DownloadThread(DownloadWorker* worker);
2266- virtual void run() override;
2267-
2268-private:
2269- DownloadWorker* worker_;
2270-};
2271-
2272-class DownloaderImpl : public DownloaderBase
2273-{
2274- Q_OBJECT
2275-
2276-public:
2277- DownloaderImpl(std::weak_ptr<File> file);
2278- virtual ~DownloaderImpl();
2279-
2280- std::shared_ptr<File> file() const override;
2281- std::shared_ptr<QLocalSocket> socket() const override;
2282- QFuture<void> finish_download() override;
2283- QFuture<void> cancel() noexcept override;
2284-
2285-Q_SIGNALS:
2286- void do_finish();
2287- void do_cancel();
2288-
2289-private:
2290- std::shared_ptr<QLocalSocket> read_socket_;
2291- QFutureInterface<void> qf_;
2292- std::unique_ptr<DownloadThread> download_thread_;
2293- std::unique_ptr<DownloadWorker> worker_;
2294-};
2295-
2296-} // namespace local_client
2297-} // namespace internal
2298-} // namespace client
2299-} // namespace qt
2300-} // namespace storage
2301-} // namespace unity
2302
2303=== removed file 'include/unity/storage/qt/client/internal/local_client/FileImpl.h'
2304--- include/unity/storage/qt/client/internal/local_client/FileImpl.h 2016-07-14 00:17:14 +0000
2305+++ include/unity/storage/qt/client/internal/local_client/FileImpl.h 1970-01-01 00:00:00 +0000
2306@@ -1,55 +0,0 @@
2307-/*
2308- * Copyright (C) 2016 Canonical Ltd
2309- *
2310- * This program is free software: you can redistribute it and/or modify
2311- * it under the terms of the GNU Lesser General Public License version 3 as
2312- * published by the Free Software Foundation.
2313- *
2314- * This program is distributed in the hope that it will be useful,
2315- * but WITHOUT ANY WARRANTY; without even the implied warranty of
2316- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2317- * GNU Lesser General Public License for more details.
2318- *
2319- * You should have received a copy of the GNU Lesser General Public License
2320- * along with this program. If not, see <http://www.gnu.org/licenses/>.
2321- *
2322- * Authors: Michi Henning <michi.henning@canonical.com>
2323- */
2324-
2325-#pragma once
2326-
2327-#include <unity/storage/qt/client/internal/FileBase.h>
2328-#include <unity/storage/qt/client/internal/local_client/ItemImpl.h>
2329-
2330-namespace unity
2331-{
2332-namespace storage
2333-{
2334-namespace qt
2335-{
2336-namespace client
2337-{
2338-namespace internal
2339-{
2340-namespace local_client
2341-{
2342-
2343-class FileImpl : public virtual FileBase, public virtual ItemImpl
2344-{
2345-public:
2346- FileImpl(QString const& identity);
2347-
2348- virtual QString name() const override;
2349- virtual int64_t size() const override;
2350- virtual QFuture<std::shared_ptr<Uploader>> create_uploader(ConflictPolicy policy, int64_t size) override;
2351- virtual QFuture<std::shared_ptr<Downloader>> create_downloader() override;
2352-
2353- static std::shared_ptr<File> make_file(QString const& identity, std::weak_ptr<Root> root);
2354-};
2355-
2356-} // namespace local_client
2357-} // namespace internal
2358-} // namespace client
2359-} // namespace qt
2360-} // namespace storage
2361-} // namespace unity
2362
2363=== removed file 'include/unity/storage/qt/client/internal/local_client/FolderImpl.h'
2364--- include/unity/storage/qt/client/internal/local_client/FolderImpl.h 2016-07-25 03:45:41 +0000
2365+++ include/unity/storage/qt/client/internal/local_client/FolderImpl.h 1970-01-01 00:00:00 +0000
2366@@ -1,57 +0,0 @@
2367-/*
2368- * Copyright (C) 2016 Canonical Ltd
2369- *
2370- * This program is free software: you can redistribute it and/or modify
2371- * it under the terms of the GNU Lesser General Public License version 3 as
2372- * published by the Free Software Foundation.
2373- *
2374- * This program is distributed in the hope that it will be useful,
2375- * but WITHOUT ANY WARRANTY; without even the implied warranty of
2376- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2377- * GNU Lesser General Public License for more details.
2378- *
2379- * You should have received a copy of the GNU Lesser General Public License
2380- * along with this program. If not, see <http://www.gnu.org/licenses/>.
2381- *
2382- * Authors: Michi Henning <michi.henning@canonical.com>
2383- */
2384-
2385-#pragma once
2386-
2387-#include <unity/storage/qt/client/internal/FolderBase.h>
2388-#include <unity/storage/qt/client/internal/local_client/ItemImpl.h>
2389-
2390-namespace unity
2391-{
2392-namespace storage
2393-{
2394-namespace qt
2395-{
2396-namespace client
2397-{
2398-namespace internal
2399-{
2400-namespace local_client
2401-{
2402-
2403-class FolderImpl : public virtual FolderBase, public virtual ItemImpl
2404-{
2405-public:
2406- FolderImpl(QString const& identity);
2407- FolderImpl(QString const& identity, ItemType type);
2408-
2409- virtual QString name() const override;
2410- QFuture<QVector<std::shared_ptr<Item>>> list() const override;
2411- QFuture<QVector<std::shared_ptr<Item>>> lookup(QString const& name) const override;
2412- QFuture<std::shared_ptr<Folder>> create_folder(QString const& name) override;
2413- QFuture<std::shared_ptr<Uploader>> create_file(QString const& name, int64_t size) override;
2414-
2415- static std::shared_ptr<Folder> make_folder(QString const& identity, std::weak_ptr<Root> root);
2416-};
2417-
2418-} // namespace local_client
2419-} // namespace internal
2420-} // namespace client
2421-} // namespace qt
2422-} // namespace storage
2423-} // namespace unity
2424
2425=== removed file 'include/unity/storage/qt/client/internal/local_client/ItemImpl.h'
2426--- include/unity/storage/qt/client/internal/local_client/ItemImpl.h 2016-08-02 04:29:06 +0000
2427+++ include/unity/storage/qt/client/internal/local_client/ItemImpl.h 1970-01-01 00:00:00 +0000
2428@@ -1,86 +0,0 @@
2429-/*
2430- * Copyright (C) 2016 Canonical Ltd
2431- *
2432- * This program is free software: you can redistribute it and/or modify
2433- * it under the terms of the GNU Lesser General Public License version 3 as
2434- * published by the Free Software Foundation.
2435- *
2436- * This program is distributed in the hope that it will be useful,
2437- * but WITHOUT ANY WARRANTY; without even the implied warranty of
2438- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2439- * GNU Lesser General Public License for more details.
2440- *
2441- * You should have received a copy of the GNU Lesser General Public License
2442- * along with this program. If not, see <http://www.gnu.org/licenses/>.
2443- *
2444- * Authors: Michi Henning <michi.henning@canonical.com>
2445- */
2446-
2447-#pragma once
2448-
2449-#include <unity/storage/common.h>
2450-#include <unity/storage/qt/client/Exceptions.h>
2451-#include <unity/storage/qt/client/internal/ItemBase.h>
2452-#include <unity/storage/qt/client/internal/local_client/boost_filesystem.h>
2453-
2454-#include <mutex>
2455-
2456-namespace unity
2457-{
2458-namespace storage
2459-{
2460-namespace qt
2461-{
2462-namespace client
2463-{
2464-namespace internal
2465-{
2466-
2467-class MetadataImpl;
2468-
2469-namespace local_client
2470-{
2471-
2472-class ItemImpl : public virtual ItemBase
2473-{
2474-public:
2475- ItemImpl(QString const& identity, ItemType type);
2476- virtual ~ItemImpl();
2477-
2478- virtual QString etag() const override;
2479- virtual QVariantMap metadata() const override;
2480- virtual QDateTime last_modified_time() const override;
2481- virtual QFuture<std::shared_ptr<Item>> copy(std::shared_ptr<Folder> const& new_parent, QString const& new_name) override;
2482- virtual QFuture<std::shared_ptr<Item>> move(std::shared_ptr<Folder> const& new_parent, QString const& new_name) override;
2483- virtual QFuture<QVector<std::shared_ptr<Folder>>> parents() const override;
2484- virtual QVector<QString> parent_ids() const override;
2485- virtual QFuture<void> delete_item() override;
2486-
2487- virtual QDateTime creation_time() const override;
2488- virtual MetadataMap native_metadata() const override;
2489-
2490- virtual bool equal_to(ItemBase const& other) const noexcept override;
2491-
2492- void set_timestamps() noexcept;
2493- bool has_conflict() const noexcept;
2494-
2495-protected:
2496- static boost::filesystem::path sanitize(QString const& name, QString const& method);
2497- static bool is_reserved_path(boost::filesystem::path const& path) noexcept;
2498-
2499- QString name_;
2500- QString etag_;
2501- QDateTime modified_time_;
2502- QVariantMap metadata_;
2503- std::recursive_mutex mutable mutex_;
2504-
2505-private:
2506- static void copy_recursively(boost::filesystem::path const& source, boost::filesystem::path const& target);
2507-};
2508-
2509-} // namespace local_client
2510-} // namespace internal
2511-} // namespace client
2512-} // namespace qt
2513-} // namespace storage
2514-} // namespace unity
2515
2516=== removed file 'include/unity/storage/qt/client/internal/local_client/RootImpl.h'
2517--- include/unity/storage/qt/client/internal/local_client/RootImpl.h 2016-07-12 02:22:05 +0000
2518+++ include/unity/storage/qt/client/internal/local_client/RootImpl.h 1970-01-01 00:00:00 +0000
2519@@ -1,59 +0,0 @@
2520-/*
2521- * Copyright (C) 2016 Canonical Ltd
2522- *
2523- * This program is free software: you can redistribute it and/or modify
2524- * it under the terms of the GNU Lesser General Public License version 3 as
2525- * published by the Free Software Foundation.
2526- *
2527- * This program is distributed in the hope that it will be useful,
2528- * but WITHOUT ANY WARRANTY; without even the implied warranty of
2529- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2530- * GNU Lesser General Public License for more details.
2531- *
2532- * You should have received a copy of the GNU Lesser General Public License
2533- * along with this program. If not, see <http://www.gnu.org/licenses/>.
2534- *
2535- * Authors: Michi Henning <michi.henning@canonical.com>
2536- */
2537-
2538-#pragma once
2539-
2540-#include <unity/storage/qt/client/internal/RootBase.h>
2541-#include <unity/storage/qt/client/internal/local_client/FolderImpl.h>
2542-
2543-namespace unity
2544-{
2545-namespace storage
2546-{
2547-namespace qt
2548-{
2549-namespace client
2550-{
2551-namespace internal
2552-{
2553-namespace local_client
2554-{
2555-
2556-class RootImpl : public virtual RootBase, public virtual FolderImpl
2557-{
2558-public:
2559- RootImpl(QString const& identity, std::weak_ptr<Account> const& account);
2560-
2561- virtual QString name() const override;
2562- virtual QFuture<QVector<std::shared_ptr<Folder>>> parents() const override;
2563- virtual QVector<QString> parent_ids() const override;
2564- virtual QFuture<void> delete_item() override;
2565-
2566- virtual QFuture<int64_t> free_space_bytes() const override;
2567- virtual QFuture<int64_t> used_space_bytes() const override;
2568- virtual QFuture<Item::SPtr> get(QString native_identity) const override;
2569-
2570- static std::shared_ptr<Root> make_root(QString const& identity, std::weak_ptr<Account> const& account);
2571-};
2572-
2573-} // namespace local_client
2574-} // namespace internal
2575-} // namespace client
2576-} // namespace qt
2577-} // namespace storage
2578-} // namespace unity
2579
2580=== removed file 'include/unity/storage/qt/client/internal/local_client/RuntimeImpl.h'
2581--- include/unity/storage/qt/client/internal/local_client/RuntimeImpl.h 2016-08-11 23:55:40 +0000
2582+++ include/unity/storage/qt/client/internal/local_client/RuntimeImpl.h 1970-01-01 00:00:00 +0000
2583@@ -1,53 +0,0 @@
2584-/*
2585- * Copyright (C) 2016 Canonical Ltd
2586- *
2587- * This program is free software: you can redistribute it and/or modify
2588- * it under the terms of the GNU Lesser General Public License version 3 as
2589- * published by the Free Software Foundation.
2590- *
2591- * This program is distributed in the hope that it will be useful,
2592- * but WITHOUT ANY WARRANTY; without even the implied warranty of
2593- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2594- * GNU Lesser General Public License for more details.
2595- *
2596- * You should have received a copy of the GNU Lesser General Public License
2597- * along with this program. If not, see <http://www.gnu.org/licenses/>.
2598- *
2599- * Authors: Michi Henning <michi.henning@canonical.com>
2600- */
2601-
2602-#pragma once
2603-
2604-#include <unity/storage/qt/client/internal/RuntimeBase.h>
2605-
2606-namespace unity
2607-{
2608-namespace storage
2609-{
2610-namespace qt
2611-{
2612-namespace client
2613-{
2614-namespace internal
2615-{
2616-namespace local_client
2617-{
2618-
2619-class RuntimeImpl : public virtual RuntimeBase
2620-{
2621-public:
2622- RuntimeImpl();
2623- virtual ~RuntimeImpl();
2624-
2625- virtual void shutdown() override;
2626- virtual QFuture<QVector<std::shared_ptr<Account>>> accounts() override;
2627- virtual std::shared_ptr<Account> make_test_account(QString const& bus_name,
2628- QString const& object_path) override;
2629-};
2630-
2631-} // namespace local_client
2632-} // namespace internal
2633-} // namespace client
2634-} // namespace qt
2635-} // namespace storage
2636-} // namespace unity
2637
2638=== removed file 'include/unity/storage/qt/client/internal/local_client/UploaderImpl.h'
2639--- include/unity/storage/qt/client/internal/local_client/UploaderImpl.h 2016-07-29 05:56:42 +0000
2640+++ include/unity/storage/qt/client/internal/local_client/UploaderImpl.h 1970-01-01 00:00:00 +0000
2641@@ -1,141 +0,0 @@
2642-/*
2643- * Copyright (C) 2016 Canonical Ltd
2644- *
2645- * This program is free software: you can redistribute it and/or modify
2646- * it under the terms of the GNU Lesser General Public License version 3 as
2647- * published by the Free Software Foundation.
2648- *
2649- * This program is distributed in the hope that it will be useful,
2650- * but WITHOUT ANY WARRANTY; without even the implied warranty of
2651- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2652- * GNU Lesser General Public License for more details.
2653- *
2654- * You should have received a copy of the GNU Lesser General Public License
2655- * along with this program. If not, see <http://www.gnu.org/licenses/>.
2656- *
2657- * Authors: Michi Henning <michi.henning@canonical.com>
2658- */
2659-
2660-#pragma once
2661-
2662-#include <unity/storage/qt/client/internal/UploaderBase.h>
2663-
2664-#include <QFile>
2665-#include <QFutureInterface>
2666-#include <QThread>
2667-#include <unity/util/ResourcePtr.h>
2668-
2669-class QLocalSocket;
2670-
2671-namespace unity
2672-{
2673-namespace storage
2674-{
2675-namespace qt
2676-{
2677-namespace client
2678-{
2679-
2680-class File;
2681-class Root;
2682-
2683-namespace internal
2684-{
2685-namespace local_client
2686-{
2687-
2688-class UploadWorker : public QObject
2689-{
2690- Q_OBJECT
2691-
2692-public:
2693- UploadWorker(int read_fd,
2694- std::weak_ptr<File> file,
2695- int64_t size,
2696- QString const& path,
2697- ConflictPolicy policy,
2698- std::weak_ptr<Root> root,
2699- QFutureInterface<std::shared_ptr<File>>& qf,
2700- QFutureInterface<void>& worker_initialized);
2701- virtual ~UploadWorker();
2702-
2703- void start_uploading() noexcept;
2704-
2705-public Q_SLOTS:
2706- void do_finish();
2707- void do_cancel();
2708-
2709-private Q_SLOTS:
2710- void on_bytes_ready();
2711- void on_read_channel_finished();
2712-
2713-private:
2714- void read_and_write_chunk();
2715- void finalize();
2716- void handle_error(QString const& msg, int error_code);
2717-
2718- enum State { in_progress, finalized, cancelled, error };
2719-
2720- State state_ = in_progress;
2721- int read_fd_;
2722- std::shared_ptr<QLocalSocket> read_socket_;
2723- std::weak_ptr<File> file_;
2724- int64_t size_;
2725- int64_t bytes_read_;
2726- QString path_;
2727- std::weak_ptr<Root> root_;
2728- std::unique_ptr<QFile> output_file_;
2729- unity::util::ResourcePtr<int, std::function<void(int)>> tmp_fd_;
2730- ConflictPolicy policy_;
2731- QFutureInterface<std::shared_ptr<File>>& qf_;
2732- QFutureInterface<void>& worker_initialized_;
2733- QString error_msg_;
2734- int error_code_ = 0;
2735- bool use_linkat_ = true;
2736-};
2737-
2738-class UploadThread : public QThread
2739-{
2740- Q_OBJECT
2741-
2742-public:
2743- UploadThread(UploadWorker* worker);
2744- virtual void run() override;
2745-
2746-private:
2747- UploadWorker* worker_;
2748-};
2749-
2750-class UploaderImpl : public UploaderBase
2751-{
2752- Q_OBJECT
2753-
2754-public:
2755- UploaderImpl(std::weak_ptr<File> file,
2756- int64_t size,
2757- QString const& path,
2758- ConflictPolicy policy,
2759- std::weak_ptr<Root> root);
2760- virtual ~UploaderImpl();
2761-
2762- virtual std::shared_ptr<QLocalSocket> socket() const override;
2763- virtual QFuture<std::shared_ptr<File>> finish_upload() override;
2764- virtual QFuture<void> cancel() noexcept override;
2765-
2766-Q_SIGNALS:
2767- void do_finish();
2768- void do_cancel();
2769-
2770-private:
2771- std::shared_ptr<QLocalSocket> write_socket_;
2772- QFutureInterface<std::shared_ptr<File>> qf_;
2773- std::unique_ptr<UploadThread> upload_thread_;
2774- std::unique_ptr<UploadWorker> worker_;
2775-};
2776-
2777-} // namespace local_client
2778-} // namespace internal
2779-} // namespace client
2780-} // namespace qt
2781-} // namespace storage
2782-} // namespace unity
2783
2784=== removed file 'include/unity/storage/qt/client/internal/local_client/boost_filesystem.h'
2785--- include/unity/storage/qt/client/internal/local_client/boost_filesystem.h 2016-07-27 02:19:17 +0000
2786+++ include/unity/storage/qt/client/internal/local_client/boost_filesystem.h 1970-01-01 00:00:00 +0000
2787@@ -1,29 +0,0 @@
2788-/*
2789- * Copyright (C) 2016 Canonical Ltd
2790- *
2791- * This program is free software: you can redistribute it and/or modify
2792- * it under the terms of the GNU Lesser General Public License version 3 as
2793- * published by the Free Software Foundation.
2794- *
2795- * This program is distributed in the hope that it will be useful,
2796- * but WITHOUT ANY WARRANTY; without even the implied warranty of
2797- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2798- * GNU Lesser General Public License for more details.
2799- *
2800- * You should have received a copy of the GNU Lesser General Public License
2801- * along with this program. If not, see <http://www.gnu.org/licenses/>.
2802- *
2803- * Authors: Michi Henning <michi.henning@canonical.com>
2804- */
2805-
2806-#pragma once
2807-
2808-#include <boost/version.hpp>
2809-
2810-#if BOOST_VERSION < 105600
2811- #define BOOST_NO_CXX11_SCOPED_ENUMS
2812- #include <boost/filesystem.hpp>
2813- #undef BOOST_NO_CXX11_SCOPED_ENUMS
2814-#else
2815- #include <boost/filesystem.hpp>
2816-#endif
2817
2818=== removed file 'include/unity/storage/qt/client/internal/local_client/storage_exception.h'
2819--- include/unity/storage/qt/client/internal/local_client/storage_exception.h 2016-08-02 05:27:00 +0000
2820+++ include/unity/storage/qt/client/internal/local_client/storage_exception.h 1970-01-01 00:00:00 +0000
2821@@ -1,94 +0,0 @@
2822-/*
2823- * Copyright (C) 2016 Canonical Ltd
2824- *
2825- * This program is free software: you can redistribute it and/or modify
2826- * it under the terms of the GNU Lesser General Public License version 3 as
2827- * published by the Free Software Foundation.
2828- *
2829- * This program is distributed in the hope that it will be useful,
2830- * but WITHOUT ANY WARRANTY; without even the implied warranty of
2831- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2832- * GNU Lesser General Public License for more details.
2833- *
2834- * You should have received a copy of the GNU Lesser General Public License
2835- * along with this program. If not, see <http://www.gnu.org/licenses/>.
2836- *
2837- * Authors: Michi Henning <michi.henning@canonical.com>
2838- */
2839-
2840-#pragma once
2841-
2842-#include <unity/storage/qt/client/Exceptions.h>
2843-#include <unity/storage/qt/client/internal/local_client/boost_filesystem.h>
2844-
2845-#pragma GCC diagnostic push
2846-#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
2847-#pragma GCC diagnostic ignored "-Wcast-align"
2848-#include <QFuture>
2849-#pragma GCC diagnostic pop
2850-#include <QFutureInterface>
2851-
2852-class QString;
2853-
2854-namespace unity
2855-{
2856-namespace storage
2857-{
2858-namespace qt
2859-{
2860-namespace client
2861-{
2862-namespace internal
2863-{
2864-namespace local_client
2865-{
2866-
2867-void throw_storage_exception(QString const& method,
2868- std::exception_ptr ep) __attribute__ ((noreturn));
2869-
2870-void throw_storage_exception(QString const& method,
2871- std::exception_ptr ep,
2872- QString const& key) __attribute__ ((noreturn));
2873-
2874-template<typename T>
2875-QFuture<T> make_exceptional_future(QString const& method, std::exception_ptr ep)
2876-{
2877- try
2878- {
2879- throw_storage_exception(method, ep);
2880- }
2881- catch (StorageException const& e)
2882- {
2883- QFutureInterface<T> qf;
2884- qf.reportException(e);
2885- qf.reportFinished();
2886- return qf.future();
2887- }
2888- abort(); // Impossible. // LCOV_EXCL_LINE
2889-}
2890-
2891-template<typename T>
2892-QFuture<T> make_exceptional_future(QString const& method,
2893- std::exception_ptr ep,
2894- QString const& key)
2895-{
2896- try
2897- {
2898- throw_storage_exception(method, ep, key);
2899- }
2900- catch (StorageException const& e)
2901- {
2902- QFutureInterface<T> qf;
2903- qf.reportException(e);
2904- qf.reportFinished();
2905- return qf.future();
2906- }
2907- abort(); // Impossible. // LCOV_EXCL_LINE
2908-}
2909-
2910-} // namespace local_client
2911-} // namespace internal
2912-} // namespace client
2913-} // namespace qt
2914-} // namespace storage
2915-} // namespace unity
2916
2917=== removed file 'include/unity/storage/qt/client/internal/local_client/tmpfile_prefix.h'
2918--- include/unity/storage/qt/client/internal/local_client/tmpfile_prefix.h 2016-08-02 05:27:00 +0000
2919+++ include/unity/storage/qt/client/internal/local_client/tmpfile_prefix.h 1970-01-01 00:00:00 +0000
2920@@ -1,21 +0,0 @@
2921-/*
2922- * Copyright (C) 2016 Canonical Ltd
2923- *
2924- * This program is free software: you can redistribute it and/or modify
2925- * it under the terms of the GNU Lesser General Public License version 3 as
2926- * published by the Free Software Foundation.
2927- *
2928- * This program is distributed in the hope that it will be useful,
2929- * but WITHOUT ANY WARRANTY; without even the implied warranty of
2930- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2931- * GNU Lesser General Public License for more details.
2932- *
2933- * You should have received a copy of the GNU Lesser General Public License
2934- * along with this program. If not, see <http://www.gnu.org/licenses/>.
2935- *
2936- * Authors: Michi Henning <michi.henning@canonical.com>
2937- */
2938-
2939-#pragma once
2940-
2941-#define TMPFILE_PREFIX ".storage-framework-"
2942
2943=== removed file 'include/unity/storage/qt/client/internal/make_future.h'
2944--- include/unity/storage/qt/client/internal/make_future.h 2016-08-26 04:45:56 +0000
2945+++ include/unity/storage/qt/client/internal/make_future.h 1970-01-01 00:00:00 +0000
2946@@ -1,85 +0,0 @@
2947-/*
2948- * Copyright (C) 2016 Canonical Ltd
2949- *
2950- * This program is free software: you can redistribute it and/or modify
2951- * it under the terms of the GNU Lesser General Public License version 3 as
2952- * published by the Free Software Foundation.
2953- *
2954- * This program is distributed in the hope that it will be useful,
2955- * but WITHOUT ANY WARRANTY; without even the implied warranty of
2956- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2957- * GNU Lesser General Public License for more details.
2958- *
2959- * You should have received a copy of the GNU Lesser General Public License
2960- * along with this program. If not, see <http://www.gnu.org/licenses/>.
2961- *
2962- * Authors: Michi Henning <michi.henning@canonical.com>
2963- */
2964-
2965-#pragma once
2966-
2967-#pragma GCC diagnostic push
2968-#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
2969-#pragma GCC diagnostic ignored "-Wcast-align"
2970-#include <QFuture>
2971-#pragma GCC diagnostic pop
2972-#include <QFutureInterface>
2973-
2974-namespace unity
2975-{
2976-namespace storage
2977-{
2978-namespace qt
2979-{
2980-namespace client
2981-{
2982-namespace internal
2983-{
2984-
2985-template<typename T>
2986-QFuture<T>
2987-__attribute__ ((warn_unused_result))
2988-make_ready_future(T const& val)
2989-{
2990- QFutureInterface<T> qf;
2991- qf.reportResult(val);
2992- qf.reportFinished();
2993- return qf.future();
2994-}
2995-
2996-template<typename T = void>
2997-QFuture<T>
2998-__attribute__ ((warn_unused_result))
2999-make_ready_future()
3000-{
3001- QFutureInterface<void> qf;
3002- return make_ready_future(qf);
3003-}
3004-
3005-template<typename E>
3006-QFuture<void>
3007-__attribute__
3008-((warn_unused_result)) make_exceptional_future(E const& ex)
3009-{
3010- QFutureInterface<void> qf;
3011- qf.reportException(ex);
3012- qf.reportFinished();
3013- return qf.future();
3014-}
3015-
3016-template<typename T, typename E>
3017-QFuture<T>
3018-__attribute__ ((warn_unused_result))
3019-make_exceptional_future(E const& ex)
3020-{
3021- QFutureInterface<T> qf;
3022- qf.reportException(ex);
3023- qf.reportFinished();
3024- return qf.future();
3025-}
3026-
3027-} // namespace internal
3028-} // namespace client
3029-} // namespace qt
3030-} // namespace storage
3031-} // namespace unity
3032
3033=== removed directory 'include/unity/storage/qt/client/internal/remote_client'
3034=== removed file 'include/unity/storage/qt/client/internal/remote_client/AccountImpl.h'
3035--- include/unity/storage/qt/client/internal/remote_client/AccountImpl.h 2016-08-11 07:34:49 +0000
3036+++ include/unity/storage/qt/client/internal/remote_client/AccountImpl.h 1970-01-01 00:00:00 +0000
3037@@ -1,68 +0,0 @@
3038-/*
3039- * Copyright (C) 2016 Canonical Ltd
3040- *
3041- * This program is free software: you can redistribute it and/or modify
3042- * it under the terms of the GNU Lesser General Public License version 3 as
3043- * published by the Free Software Foundation.
3044- *
3045- * This program is distributed in the hope that it will be useful,
3046- * but WITHOUT ANY WARRANTY; without even the implied warranty of
3047- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3048- * GNU Lesser General Public License for more details.
3049- *
3050- * You should have received a copy of the GNU Lesser General Public License
3051- * along with this program. If not, see <http://www.gnu.org/licenses/>.
3052- *
3053- * Authors: Michi Henning <michi.henning@canonical.com>
3054- */
3055-
3056-#pragma once
3057-
3058-#include <unity/storage/qt/client/internal/AccountBase.h>
3059-
3060-class ProviderInterface;
3061-
3062-namespace unity
3063-{
3064-namespace storage
3065-{
3066-namespace qt
3067-{
3068-namespace client
3069-{
3070-namespace internal
3071-{
3072-namespace remote_client
3073-{
3074-
3075-class AccountImpl : public QObject, public virtual AccountBase
3076-{
3077-public:
3078- AccountImpl(std::weak_ptr<Runtime> const& runtime,
3079- QString const& bus_name,
3080- QString const& object_path,
3081- QString const& owner,
3082- QString const& owner_id,
3083- QString const& description);
3084-
3085- virtual QString owner() const override;
3086- virtual QString owner_id() const override;
3087- virtual QString description() const override;
3088- virtual QFuture<QVector<std::shared_ptr<Root>>> roots() override;
3089-
3090- std::shared_ptr<ProviderInterface> provider() const noexcept;
3091-
3092-private:
3093- QString owner_;
3094- QString owner_id_;
3095- QString description_;
3096- QVector<std::shared_ptr<Root>> roots_;
3097- std::shared_ptr<ProviderInterface> provider_;
3098-};
3099-
3100-} // namespace remote_client
3101-} // namespace internal
3102-} // namespace client
3103-} // namespace qt
3104-} // namespace storage
3105-} // namespace unity
3106
3107=== removed file 'include/unity/storage/qt/client/internal/remote_client/DownloaderImpl.h'
3108--- include/unity/storage/qt/client/internal/remote_client/DownloaderImpl.h 2016-07-15 03:34:00 +0000
3109+++ include/unity/storage/qt/client/internal/remote_client/DownloaderImpl.h 1970-01-01 00:00:00 +0000
3110@@ -1,76 +0,0 @@
3111-/*
3112- * Copyright (C) 2016 Canonical Ltd
3113- *
3114- * This program is free software: you can redistribute it and/or modify
3115- * it under the terms of the GNU Lesser General Public License version 3 as
3116- * published by the Free Software Foundation.
3117- *
3118- * This program is distributed in the hope that it will be useful,
3119- * but WITHOUT ANY WARRANTY; without even the implied warranty of
3120- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3121- * GNU Lesser General Public License for more details.
3122- *
3123- * You should have received a copy of the GNU Lesser General Public License
3124- * along with this program. If not, see <http://www.gnu.org/licenses/>.
3125- *
3126- * Authors: Michi Henning <michi.henning@canonical.com>
3127- */
3128-
3129-#pragma once
3130-
3131-#include <unity/storage/qt/client/internal/DownloaderBase.h>
3132-
3133-#include <QDBusUnixFileDescriptor>
3134-
3135-class ProviderInterface;
3136-class QLocalSocket;
3137-
3138-namespace unity
3139-{
3140-namespace storage
3141-{
3142-namespace qt
3143-{
3144-namespace client
3145-{
3146-
3147-class Downloader;
3148-
3149-namespace internal
3150-{
3151-namespace remote_client
3152-{
3153-
3154-class DownloaderImpl : public DownloaderBase
3155-{
3156-public:
3157- DownloaderImpl(QString const& download_id,
3158- QDBusUnixFileDescriptor fd,
3159- std::shared_ptr<File> const& file,
3160- std::shared_ptr<ProviderInterface> const& provider);
3161- virtual ~DownloaderImpl();
3162-
3163- virtual std::shared_ptr<File> file() const override;
3164- virtual std::shared_ptr<QLocalSocket> socket() const override;
3165- virtual QFuture<void> finish_download() override;
3166- virtual QFuture<void> cancel() noexcept override;
3167-
3168- static std::shared_ptr<Downloader> make_downloader(QString const& upload_id,
3169- QDBusUnixFileDescriptor fd,
3170- std::shared_ptr<File> const& file,
3171- std::shared_ptr<ProviderInterface> const& provider);
3172-
3173-private:
3174- QString download_id_;
3175- QDBusUnixFileDescriptor fd_;
3176- std::shared_ptr<File> file_;
3177- std::shared_ptr<ProviderInterface> provider_;
3178- std::shared_ptr<QLocalSocket> read_socket_;
3179-};
3180-
3181-} // namespace remote_client
3182-} // namespace internal
3183-} // namespace client
3184-} // namespace qt
3185-} // namespace storage
3186-} // namespace unity
3187
3188=== removed file 'include/unity/storage/qt/client/internal/remote_client/FileImpl.h'
3189--- include/unity/storage/qt/client/internal/remote_client/FileImpl.h 2016-07-21 12:48:40 +0000
3190+++ include/unity/storage/qt/client/internal/remote_client/FileImpl.h 1970-01-01 00:00:00 +0000
3191@@ -1,61 +0,0 @@
3192-/*
3193- * Copyright (C) 2016 Canonical Ltd
3194- *
3195- * This program is free software: you can redistribute it and/or modify
3196- * it under the terms of the GNU Lesser General Public License version 3 as
3197- * published by the Free Software Foundation.
3198- *
3199- * This program is distributed in the hope that it will be useful,
3200- * but WITHOUT ANY WARRANTY; without even the implied warranty of
3201- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3202- * GNU Lesser General Public License for more details.
3203- *
3204- * You should have received a copy of the GNU Lesser General Public License
3205- * along with this program. If not, see <http://www.gnu.org/licenses/>.
3206- *
3207- * Authors: Michi Henning <michi.henning@canonical.com>
3208- */
3209-
3210-#pragma once
3211-
3212-#include <unity/storage/qt/client/internal/FileBase.h>
3213-#include <unity/storage/qt/client/internal/remote_client/ItemImpl.h>
3214-
3215-namespace unity
3216-{
3217-namespace storage
3218-{
3219-namespace internal
3220-{
3221-
3222-struct ItemMetadata;
3223-
3224-} // namespace internal
3225-
3226-namespace qt
3227-{
3228-namespace client
3229-{
3230-namespace internal
3231-{
3232-namespace remote_client
3233-{
3234-
3235-class FileImpl : public virtual FileBase, public virtual ItemImpl
3236-{
3237-public:
3238- FileImpl(storage::internal::ItemMetadata const& md);
3239-
3240- virtual int64_t size() const override;
3241- virtual QFuture<std::shared_ptr<Uploader>> create_uploader(ConflictPolicy policy, int64_t size) override;
3242- virtual QFuture<std::shared_ptr<Downloader>> create_downloader() override;
3243-
3244- static std::shared_ptr<File> make_file(storage::internal::ItemMetadata const& md, std::weak_ptr<Root> root);
3245-};
3246-
3247-} // namespace remote_client
3248-} // namespace internal
3249-} // namespace client
3250-} // namespace qt
3251-} // namespace storage
3252-} // namespace unity
3253
3254=== removed file 'include/unity/storage/qt/client/internal/remote_client/FolderImpl.h'
3255--- include/unity/storage/qt/client/internal/remote_client/FolderImpl.h 2016-07-14 00:17:14 +0000
3256+++ include/unity/storage/qt/client/internal/remote_client/FolderImpl.h 1970-01-01 00:00:00 +0000
3257@@ -1,56 +0,0 @@
3258-/*
3259- * Copyright (C) 2016 Canonical Ltd
3260- *
3261- * This program is free software: you can redistribute it and/or modify
3262- * it under the terms of the GNU Lesser General Public License version 3 as
3263- * published by the Free Software Foundation.
3264- *
3265- * This program is distributed in the hope that it will be useful,
3266- * but WITHOUT ANY WARRANTY; without even the implied warranty of
3267- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3268- * GNU Lesser General Public License for more details.
3269- *
3270- * You should have received a copy of the GNU Lesser General Public License
3271- * along with this program. If not, see <http://www.gnu.org/licenses/>.
3272- *
3273- * Authors: Michi Henning <michi.henning@canonical.com>
3274- */
3275-
3276-#pragma once
3277-
3278-#include <unity/storage/qt/client/internal/FolderBase.h>
3279-#include <unity/storage/qt/client/internal/remote_client/ItemImpl.h>
3280-
3281-namespace unity
3282-{
3283-namespace storage
3284-{
3285-namespace qt
3286-{
3287-namespace client
3288-{
3289-namespace internal
3290-{
3291-namespace remote_client
3292-{
3293-
3294-class FolderImpl : public virtual FolderBase, public virtual ItemImpl
3295-{
3296-public:
3297- FolderImpl(storage::internal::ItemMetadata const& md);
3298- FolderImpl(storage::internal::ItemMetadata const& md, ItemType type);
3299-
3300- QFuture<QVector<std::shared_ptr<Item>>> list() const override;
3301- QFuture<QVector<std::shared_ptr<Item>>> lookup(QString const& name) const override;
3302- QFuture<std::shared_ptr<Folder>> create_folder(QString const& name) override;
3303- QFuture<std::shared_ptr<Uploader>> create_file(QString const& name, int64_t size) override;
3304-
3305- static std::shared_ptr<Folder> make_folder(storage::internal::ItemMetadata const& md, std::weak_ptr<Root> root);
3306-};
3307-
3308-} // namespace remote_client
3309-} // namespace internal
3310-} // namespace client
3311-} // namespace qt
3312-} // namespace storage
3313-} // namespace unity
3314
3315=== removed file 'include/unity/storage/qt/client/internal/remote_client/Handler.h'
3316--- include/unity/storage/qt/client/internal/remote_client/Handler.h 2016-08-26 04:45:56 +0000
3317+++ include/unity/storage/qt/client/internal/remote_client/Handler.h 1970-01-01 00:00:00 +0000
3318@@ -1,134 +0,0 @@
3319-/*
3320- * Copyright (C) 2016 Canonical Ltd
3321- *
3322- * This program is free software: you can redistribute it and/or modify
3323- * it under the terms of the GNU Lesser General Public License version 3 as
3324- * published by the Free Software Foundation.
3325- *
3326- * This program is distributed in the hope that it will be useful,
3327- * but WITHOUT ANY WARRANTY; without even the implied warranty of
3328- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3329- * GNU Lesser General Public License for more details.
3330- *
3331- * You should have received a copy of the GNU Lesser General Public License
3332- * along with this program. If not, see <http://www.gnu.org/licenses/>.
3333- *
3334- * Authors: Michi Henning <michi.henning@canonical.com>
3335- */
3336-
3337-#pragma once
3338-
3339-#include <unity/storage/qt/client/Exceptions.h>
3340-#include <unity/storage/qt/client/internal/make_future.h>
3341-#include <unity/storage/qt/client/internal/remote_client/dbusmarshal.h>
3342-#include <unity/storage/qt/client/internal/remote_client/HandlerBase.h>
3343-
3344-#include <QDBusPendingReply>
3345-
3346-#include <cassert>
3347-
3348-namespace unity
3349-{
3350-namespace storage
3351-{
3352-namespace qt
3353-{
3354-namespace client
3355-{
3356-namespace internal
3357-{
3358-namespace remote_client
3359-{
3360-
3361-template<typename T>
3362-class Handler : public HandlerBase
3363-{
3364-public:
3365- template<typename ... DBusArgs>
3366- Handler(QObject* parent,
3367- QDBusPendingReply<DBusArgs...>& reply,
3368- std::function<void(decltype(reply)&, QFutureInterface<T>&)> closure);
3369-
3370- QFuture<T> future();
3371-
3372-private:
3373- QFutureInterface<T> qf_;
3374-};
3375-
3376-// TODO: HACK: The reply argument really should be passed by const reference, which also
3377-// would make the explicit conversion of the call to QDBusPendingReply<QDBusArgs...>
3378-// unnecessary. But this doesn't work with gcc 4.9: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60420
3379-// Once we get rid of Vivid, this should be changed back to
3380-//
3381-// Handler<T>::Handler(QObject* parent,
3382-// QDBusPendingReply<DBusArgs...> const& reply,
3383-// std::function<void(decltype(reply) const&, QFutureInterface<T>&)> closure)
3384-
3385-template<typename T>
3386-template<typename ... DBusArgs>
3387-Handler<T>::Handler(QObject* parent,
3388- QDBusPendingReply<DBusArgs...>& reply,
3389- std::function<void(decltype(reply)&, QFutureInterface<T>&)> closure)
3390- : HandlerBase(parent,
3391- reply,
3392- [this, closure](QDBusPendingCallWatcher& call)
3393- {
3394- if (call.isError())
3395- {
3396- try
3397- {
3398- auto ep = unmarshal_exception(call);
3399- std::rethrow_exception(ep);
3400- }
3401- // We catch some exceptions that are "surprising" so we can log those.
3402- catch (LocalCommsException const& e)
3403- {
3404- qCritical() << "provider exception:" << e.what();
3405- qf_.reportException(e);
3406- qf_.reportFinished();
3407- }
3408- catch (RemoteCommsException const& e)
3409- {
3410- qCritical() << "provider exception:" << e.what();
3411- qf_.reportException(e);
3412- qf_.reportFinished();
3413- }
3414- catch (ResourceException const& e)
3415- {
3416- qCritical() << "provider exception:" << e.what();
3417- qf_.reportException(e);
3418- qf_.reportFinished();
3419- }
3420- catch (StorageException const& e)
3421- {
3422- qf_.reportException(e);
3423- qf_.reportFinished();
3424- }
3425- // LCOV_EXCL_START
3426- catch (...)
3427- {
3428- abort(); // Impossible.
3429- }
3430- // LCOV_EXCL_STOP
3431- return;
3432- }
3433- // TODO: See HACK above. Should just be closure(call, qf_);
3434- QDBusPendingReply<DBusArgs...> r = call;
3435- closure(r, qf_);
3436- })
3437-{
3438- qf_.reportStarted();
3439-}
3440-
3441-template<typename T>
3442-QFuture<T> Handler<T>::future()
3443-{
3444- return qf_.future();
3445-}
3446-
3447-} // namespace remote_client
3448-} // namespace internal
3449-} // namespace client
3450-} // namespace qt
3451-} // namespace storage
3452-} // namespace unity
3453
3454=== removed file 'include/unity/storage/qt/client/internal/remote_client/HandlerBase.h'
3455--- include/unity/storage/qt/client/internal/remote_client/HandlerBase.h 2016-11-01 03:06:07 +0000
3456+++ include/unity/storage/qt/client/internal/remote_client/HandlerBase.h 1970-01-01 00:00:00 +0000
3457@@ -1,76 +0,0 @@
3458-/*
3459- * Copyright (C) 2016 Canonical Ltd
3460- *
3461- * This program is free software: you can redistribute it and/or modify
3462- * it under the terms of the GNU Lesser General Public License version 3 as
3463- * published by the Free Software Foundation.
3464- *
3465- * This program is distributed in the hope that it will be useful,
3466- * but WITHOUT ANY WARRANTY; without even the implied warranty of
3467- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3468- * GNU Lesser General Public License for more details.
3469- *
3470- * You should have received a copy of the GNU Lesser General Public License
3471- * along with this program. If not, see <http://www.gnu.org/licenses/>.
3472- *
3473- * Authors: Michi Henning <michi.henning@canonical.com>
3474- */
3475-
3476-#pragma once
3477-
3478-#pragma GCC diagnostic push
3479-#pragma GCC diagnostic ignored "-Wcast-align"
3480-#pragma GCC diagnostic ignored "-Wctor-dtor-privacy"
3481-#pragma GCC diagnostic ignored "-Wswitch-default"
3482-#include <QDBusPendingCallWatcher>
3483-#pragma GCC diagnostic pop
3484-#include <QObject>
3485-
3486-#include <functional>
3487-
3488-class QDBusPendingCall;
3489-
3490-namespace unity
3491-{
3492-namespace storage
3493-{
3494-namespace qt
3495-{
3496-namespace client
3497-{
3498-namespace internal
3499-{
3500-namespace remote_client
3501-{
3502-
3503-class HandlerBase : public QObject
3504-{
3505- Q_OBJECT
3506-
3507-public:
3508- // TODO: HACK: gcc 4.9 bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60420
3509- // Once we get rid of Vivid, this should be changed back to
3510- //
3511- // HandlerBase(QObject* parent,
3512- // QDBusPendingCall const& call,
3513- // std::function<void(QDBusPendingCallWatcher const&)> const& closure);
3514- HandlerBase(QObject* parent,
3515- QDBusPendingCall& call,
3516- std::function<void(QDBusPendingCallWatcher&)> const& closure);
3517-
3518-public Q_SLOTS:
3519- void finished(QDBusPendingCallWatcher* call);
3520-
3521-protected:
3522- QDBusPendingCallWatcher watcher_;
3523-
3524-private:
3525- std::function<void(QDBusPendingCallWatcher&)> closure_;
3526-};
3527-
3528-} // namespace remote_client
3529-} // namespace internal
3530-} // namespace client
3531-} // namespace qt
3532-} // namespace storage
3533-} // namespace unity
3534
3535=== removed file 'include/unity/storage/qt/client/internal/remote_client/ItemImpl.h'
3536--- include/unity/storage/qt/client/internal/remote_client/ItemImpl.h 2016-08-02 04:29:06 +0000
3537+++ include/unity/storage/qt/client/internal/remote_client/ItemImpl.h 1970-01-01 00:00:00 +0000
3538@@ -1,79 +0,0 @@
3539-/*
3540- * Copyright (C) 2016 Canonical Ltd
3541- *
3542- * This program is free software: you can redistribute it and/or modify
3543- * it under the terms of the GNU Lesser General Public License version 3 as
3544- * published by the Free Software Foundation.
3545- *
3546- * This program is distributed in the hope that it will be useful,
3547- * but WITHOUT ANY WARRANTY; without even the implied warranty of
3548- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3549- * GNU Lesser General Public License for more details.
3550- *
3551- * You should have received a copy of the GNU Lesser General Public License
3552- * along with this program. If not, see <http://www.gnu.org/licenses/>.
3553- *
3554- * Authors: Michi Henning <michi.henning@canonical.com>
3555- */
3556-
3557-#pragma once
3558-
3559-#include <unity/storage/internal/ItemMetadata.h>
3560-#include <unity/storage/qt/client/Exceptions.h>
3561-#include <unity/storage/qt/client/internal/ItemBase.h>
3562-
3563-#include <memory>
3564-
3565-class ProviderInterface;
3566-
3567-namespace unity
3568-{
3569-namespace storage
3570-{
3571-namespace qt
3572-{
3573-namespace client
3574-{
3575-namespace internal
3576-{
3577-namespace remote_client
3578-{
3579-
3580-class DeleteHandler;
3581-
3582-class ItemImpl : public virtual ItemBase, public virtual QObject
3583-{
3584-public:
3585- ItemImpl(storage::internal::ItemMetadata const& md, ItemType type);
3586-
3587- virtual QString name() const override;
3588- virtual QString etag() const override;
3589- virtual QVariantMap metadata() const override;
3590- virtual QDateTime last_modified_time() const override;
3591- virtual QFuture<std::shared_ptr<Item>> copy(std::shared_ptr<Folder> const& new_parent, QString const& new_name) override;
3592- virtual QFuture<std::shared_ptr<Item>> move(std::shared_ptr<Folder> const& new_parent, QString const& new_name) override;
3593- virtual QFuture<QVector<std::shared_ptr<Folder>>> parents() const override;
3594- virtual QVector<QString> parent_ids() const override;
3595- virtual QFuture<void> delete_item() override;
3596-
3597- virtual QDateTime creation_time() const override;
3598- virtual MetadataMap native_metadata() const override;
3599-
3600- virtual bool equal_to(ItemBase const& other) const noexcept override;
3601-
3602- std::shared_ptr<ProviderInterface> provider() const noexcept;
3603-
3604- static std::shared_ptr<Item> make_item(storage::internal::ItemMetadata const& md, std::weak_ptr<Root> root);
3605-
3606-protected:
3607- storage::internal::ItemMetadata md_;
3608-
3609- friend class DeleteHandler;
3610-};
3611-
3612-} // namespace remote_client
3613-} // namespace internal
3614-} // namespace client
3615-} // namespace qt
3616-} // namespace storage
3617-} // namespace unity
3618
3619=== removed file 'include/unity/storage/qt/client/internal/remote_client/RootImpl.h'
3620--- include/unity/storage/qt/client/internal/remote_client/RootImpl.h 2016-07-13 04:19:12 +0000
3621+++ include/unity/storage/qt/client/internal/remote_client/RootImpl.h 1970-01-01 00:00:00 +0000
3622@@ -1,68 +0,0 @@
3623-/*
3624- * Copyright (C) 2016 Canonical Ltd
3625- *
3626- * This program is free software: you can redistribute it and/or modify
3627- * it under the terms of the GNU Lesser General Public License version 3 as
3628- * published by the Free Software Foundation.
3629- *
3630- * This program is distributed in the hope that it will be useful,
3631- * but WITHOUT ANY WARRANTY; without even the implied warranty of
3632- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3633- * GNU Lesser General Public License for more details.
3634- *
3635- * You should have received a copy of the GNU Lesser General Public License
3636- * along with this program. If not, see <http://www.gnu.org/licenses/>.
3637- *
3638- * Authors: Michi Henning <michi.henning@canonical.com>
3639- */
3640-
3641-#pragma once
3642-
3643-#include <unity/storage/qt/client/internal/RootBase.h>
3644-#include <unity/storage/qt/client/internal/remote_client/FolderImpl.h>
3645-
3646-namespace unity
3647-{
3648-namespace storage
3649-{
3650-namespace internal
3651-{
3652-
3653-struct ItemMetadata;
3654-
3655-} // namespace internal
3656-
3657-namespace qt
3658-{
3659-namespace client
3660-{
3661-namespace internal
3662-{
3663-namespace remote_client
3664-{
3665-
3666-class RootImpl : public virtual RootBase, public virtual FolderImpl
3667-{
3668-public:
3669- RootImpl(storage::internal::ItemMetadata const& md, std::weak_ptr<Account> const& account);
3670-
3671- virtual QFuture<QVector<std::shared_ptr<Folder>>> parents() const override;
3672- virtual QVector<QString> parent_ids() const override;
3673- virtual QFuture<void> delete_item() override;
3674-
3675- virtual QFuture<int64_t> free_space_bytes() const override;
3676- virtual QFuture<int64_t> used_space_bytes() const override;
3677- virtual QFuture<Item::SPtr> get(QString native_identity) const override;
3678-
3679- static std::shared_ptr<Root> make_root(storage::internal::ItemMetadata const& md,
3680- std::weak_ptr<Account> const& account);
3681-
3682- friend class FolderImpl;
3683-};
3684-
3685-} // namespace remote_client
3686-} // namespace internal
3687-} // namespace client
3688-} // namespace qt
3689-} // namespace storage
3690-} // namespace unity
3691
3692=== removed file 'include/unity/storage/qt/client/internal/remote_client/RuntimeImpl.h'
3693--- include/unity/storage/qt/client/internal/remote_client/RuntimeImpl.h 2016-08-11 23:55:40 +0000
3694+++ include/unity/storage/qt/client/internal/remote_client/RuntimeImpl.h 1970-01-01 00:00:00 +0000
3695@@ -1,81 +0,0 @@
3696-/*
3697- * Copyright (C) 2016 Canonical Ltd
3698- *
3699- * This program is free software: you can redistribute it and/or modify
3700- * it under the terms of the GNU Lesser General Public License version 3 as
3701- * published by the Free Software Foundation.
3702- *
3703- * This program is distributed in the hope that it will be useful,
3704- * but WITHOUT ANY WARRANTY; without even the implied warranty of
3705- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3706- * GNU Lesser General Public License for more details.
3707- *
3708- * You should have received a copy of the GNU Lesser General Public License
3709- * along with this program. If not, see <http://www.gnu.org/licenses/>.
3710- *
3711- * Authors: Michi Henning <michi.henning@canonical.com>
3712- */
3713-
3714-#pragma once
3715-
3716-#include <unity/storage/qt/client/internal/RuntimeBase.h>
3717-
3718-#include <OnlineAccounts/Manager>
3719-#include <QDBusConnection>
3720-#include <QTimer>
3721-
3722-namespace unity
3723-{
3724-namespace storage
3725-{
3726-namespace qt
3727-{
3728-namespace client
3729-{
3730-
3731-class Account;
3732-
3733-namespace internal
3734-{
3735-namespace remote_client
3736-{
3737-
3738-class RuntimeImpl : public RuntimeBase
3739-{
3740- Q_OBJECT
3741-
3742-public:
3743- RuntimeImpl(QDBusConnection const& bus);
3744- virtual ~RuntimeImpl();
3745-
3746- virtual void shutdown() override;
3747- virtual QFuture<QVector<std::shared_ptr<Account>>> accounts() override;
3748- virtual std::shared_ptr<Account> make_test_account(QString const& bus_name,
3749- QString const& object_path) override;
3750-
3751- QDBusConnection& connection();
3752-
3753-private Q_SLOTS:
3754- virtual void manager_ready();
3755- virtual void timeout();
3756-
3757-private:
3758- std::shared_ptr<Account> make_account(QString const& bus_name,
3759- QString const& object_path,
3760- QString const& owner,
3761- QString const& owner_id,
3762- QString const& description);
3763-
3764- QDBusConnection conn_;
3765- std::unique_ptr<OnlineAccounts::Manager> manager_; // TODO: Hack until we can use the registry
3766- QTimer timer_;
3767- QVector<std::shared_ptr<Account>> accounts_;
3768- QFutureInterface<QVector<std::shared_ptr<Account>>> qf_;
3769-};
3770-
3771-} // namespace remote_client
3772-} // namespace internal
3773-} // namespace client
3774-} // namespace qt
3775-} // namespace storage
3776-} // namespace unity
3777
3778=== removed file 'include/unity/storage/qt/client/internal/remote_client/UploaderImpl.h'
3779--- include/unity/storage/qt/client/internal/remote_client/UploaderImpl.h 2016-08-25 23:12:45 +0000
3780+++ include/unity/storage/qt/client/internal/remote_client/UploaderImpl.h 1970-01-01 00:00:00 +0000
3781@@ -1,84 +0,0 @@
3782-/*
3783- * Copyright (C) 2016 Canonical Ltd
3784- *
3785- * This program is free software: you can redistribute it and/or modify
3786- * it under the terms of the GNU Lesser General Public License version 3 as
3787- * published by the Free Software Foundation.
3788- *
3789- * This program is distributed in the hope that it will be useful,
3790- * but WITHOUT ANY WARRANTY; without even the implied warranty of
3791- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3792- * GNU Lesser General Public License for more details.
3793- *
3794- * You should have received a copy of the GNU Lesser General Public License
3795- * along with this program. If not, see <http://www.gnu.org/licenses/>.
3796- *
3797- * Authors: Michi Henning <michi.henning@canonical.com>
3798- */
3799-
3800-#pragma once
3801-
3802-#include <unity/storage/qt/client/internal/UploaderBase.h>
3803-
3804-#include <QDBusUnixFileDescriptor>
3805-
3806-class QLocalSocket;
3807-class ProviderInterface;
3808-
3809-namespace unity
3810-{
3811-namespace storage
3812-{
3813-namespace qt
3814-{
3815-namespace client
3816-{
3817-
3818-class Root;
3819-class Uploader;
3820-
3821-namespace internal
3822-{
3823-namespace remote_client
3824-{
3825-
3826-class UploaderImpl : public UploaderBase
3827-{
3828-public:
3829- UploaderImpl(QString const& upload_id,
3830- QDBusUnixFileDescriptor fd,
3831- int64_t size,
3832- QString const& old_etag,
3833- std::weak_ptr<Root> root,
3834- std::shared_ptr<ProviderInterface> const& provider);
3835- ~UploaderImpl();
3836-
3837- virtual std::shared_ptr<QLocalSocket> socket() const override;
3838- virtual QFuture<std::shared_ptr<File>> finish_upload() override;
3839- virtual QFuture<void> cancel() noexcept override;
3840-
3841- static std::shared_ptr<Uploader> make_uploader(QString const& upload_id,
3842- QDBusUnixFileDescriptor fd,
3843- int64_t size,
3844- QString const& old_etag,
3845- std::weak_ptr<Root> root,
3846- std::shared_ptr<ProviderInterface> const& provider);
3847-
3848-private:
3849- enum State { uploading, finalized };
3850-
3851- QString upload_id_;
3852- QDBusUnixFileDescriptor fd_;
3853- QString old_etag_;
3854- std::shared_ptr<Root> root_;
3855- std::shared_ptr<ProviderInterface> provider_;
3856- std::shared_ptr<QLocalSocket> write_socket_;
3857- State state_;
3858-};
3859-
3860-} // namespace remote_client
3861-} // namespace internal
3862-} // namespace client
3863-} // namespace qt
3864-} // namespace storage
3865-} // namespace unity
3866
3867=== removed file 'include/unity/storage/qt/client/internal/remote_client/dbusmarshal.h'
3868--- include/unity/storage/qt/client/internal/remote_client/dbusmarshal.h 2016-08-11 06:53:25 +0000
3869+++ include/unity/storage/qt/client/internal/remote_client/dbusmarshal.h 1970-01-01 00:00:00 +0000
3870@@ -1,45 +0,0 @@
3871-/*
3872- * Copyright (C) 2016 Canonical Ltd
3873- *
3874- * This program is free software: you can redistribute it and/or modify
3875- * it under the terms of the GNU Lesser General Public License version 3 as
3876- * published by the Free Software Foundation.
3877- *
3878- * This program is distributed in the hope that it will be useful,
3879- * but WITHOUT ANY WARRANTY; without even the implied warranty of
3880- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3881- * GNU Lesser General Public License for more details.
3882- *
3883- * You should have received a copy of the GNU Lesser General Public License
3884- * along with this program. If not, see <http://www.gnu.org/licenses/>.
3885- *
3886- * Authors: Michi Henning <michi.henning@canonical.com>
3887- */
3888-
3889-#pragma once
3890-
3891-#include <exception>
3892-
3893-class QDBusPendingCallWatcher;
3894-
3895-namespace unity
3896-{
3897-namespace storage
3898-{
3899-namespace qt
3900-{
3901-namespace client
3902-{
3903-namespace internal
3904-{
3905-namespace remote_client
3906-{
3907-
3908-std::exception_ptr unmarshal_exception(QDBusPendingCallWatcher const& call);
3909-
3910-} // namespace remote_client
3911-} // namespace internal
3912-} // client
3913-} // qt
3914-} // storage
3915-} // unity
3916
3917=== removed file 'include/unity/storage/qt/client/internal/remote_client/validate.h'
3918--- include/unity/storage/qt/client/internal/remote_client/validate.h 2016-08-09 02:25:13 +0000
3919+++ include/unity/storage/qt/client/internal/remote_client/validate.h 1970-01-01 00:00:00 +0000
3920@@ -1,51 +0,0 @@
3921-/*
3922- * Copyright (C) 2016 Canonical Ltd
3923- *
3924- * This program is free software: you can redistribute it and/or modify
3925- * it under the terms of the GNU Lesser General Public License version 3 as
3926- * published by the Free Software Foundation.
3927- *
3928- * This program is distributed in the hope that it will be useful,
3929- * but WITHOUT ANY WARRANTY; without even the implied warranty of
3930- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3931- * GNU Lesser General Public License for more details.
3932- *
3933- * You should have received a copy of the GNU Lesser General Public License
3934- * along with this program. If not, see <http://www.gnu.org/licenses/>.
3935- *
3936- * Authors: Michi Henning <michi.henning@canonical.com>
3937- */
3938-
3939-#pragma once
3940-
3941-#include <QString>
3942-
3943-namespace unity
3944-{
3945-namespace storage
3946-{
3947-
3948-namespace internal
3949-{
3950-
3951-class ItemMetadata;
3952-
3953-} // namespace internal
3954-
3955-namespace qt
3956-{
3957-namespace client
3958-{
3959-namespace internal
3960-{
3961-namespace remote_client
3962-{
3963-
3964-void validate(QString const& method, unity::storage::internal::ItemMetadata const& md);
3965-
3966-} // namespace remote_client
3967-} // namespace internal
3968-} // namespace client
3969-} // namespace qt
3970-} // namespace storage
3971-} // namespace unity
3972
3973=== modified file 'plugins/Ubuntu/StorageFramework/CMakeLists.txt'
3974--- plugins/Ubuntu/StorageFramework/CMakeLists.txt 2016-09-29 11:37:05 +0000
3975+++ plugins/Ubuntu/StorageFramework/CMakeLists.txt 2017-04-06 08:34:29 +0000
3976@@ -9,7 +9,8 @@
3977 )
3978
3979 target_link_libraries(storage-framework-qml
3980- storage-framework-qt-client-v2
3981+ storage-framework-qt-client
3982+ Qt5::DBus
3983 Qt5::Qml
3984 )
3985
3986
3987=== modified file 'src/internal/CMakeLists.txt'
3988--- src/internal/CMakeLists.txt 2016-11-09 03:26:49 +0000
3989+++ src/internal/CMakeLists.txt 2017-04-06 08:34:29 +0000
3990@@ -8,7 +8,6 @@
3991 ${CMAKE_SOURCE_DIR}/include/unity/storage/internal/InactivityTimer.h
3992 )
3993
3994-
3995 add_library(storage-framework-common-internal STATIC ${src})
3996
3997 set_target_properties(storage-framework-common-internal PROPERTIES AUTOMOC TRUE)
3998
3999=== modified file 'src/qt/CMakeLists.txt'
4000--- src/qt/CMakeLists.txt 2016-11-15 02:05:14 +0000
4001+++ src/qt/CMakeLists.txt 2017-04-06 08:34:29 +0000
4002@@ -1,5 +1,3 @@
4003-add_subdirectory(client)
4004-
4005 set_source_files_properties(${CMAKE_SOURCE_DIR}/data/provider.xml PROPERTIES
4006 CLASSNAME ProviderInterface
4007 INCLUDE unity/storage/internal/dbusmarshal.h
4008@@ -23,8 +21,8 @@
4009 GENERATED TRUE
4010 )
4011
4012-# Sources for remote client V2 library.
4013-set(QT_CLIENT_LIB_V2_SRC
4014+# Sources for client library.
4015+set(QT_CLIENT_LIB_SRC
4016 Account.cpp
4017 AccountsJob.cpp
4018 Downloader.cpp
4019@@ -73,29 +71,29 @@
4020 ${CMAKE_SOURCE_DIR}/include/unity/storage/qt/internal/VoidJobImpl.h
4021 )
4022
4023-add_library(storage-framework-qt-client-v2 SHARED
4024- ${QT_CLIENT_LIB_V2_SRC}
4025+add_library(storage-framework-qt-client SHARED
4026+ ${QT_CLIENT_LIB_SRC}
4027 ${generated_files}
4028 )
4029-target_include_directories(storage-framework-qt-client-v2 PRIVATE
4030+target_include_directories(storage-framework-qt-client PRIVATE
4031 ${Qt5DBus_INCLUDE_DIRS}
4032 ${Qt5Network_INCLUDE_DIRS}
4033 )
4034-set_target_properties(storage-framework-qt-client-v2 PROPERTIES
4035+set_target_properties(storage-framework-qt-client PROPERTIES
4036 AUTOMOC TRUE
4037 LINK_FLAGS "-Wl,--no-undefined"
4038 OUTPUT_NAME "storage-framework-qt-client-${SF_CLIENT_API_VERSION}"
4039 SOVERSION ${SF_CLIENT_SOVERSION}
4040 VERSION ${SF_CLIENT_LIBVERSION}
4041 )
4042-target_link_libraries(storage-framework-qt-client-v2
4043+target_link_libraries(storage-framework-qt-client
4044 storage-framework-common-internal
4045 Qt5::Core
4046 Qt5::DBus
4047 Qt5::Network
4048 )
4049 install(
4050- TARGETS storage-framework-qt-client-v2
4051+ TARGETS storage-framework-qt-client
4052 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
4053 )
4054
4055
4056=== removed directory 'src/qt/client'
4057=== removed file 'src/qt/client/Account.cpp'
4058--- src/qt/client/Account.cpp 2016-07-20 06:58:30 +0000
4059+++ src/qt/client/Account.cpp 1970-01-01 00:00:00 +0000
4060@@ -1,72 +0,0 @@
4061-/*
4062- * Copyright (C) 2016 Canonical Ltd
4063- *
4064- * This program is free software: you can redistribute it and/or modify
4065- * it under the terms of the GNU Lesser General Public License version 3 as
4066- * published by the Free Software Foundation.
4067- *
4068- * This program is distributed in the hope that it will be useful,
4069- * but WITHOUT ANY WARRANTY; without even the implied warranty of
4070- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4071- * GNU Lesser General Public License for more details.
4072- *
4073- * You should have received a copy of the GNU Lesser General Public License
4074- * along with this program. If not, see <http://www.gnu.org/licenses/>.
4075- *
4076- * Authors: Michi Henning <michi.henning@canonical.com>
4077- */
4078-
4079-#include <unity/storage/qt/client/Account.h>
4080-
4081-#include <unity/storage/qt/client/internal/AccountBase.h>
4082-
4083-#include <cassert>
4084-
4085-using namespace std;
4086-
4087-namespace unity
4088-{
4089-namespace storage
4090-{
4091-namespace qt
4092-{
4093-namespace client
4094-{
4095-
4096-Account::Account(internal::AccountBase* p)
4097- : p_(p)
4098-{
4099- assert(p != nullptr);
4100-}
4101-
4102-Account::~Account() = default;
4103-
4104-shared_ptr<Runtime> Account::runtime() const
4105-{
4106- return p_->runtime();
4107-}
4108-
4109-QString Account::owner() const
4110-{
4111- return p_->owner();
4112-}
4113-
4114-QString Account::owner_id() const
4115-{
4116- return p_->owner_id();
4117-}
4118-
4119-QString Account::description() const
4120-{
4121- return p_->description();
4122-}
4123-
4124-QFuture<QVector<std::shared_ptr<Root>>> Account::roots() const
4125-{
4126- return p_->roots();
4127-}
4128-
4129-} // namespace client
4130-} // namespace qt
4131-} // namespace storage
4132-} // namespace unity
4133
4134=== removed file 'src/qt/client/CMakeLists.txt'
4135--- src/qt/client/CMakeLists.txt 2016-10-12 08:08:48 +0000
4136+++ src/qt/client/CMakeLists.txt 1970-01-01 00:00:00 +0000
4137@@ -1,131 +0,0 @@
4138-# Create an OBJECT library for the files that are used by both
4139-# local and remote client libraries, so we don't compile them twice.
4140-
4141-add_library(qt-client-lib-common OBJECT
4142- Account.cpp
4143- Downloader.cpp
4144- Exceptions.cpp
4145- File.cpp
4146- Folder.cpp
4147- Item.cpp
4148- Root.cpp
4149- Runtime.cpp
4150- Uploader.cpp
4151- internal/AccountBase.cpp
4152- internal/DownloaderBase.cpp
4153- internal/FileBase.cpp
4154- internal/FolderBase.cpp
4155- internal/ItemBase.cpp
4156- internal/RootBase.cpp
4157- internal/RuntimeBase.cpp
4158- internal/UploaderBase.cpp
4159- ${CMAKE_SOURCE_DIR}/include/unity/storage/qt/client/internal/DownloaderBase.h
4160- ${CMAKE_SOURCE_DIR}/include/unity/storage/qt/client/internal/UploaderBase.h
4161-)
4162-target_include_directories(qt-client-lib-common PRIVATE
4163- ${Qt5DBus_INCLUDE_DIRS}
4164- ${Qt5Network_INCLUDE_DIRS}
4165-)
4166-set_target_properties(qt-client-lib-common PROPERTIES
4167- AUTOMOC TRUE
4168- POSITION_INDEPENDENT_CODE TRUE
4169-)
4170-
4171-# We build both local and remote client libraries here instead
4172-# of creating OBJECT libraries for them because cmake 3.0.2 (which
4173-# is in the Vivid overlay) cannot handle .moc files in OBJECT libraries.
4174-
4175-# Descend into the child directories first. The CMakeLists.txt files
4176-# there set QT_CLIENT_LIB_LOCAL_SRC and QT_CLIENT_LIB_REMOTE_SRC.
4177-add_subdirectory(internal)
4178-
4179-# Build the local loopback client library
4180-add_library(storage-framework-qt-local-client SHARED
4181- $<TARGET_OBJECTS:qt-client-lib-common>
4182- ${QT_CLIENT_LIB_LOCAL_SRC}
4183-)
4184-target_include_directories(storage-framework-qt-local-client PRIVATE
4185- ${GLIB_DEPS_INCLUDE_DIRS}
4186-)
4187-set_target_properties(storage-framework-qt-local-client PROPERTIES
4188- AUTOMOC TRUE
4189- LINK_FLAGS "-Wl,--no-undefined"
4190- OUTPUT_NAME "storage-framework-qt-local-client-1"
4191- SOVERSION 0
4192- VERSION 0.0.1
4193-)
4194-target_link_libraries(storage-framework-qt-local-client
4195- storage-framework-common-internal
4196- Qt5::Concurrent
4197- Qt5::Core
4198- Qt5::DBus
4199- Qt5::Network
4200- ${Boost_LIBRARIES}
4201- ${GLIB_DEPS_LIBRARIES}
4202-)
4203-install(
4204- TARGETS storage-framework-qt-local-client
4205- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
4206-)
4207-
4208-configure_file(
4209- storage-framework-qt-local-client.pc.in
4210- storage-framework-qt-local-client-1.pc
4211-)
4212-install(
4213- FILES ${CMAKE_CURRENT_BINARY_DIR}/storage-framework-qt-local-client-1.pc
4214- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
4215-)
4216-
4217-# Build the remote client library
4218-set_source_files_properties(${CMAKE_SOURCE_DIR}/data/provider.xml PROPERTIES
4219- CLASSNAME ProviderInterface
4220- INCLUDE unity/storage/internal/dbusmarshal.h
4221-)
4222-
4223-qt5_add_dbus_interface(generated_files
4224- ${CMAKE_SOURCE_DIR}/data/provider.xml
4225- ProviderInterface
4226-)
4227-set_source_files_properties(${generated_files} PROPERTIES
4228- COMPILE_FLAGS "-Wno-ctor-dtor-privacy -Wno-missing-field-initializers"
4229- GENERATED TRUE
4230-)
4231-
4232-add_library(storage-framework-qt-client SHARED
4233- $<TARGET_OBJECTS:qt-client-lib-common>
4234- ${QT_CLIENT_LIB_REMOTE_SRC}
4235- ${generated_files}
4236-)
4237-target_include_directories(storage-framework-qt-client PRIVATE
4238- ${GLIB_DEPS_INCLUDE_DIRS}
4239- ${ONLINEACCOUNTS_DEPS_INCLUDE_DIRS}
4240-)
4241-set_target_properties(storage-framework-qt-client PROPERTIES
4242- AUTOMOC TRUE
4243- LINK_FLAGS "-Wl,--no-undefined"
4244- OUTPUT_NAME "storage-framework-qt-client-1"
4245- SOVERSION 0
4246- VERSION 0.0.1
4247-)
4248-target_link_libraries(storage-framework-qt-client
4249- storage-framework-common-internal
4250- Qt5::Concurrent
4251- Qt5::Core
4252- Qt5::DBus
4253- Qt5::Network
4254- ${ONLINEACCOUNTS_DEPS_LDFLAGS}
4255-)
4256-install(
4257- TARGETS storage-framework-qt-client
4258- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
4259-)
4260-
4261-configure_file(
4262- storage-framework-qt-client-1.pc.in
4263- storage-framework-qt-client-1.pc
4264-)
4265-install(
4266- FILES ${CMAKE_CURRENT_BINARY_DIR}/storage-framework-qt-client-1.pc
4267- DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
4268-)
4269
4270=== removed file 'src/qt/client/Downloader.cpp'
4271--- src/qt/client/Downloader.cpp 2016-07-12 02:22:05 +0000
4272+++ src/qt/client/Downloader.cpp 1970-01-01 00:00:00 +0000
4273@@ -1,62 +0,0 @@
4274-/*
4275- * Copyright (C) 2016 Canonical Ltd
4276- *
4277- * This program is free software: you can redistribute it and/or modify
4278- * it under the terms of the GNU Lesser General Public License version 3 as
4279- * published by the Free Software Foundation.
4280- *
4281- * This program is distributed in the hope that it will be useful,
4282- * but WITHOUT ANY WARRANTY; without even the implied warranty of
4283- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4284- * GNU Lesser General Public License for more details.
4285- *
4286- * You should have received a copy of the GNU Lesser General Public License
4287- * along with this program. If not, see <http://www.gnu.org/licenses/>.
4288- *
4289- * Authors: Michi Henning <michi.henning@canonical.com>
4290- */
4291-
4292-#include <unity/storage/qt/client/Downloader.h>
4293-
4294-#include <unity/storage/qt/client/internal/DownloaderBase.h>
4295-
4296-namespace unity
4297-{
4298-namespace storage
4299-{
4300-namespace qt
4301-{
4302-namespace client
4303-{
4304-
4305-Downloader::Downloader(internal::DownloaderBase* p)
4306- : p_(p)
4307-{
4308-}
4309-
4310-Downloader::~Downloader() = default;
4311-
4312-std::shared_ptr<File> Downloader::file() const
4313-{
4314- return p_->file();
4315-}
4316-
4317-std::shared_ptr<QLocalSocket> Downloader::socket() const
4318-{
4319- return p_->socket();
4320-}
4321-
4322-QFuture<void> Downloader::finish_download()
4323-{
4324- return p_->finish_download();
4325-}
4326-
4327-QFuture<void> Downloader::cancel()
4328-{
4329- return p_->cancel();
4330-}
4331-
4332-} // namespace client
4333-} // namespace qt
4334-} // namespace storage
4335-} // namespace unity
4336
4337=== removed file 'src/qt/client/Exceptions.cpp'
4338--- src/qt/client/Exceptions.cpp 2016-08-05 05:37:23 +0000
4339+++ src/qt/client/Exceptions.cpp 1970-01-01 00:00:00 +0000
4340@@ -1,304 +0,0 @@
4341-/*
4342- * Copyright (C) 2016 Canonical Ltd
4343- *
4344- * This program is free software: you can redistribute it and/or modify
4345- * it under the terms of the GNU Lesser General Public License version 3 as
4346- * published by the Free Software Foundation.
4347- *
4348- * This program is distributed in the hope that it will be useful,
4349- * but WITHOUT ANY WARRANTY; without even the implied warranty of
4350- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4351- * GNU Lesser General Public License for more details.
4352- *
4353- * You should have received a copy of the GNU Lesser General Public License
4354- * along with this program. If not, see <http://www.gnu.org/licenses/>.
4355- *
4356- * Authors: Michi Henning <michi.henning@canonical.com>
4357- */
4358-
4359-#include <unity/storage/qt/client/Exceptions.h>
4360-
4361-using namespace std;
4362-
4363-namespace unity
4364-{
4365-namespace storage
4366-{
4367-namespace qt
4368-{
4369-namespace client
4370-{
4371-
4372-StorageException::StorageException(char const* exception_name, QString const& error_message)
4373- : what_string_(string(exception_name) + ": " + error_message.toStdString())
4374- , error_message_(error_message)
4375-{
4376-}
4377-
4378-StorageException::~StorageException() = default;
4379-
4380-char const* StorageException::what() const noexcept
4381-{
4382- return what_string_.c_str();
4383-}
4384-
4385-QString StorageException::error_message() const
4386-{
4387- return error_message_;
4388-}
4389-
4390-LocalCommsException::LocalCommsException(QString const& error_message)
4391- : StorageException("LocalCommsException", error_message)
4392-{
4393-}
4394-
4395-LocalCommsException::~LocalCommsException() = default;
4396-
4397-LocalCommsException* LocalCommsException::clone() const
4398-{
4399- return new LocalCommsException(*this);
4400-}
4401-
4402-void LocalCommsException::raise() const
4403-{
4404- throw *this;
4405-}
4406-
4407-RemoteCommsException::RemoteCommsException(QString const& error_message)
4408- : StorageException("RemoteCommsException", error_message)
4409-{
4410-}
4411-
4412-RemoteCommsException::~RemoteCommsException() = default;
4413-
4414-RemoteCommsException* RemoteCommsException::clone() const
4415-{
4416- return new RemoteCommsException(*this);
4417-}
4418-
4419-void RemoteCommsException::raise() const
4420-{
4421- throw *this;
4422-}
4423-
4424-DeletedException::DeletedException(QString const& error_message, QString const& identity)
4425- : StorageException("DeletedException", error_message)
4426- , identity_(identity)
4427-{
4428-}
4429-
4430-DeletedException::~DeletedException() = default;
4431-
4432-DeletedException* DeletedException::clone() const
4433-{
4434- return new DeletedException(*this);
4435-}
4436-
4437-void DeletedException::raise() const
4438-{
4439- throw *this;
4440-}
4441-
4442-QString DeletedException::native_identity() const
4443-{
4444- return identity_;
4445-}
4446-
4447-RuntimeDestroyedException::RuntimeDestroyedException(QString const& method)
4448- : StorageException("RuntimeDestroyedException", method + ": runtime was destroyed previously")
4449-{
4450-}
4451-
4452-RuntimeDestroyedException::~RuntimeDestroyedException() = default;
4453-
4454-RuntimeDestroyedException* RuntimeDestroyedException::clone() const
4455-{
4456- return new RuntimeDestroyedException(*this);
4457-}
4458-
4459-void RuntimeDestroyedException::raise() const
4460-{
4461- throw *this;
4462-}
4463-
4464-NotExistsException::NotExistsException(QString const& error_message, QString const& key)
4465- : StorageException("NotExistsException", error_message)
4466- , key_(key)
4467-{
4468-}
4469-
4470-NotExistsException::~NotExistsException() = default;
4471-
4472-NotExistsException* NotExistsException::clone() const
4473-{
4474- return new NotExistsException(*this);
4475-}
4476-
4477-void NotExistsException::raise() const
4478-{
4479- throw *this;
4480-}
4481-
4482-QString NotExistsException::key() const
4483-{
4484- return key_;
4485-}
4486-
4487-ExistsException::ExistsException(QString const& error_message, QString const& identity, QString const& name)
4488- : StorageException("ExistsException", error_message)
4489- , identity_(identity)
4490- , name_(name)
4491-{
4492-}
4493-
4494-ExistsException::~ExistsException() = default;
4495-
4496-ExistsException* ExistsException::clone() const
4497-{
4498- return new ExistsException(*this);
4499-}
4500-
4501-void ExistsException::raise() const
4502-{
4503- throw *this;
4504-}
4505-
4506-QString ExistsException::native_identity() const
4507-{
4508- return identity_;
4509-}
4510-
4511-QString ExistsException::name() const
4512-{
4513- return name_;
4514-}
4515-
4516-ConflictException::ConflictException(QString const& error_message)
4517- : StorageException("ConflictException", error_message)
4518-{
4519-}
4520-
4521-ConflictException::~ConflictException() = default;
4522-
4523-ConflictException* ConflictException::clone() const
4524-{
4525- return new ConflictException(*this);
4526-}
4527-
4528-void ConflictException::raise() const
4529-{
4530- throw *this;
4531-}
4532-
4533-PermissionException::PermissionException(QString const& error_message)
4534- : StorageException("PermissionException", error_message)
4535-{
4536-}
4537-
4538-PermissionException::~PermissionException() = default;
4539-
4540-PermissionException* PermissionException::clone() const
4541-{
4542- return new PermissionException(*this);
4543-}
4544-
4545-void PermissionException::raise() const
4546-{
4547- throw *this;
4548-}
4549-
4550-QuotaException::QuotaException(QString const& error_message)
4551- : StorageException("QuotaException", error_message)
4552-{
4553-}
4554-
4555-QuotaException::~QuotaException() = default;
4556-
4557-QuotaException* QuotaException::clone() const
4558-{
4559- return new QuotaException(*this);
4560-}
4561-
4562-void QuotaException::raise() const
4563-{
4564- throw *this;
4565-}
4566-
4567-CancelledException::CancelledException(QString const& error_message)
4568- : StorageException("CancelledException", error_message)
4569-{
4570-}
4571-
4572-CancelledException::~CancelledException() = default;
4573-
4574-CancelledException* CancelledException::clone() const
4575-{
4576- return new CancelledException(*this);
4577-}
4578-
4579-void CancelledException::raise() const
4580-{
4581- throw *this;
4582-}
4583-
4584-LogicException::LogicException(QString const& error_message)
4585- : StorageException("LogicException", error_message)
4586-{
4587-}
4588-
4589-LogicException::~LogicException() = default;
4590-
4591-LogicException* LogicException::clone() const
4592-{
4593- return new LogicException(*this);
4594-}
4595-
4596-void LogicException::raise() const
4597-{
4598- throw *this;
4599-}
4600-
4601-InvalidArgumentException::InvalidArgumentException(QString const& error_message)
4602- : StorageException("InvalidArgumentException", error_message)
4603-{
4604-}
4605-
4606-InvalidArgumentException::~InvalidArgumentException() = default;
4607-
4608-InvalidArgumentException* InvalidArgumentException::clone() const
4609-{
4610- return new InvalidArgumentException(*this);
4611-}
4612-
4613-void InvalidArgumentException::raise() const
4614-{
4615- throw *this;
4616-}
4617-
4618-ResourceException::ResourceException(QString const& error_message, int error_code)
4619- : StorageException("ResourceException", error_message)
4620- , error_code_(error_code)
4621-{
4622-}
4623-
4624-ResourceException::~ResourceException() = default;
4625-
4626-ResourceException* ResourceException::clone() const
4627-{
4628- return new ResourceException(*this);
4629-}
4630-
4631-void ResourceException::raise() const
4632-{
4633- throw *this;
4634-}
4635-
4636-int ResourceException::error_code() const noexcept
4637-{
4638- return error_code_;
4639-}
4640-
4641-} // namespace client
4642-} // namespace qt
4643-} // namespace storage
4644-} // namespace unity
4645
4646=== removed file 'src/qt/client/File.cpp'
4647--- src/qt/client/File.cpp 2016-07-14 00:17:14 +0000
4648+++ src/qt/client/File.cpp 1970-01-01 00:00:00 +0000
4649@@ -1,61 +0,0 @@
4650-/*
4651- * Copyright (C) 2016 Canonical Ltd
4652- *
4653- * This program is free software: you can redistribute it and/or modify
4654- * it under the terms of the GNU Lesser General Public License version 3 as
4655- * published by the Free Software Foundation.
4656- *
4657- * This program is distributed in the hope that it will be useful,
4658- * but WITHOUT ANY WARRANTY; without even the implied warranty of
4659- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4660- * GNU Lesser General Public License for more details.
4661- *
4662- * You should have received a copy of the GNU Lesser General Public License
4663- * along with this program. If not, see <http://www.gnu.org/licenses/>.
4664- *
4665- * Authors: Michi Henning <michi.henning@canonical.com>
4666- */
4667-
4668-#include <unity/storage/qt/client/File.h>
4669-
4670-#include <unity/storage/qt/client/internal/FileBase.h>
4671-
4672-using namespace std;
4673-
4674-namespace unity
4675-{
4676-namespace storage
4677-{
4678-namespace qt
4679-{
4680-namespace client
4681-{
4682-
4683-using namespace internal;
4684-
4685-File::File(FileBase* p)
4686- : Item(p)
4687-{
4688-}
4689-
4690-File::~File() = default;
4691-
4692-int64_t File::size() const
4693-{
4694- return dynamic_cast<FileBase*>(p_.get())->size();
4695-}
4696-
4697-QFuture<shared_ptr<Uploader>> File::create_uploader(ConflictPolicy policy, int64_t size)
4698-{
4699- return dynamic_cast<FileBase*>(p_.get())->create_uploader(policy, size);
4700-}
4701-
4702-QFuture<shared_ptr<Downloader>> File::create_downloader()
4703-{
4704- return dynamic_cast<FileBase*>(p_.get())->create_downloader();
4705-}
4706-
4707-} // namespace client
4708-} // namespace qt
4709-} // namespace storage
4710-} // namespace unity
4711
4712=== removed file 'src/qt/client/Folder.cpp'
4713--- src/qt/client/Folder.cpp 2016-07-14 00:17:14 +0000
4714+++ src/qt/client/Folder.cpp 1970-01-01 00:00:00 +0000
4715@@ -1,65 +0,0 @@
4716-/*
4717- * Copyright (C) 2016 Canonical Ltd
4718- *
4719- * This program is free software: you can redistribute it and/or modify
4720- * it under the terms of the GNU Lesser General Public License version 3 as
4721- * published by the Free Software Foundation.
4722- *
4723- * This program is distributed in the hope that it will be useful,
4724- * but WITHOUT ANY WARRANTY; without even the implied warranty of
4725- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4726- * GNU Lesser General Public License for more details.
4727- *
4728- * You should have received a copy of the GNU Lesser General Public License
4729- * along with this program. If not, see <http://www.gnu.org/licenses/>.
4730- *
4731- * Authors: Michi Henning <michi.henning@canonical.com>
4732- */
4733-
4734-#include <unity/storage/qt/client/Folder.h>
4735-
4736-#include <unity/storage/qt/client/internal/FolderBase.h>
4737-
4738-namespace unity
4739-{
4740-namespace storage
4741-{
4742-namespace qt
4743-{
4744-namespace client
4745-{
4746-
4747-using namespace internal;
4748-using namespace std;
4749-
4750-Folder::Folder(FolderBase* p)
4751- : Item(p)
4752-{
4753-}
4754-
4755-Folder::~Folder() = default;
4756-
4757-QFuture<QVector<Item::SPtr>> Folder::list() const
4758-{
4759- return dynamic_cast<FolderBase*>(p_.get())->list();
4760-}
4761-
4762-QFuture<QVector<Item::SPtr>> Folder::lookup(QString const& name) const
4763-{
4764- return dynamic_cast<FolderBase*>(p_.get())->lookup(name);
4765-}
4766-
4767-QFuture<Folder::SPtr> Folder::create_folder(QString const& name)
4768-{
4769- return dynamic_cast<FolderBase*>(p_.get())->create_folder(name);
4770-}
4771-
4772-QFuture<shared_ptr<Uploader>> Folder::create_file(QString const& name, int64_t size)
4773-{
4774- return dynamic_cast<FolderBase*>(p_.get())->create_file(name, size);
4775-}
4776-
4777-} // namespace client
4778-} // namespace qt
4779-} // namespace storage
4780-} // namespace unity
4781
4782=== removed file 'src/qt/client/Item.cpp'
4783--- src/qt/client/Item.cpp 2016-07-25 03:45:41 +0000
4784+++ src/qt/client/Item.cpp 1970-01-01 00:00:00 +0000
4785@@ -1,121 +0,0 @@
4786-/*
4787- * Copyright (C) 2016 Canonical Ltd
4788- *
4789- * This program is free software: you can redistribute it and/or modify
4790- * it under the terms of the GNU Lesser General Public License version 3 as
4791- * published by the Free Software Foundation.
4792- *
4793- * This program is distributed in the hope that it will be useful,
4794- * but WITHOUT ANY WARRANTY; without even the implied warranty of
4795- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4796- * GNU Lesser General Public License for more details.
4797- *
4798- * You should have received a copy of the GNU Lesser General Public License
4799- * along with this program. If not, see <http://www.gnu.org/licenses/>.
4800- *
4801- * Authors: Michi Henning <michi.henning@canonical.com>
4802- */
4803-
4804-#include <unity/storage/qt/client/Item.h>
4805-
4806-#include <unity/storage/qt/client/internal/ItemBase.h>
4807-
4808-#include <cassert>
4809-
4810-using namespace std;
4811-
4812-namespace unity
4813-{
4814-namespace storage
4815-{
4816-namespace qt
4817-{
4818-namespace client
4819-{
4820-
4821-Item::Item(internal::ItemBase* p)
4822- : p_(p)
4823-{
4824- assert(p != nullptr);
4825-}
4826-
4827-Item::~Item() = default;
4828-
4829-QString Item::native_identity() const
4830-{
4831- return p_->native_identity();
4832-}
4833-
4834-QString Item::name() const
4835-{
4836- return p_->name();
4837-}
4838-
4839-shared_ptr<Root> Item::root() const
4840-{
4841- return p_->root();
4842-}
4843-
4844-ItemType Item::type() const
4845-{
4846- return p_->type();
4847-}
4848-
4849-QString Item::etag() const
4850-{
4851- return p_->etag();
4852-}
4853-
4854-QVariantMap Item::metadata() const
4855-{
4856- return p_->metadata();
4857-}
4858-
4859-QDateTime Item::last_modified_time() const
4860-{
4861- return p_->last_modified_time();
4862-}
4863-
4864-QFuture<QVector<std::shared_ptr<Folder>>> Item::parents() const
4865-{
4866- return p_->parents();
4867-}
4868-
4869-QVector<QString> Item::parent_ids() const
4870-{
4871- return p_->parent_ids();
4872-}
4873-
4874-QFuture<Item::SPtr> Item::copy(std::shared_ptr<Folder> const& new_parent, QString const& new_name)
4875-{
4876- return p_->copy(new_parent, new_name);
4877-}
4878-QFuture<Item::SPtr> Item::move(std::shared_ptr<Folder> const& new_parent, QString const& new_name)
4879-{
4880- return p_->move(new_parent, new_name);
4881-}
4882-
4883-QFuture<void> Item::delete_item()
4884-{
4885- return p_->delete_item();
4886-}
4887-
4888-QDateTime Item::creation_time() const
4889-{
4890- return p_->creation_time();
4891-}
4892-
4893-MetadataMap Item::native_metadata() const
4894-{
4895- return p_->native_metadata();
4896-}
4897-
4898-bool Item::equal_to(Item::SPtr const& other) const noexcept
4899-{
4900- return p_->equal_to(*other->p_);
4901-}
4902-
4903-} // namespace client
4904-} // namespace qt
4905-} // namespace storage
4906-} // namespace unity
4907
4908=== removed file 'src/qt/client/Root.cpp'
4909--- src/qt/client/Root.cpp 2016-07-20 06:58:30 +0000
4910+++ src/qt/client/Root.cpp 1970-01-01 00:00:00 +0000
4911@@ -1,65 +0,0 @@
4912-/*
4913- * Copyright (C) 2016 Canonical Ltd
4914- *
4915- * This program is free software: you can redistribute it and/or modify
4916- * it under the terms of the GNU Lesser General Public License version 3 as
4917- * published by the Free Software Foundation.
4918- *
4919- * This program is distributed in the hope that it will be useful,
4920- * but WITHOUT ANY WARRANTY; without even the implied warranty of
4921- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4922- * GNU Lesser General Public License for more details.
4923- *
4924- * You should have received a copy of the GNU Lesser General Public License
4925- * along with this program. If not, see <http://www.gnu.org/licenses/>.
4926- *
4927- * Authors: Michi Henning <michi.henning@canonical.com>
4928- */
4929-
4930-#include <unity/storage/qt/client/Root.h>
4931-
4932-#include <unity/storage/qt/client/internal/RootBase.h>
4933-
4934-namespace unity
4935-{
4936-namespace storage
4937-{
4938-namespace qt
4939-{
4940-namespace client
4941-{
4942-
4943-using namespace internal;
4944-using namespace std;
4945-
4946-Root::Root(RootBase* p)
4947- : Folder(p)
4948-{
4949-}
4950-
4951-Root::~Root() = default;
4952-
4953-shared_ptr<Account> Root::account() const
4954-{
4955- return dynamic_cast<RootBase*>(p_.get())->account();
4956-}
4957-
4958-QFuture<int64_t> Root::free_space_bytes() const
4959-{
4960- return dynamic_cast<RootBase*>(p_.get())->free_space_bytes();
4961-}
4962-
4963-QFuture<int64_t> Root::used_space_bytes() const
4964-{
4965- return dynamic_cast<RootBase*>(p_.get())->used_space_bytes();
4966-}
4967-
4968-QFuture<Item::SPtr> Root::get(QString native_identity) const
4969-{
4970- return dynamic_cast<RootBase*>(p_.get())->get(native_identity);
4971-}
4972-
4973-} // namespace client
4974-} // namespace qt
4975-} // namespace storage
4976-} // namespace unity
4977
4978=== removed file 'src/qt/client/Runtime.cpp'
4979--- src/qt/client/Runtime.cpp 2016-08-11 23:55:40 +0000
4980+++ src/qt/client/Runtime.cpp 1970-01-01 00:00:00 +0000
4981@@ -1,76 +0,0 @@
4982-/*
4983- * Copyright (C) 2016 Canonical Ltd
4984- *
4985- * This program is free software: you can redistribute it and/or modify
4986- * it under the terms of the GNU Lesser General Public License version 3 as
4987- * published by the Free Software Foundation.
4988- *
4989- * This program is distributed in the hope that it will be useful,
4990- * but WITHOUT ANY WARRANTY; without even the implied warranty of
4991- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4992- * GNU Lesser General Public License for more details.
4993- *
4994- * You should have received a copy of the GNU Lesser General Public License
4995- * along with this program. If not, see <http://www.gnu.org/licenses/>.
4996- *
4997- * Authors: Michi Henning <michi.henning@canonical.com>
4998- */
4999-
5000-#include <unity/storage/qt/client/Runtime.h>
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: