Merge lp:~gary-wzl77/storage-provider-onedrive/merge-devel into lp:storage-provider-onedrive

Proposed by Gary.Wang
Status: Approved
Approved by: James Henstridge
Approved revision: 3
Proposed branch: lp:~gary-wzl77/storage-provider-onedrive/merge-devel
Merge into: lp:storage-provider-onedrive
Diff against target: 11863 lines (+9169/-1983)
131 files modified
.bzr-builddeb/default.conf (+2/-0)
CMakeLists.txt (+7/-15)
COPYING.GPL (+674/-0)
COPYING.LGPL (+165/-0)
data/CMakeLists.txt (+0/-24)
data/onedrive.pc.in (+0/-10)
debian/control (+1/-1)
debian/copyright (+33/-19)
debian/libonedrive-dev.install (+0/-3)
debian/libonedrive-doc.install (+0/-1)
debian/libonedrive0.install (+0/-3)
debian/rules (+5/-4)
debian/source/format (+1/-0)
doc/CMakeLists.txt (+0/-23)
doc/Doxyfile.in (+0/-1869)
include/CMakeLists.txt (+0/-5)
include/onedrive/api/client.h (+194/-0)
include/onedrive/api/cloudfolder.h (+111/-0)
include/onedrive/api/clouditem.h (+127/-0)
include/onedrive/api/cloudresource.h (+75/-0)
include/onedrive/api/downloadtask.h (+127/-0)
include/onedrive/api/exceptions.h (+97/-0)
include/onedrive/api/storageinfo.h (+76/-0)
include/onedrive/api/syncmanager.h (+168/-0)
include/onedrive/api/task.h (+127/-0)
include/onedrive/api/taskqueue.h (+132/-0)
include/onedrive/api/uploadtask.h (+171/-0)
include/onedrive/api/visibility.h (+30/-0)
provider/CMakeLists.txt (+56/-0)
provider/com.canonical.StorageFramework.Provider.OnedriveProvider.service.in (+3/-0)
provider/main.cpp (+23/-0)
provider/onedriveprovider.cpp (+677/-0)
provider/onedriveprovider.h (+82/-0)
provider/storage-provider-onedrive.application (+11/-0)
provider/storage-provider-onedrive.desktop (+5/-0)
provider/storage-provider-onedrive.service (+7/-0)
src/CMakeLists.txt (+31/-6)
src/onedrive/api/client.cpp (+88/-0)
src/onedrive/api/client_p.cpp (+810/-0)
src/onedrive/api/client_p.h (+98/-0)
src/onedrive/api/cloudfolder.cpp (+125/-0)
src/onedrive/api/clouditem.cpp (+144/-0)
src/onedrive/api/config.h (+55/-0)
src/onedrive/api/downloadtask.cpp (+65/-0)
src/onedrive/api/downloadtask_p.cpp (+198/-0)
src/onedrive/api/downloadtask_p.h (+93/-0)
src/onedrive/api/storageinfo.cpp (+68/-0)
src/onedrive/api/syncmanager.cpp (+65/-0)
src/onedrive/api/syncmanager_p.cpp (+92/-0)
src/onedrive/api/syncmanager_p.h (+74/-0)
src/onedrive/api/syncthread.cpp (+471/-0)
src/onedrive/api/syncthread.h (+80/-0)
src/onedrive/api/taskhandler.h (+279/-0)
src/onedrive/api/uploadtask.cpp (+73/-0)
src/onedrive/api/uploadtask_p.cpp (+223/-0)
src/onedrive/api/uploadtask_p.h (+118/-0)
tests/CMakeLists.txt (+8/-0)
tests/server/resources/952C521658E19C0!303.json (+1/-0)
tests/server/resources/952C521658E19C0!303_children.json (+1/-0)
tests/server/resources/952C521658E19C0!303_children_MjAx.json (+1/-0)
tests/server/resources/D47F8E4CDBE19587!103.json (+1/-0)
tests/server/resources/D47F8E4CDBE19587!103:_upload_test_file:.json (+1/-0)
tests/server/resources/D47F8E4CDBE19587!103_Get.json (+1/-0)
tests/server/resources/D47F8E4CDBE19587!103_children.json (+1/-0)
tests/server/resources/D47F8E4CDBE19587!103_large_test_file.json (+1/-0)
tests/server/resources/D47F8E4CDBE19587!103_update_file.json (+1/-0)
tests/server/resources/D47F8E4CDBE19587!103_upload_test_file.json (+1/-0)
tests/server/resources/D47F8E4CDBE19587!104.json (+1/-0)
tests/server/resources/D47F8E4CDBE19587!105_201607.json (+1/-0)
tests/server/resources/D47F8E4CDBE19587!105_Nonexists.json (+1/-0)
tests/server/resources/D47F8E4CDBE19587!132.json (+1/-0)
tests/server/resources/D47F8E4CDBE19587!133.json (+1/-0)
tests/server/resources/D47F8E4CDBE19587!138.json (+1/-0)
tests/server/resources/D47F8E4CDBE19587!139.json (+1/-0)
tests/server/resources/D47F8E4CDBE19587!140.json (+1/-0)
tests/server/resources/D47F8E4CDBE19587!151.json (+1/-0)
tests/server/resources/D47F8E4CDBE19587!152.json (+1/-0)
tests/server/resources/D47F8E4CDBE19587!156.json (+1/-0)
tests/server/resources/D47F8E4CDBE19587!187.json (+1/-0)
tests/server/resources/D47F8E4CDBE19587!187_update_file.json (+1/-0)
tests/server/resources/D47F8E4CDBE19587!263.json (+1/-0)
tests/server/resources/D47F8E4CDBE19587!264.json (+1/-0)
tests/server/resources/D47F8E4CDBE19587!266.json (+1/-0)
tests/server/resources/D47F8E4CDBE19587!277.json (+1/-0)
tests/server/resources/D47F8E4CDBE19587!485.json (+1/-0)
tests/server/resources/D47F8E4CDBE19587!486.json (+1/-0)
tests/server/resources/D47F8E4CDBE19587!999.json (+1/-0)
tests/server/resources/copy_empty.json (+1/-0)
tests/server/resources/delete_D47F8E4CDBE19587!132.json (+1/-0)
tests/server/resources/delete_D47F8E4CDBE19587!133.json (+1/-0)
tests/server/resources/delete_D47F8E4CDBE19587!888.json (+1/-0)
tests/server/resources/delta.json (+1/-0)
tests/server/resources/download_session.json (+1/-0)
tests/server/resources/invalid_token.json (+1/-0)
tests/server/resources/move_D47F8E4CDBE19587!104.json (+1/-0)
tests/server/resources/move_D47F8E4CDBE19587!155.json (+1/-0)
tests/server/resources/move_D47F8E4CDBE19587!159.json (+1/-0)
tests/server/resources/move_D47F8E4CDBE19587!264.json (+1/-0)
tests/server/resources/move_D47F8E4CDBE19587!266.json (+1/-0)
tests/server/resources/move_empty.json (+1/-0)
tests/server/resources/name_conflict_fail.json (+1/-0)
tests/server/resources/name_conflict_rename.json (+1/-0)
tests/server/resources/new_folder_D47F8E4CDBE19587!103.json (+1/-0)
tests/server/resources/new_folder_invalid_folder_id.json (+1/-0)
tests/server/resources/rm_generate_files.sh (+2/-0)
tests/server/resources/root.json (+1/-0)
tests/server/resources/root_Get.json (+1/-0)
tests/server/resources/root_children.json (+1/-0)
tests/server/resources/storage_info.json (+1/-0)
tests/server/resources/update_D47F8E4CDBE19587!160.json (+1/-0)
tests/server/resources/update_D47F8E4CDBE19587!161.json (+1/-0)
tests/server/resources/update_D47F8E4CDBE19587!267.json (+1/-0)
tests/server/resources/update_D47F8E4CDBE19587!268.json (+2/-0)
tests/server/resources/update_empty.json (+1/-0)
tests/server/resources/upload_chunk.json (+4/-0)
tests/server/resources/upload_session.json (+6/-0)
tests/server/resources/upload_template.json (+1/-0)
tests/server/server.py (+356/-0)
tests/unit/CMakeLists.txt (+10/-0)
tests/unit/onedrive-provider/CMakeLists.txt (+44/-0)
tests/unit/onedrive-provider/onedrive-provider-unit-test.cpp (+889/-0)
tests/unit/onedrive-provider/testsetup.h.in (+4/-0)
tests/unit/onedrive-provider/utils/CMakeLists.txt (+11/-0)
tests/unit/onedrive-provider/utils/DBusEnvironment.cpp (+73/-0)
tests/unit/onedrive-provider/utils/DBusEnvironment.h (+48/-0)
tests/unit/onedrive-provider/utils/ProviderEnvironment.cpp (+73/-0)
tests/unit/onedrive-provider/utils/ProviderEnvironment.h (+30/-0)
tests/unit/onedrive-provider/utils/fake-online-accounts-daemon.py (+172/-0)
tests/unit/onedrive/CMakeLists.txt (+30/-0)
tests/unit/onedrive/api/onedrive-rest-test.cpp (+407/-0)
tests/unit/onedrive/api/onedrive-sync-test.cpp (+507/-0)
To merge this branch: bzr merge lp:~gary-wzl77/storage-provider-onedrive/merge-devel
Reviewer Review Type Date Requested Status
onedrive-team Pending
Review via email: mp+312778@code.launchpad.net

Commit message

First release of storage provider onedrive.

Description of the change

First release of storage provider onedrive.

To post a comment you must log in.
4. By Gary.Wang

merge from devel.

5. By Gary.Wang

merge from master to resolve the conflict.

Unmerged revisions

5. By Gary.Wang

merge from master to resolve the conflict.

4. By Gary.Wang

merge from devel.

3. By Gary.Wang

The implementation of provider and regarding test cases writing with storagw-fw client v2 API.

Approved by James Henstridge, unity-api-1-bot.

2. By Gary.Wang

debian file fixes.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added directory '.bzr-builddeb'
=== added file '.bzr-builddeb/default.conf'
--- .bzr-builddeb/default.conf 1970-01-01 00:00:00 +0000
+++ .bzr-builddeb/default.conf 2017-01-03 04:38:36 +0000
@@ -0,0 +1,2 @@
1[BUILDDEB]
2split = True
03
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2016-09-26 04:27:03 +0000
+++ CMakeLists.txt 2017-01-03 04:38:36 +0000
@@ -16,19 +16,13 @@
1616
17cmake_minimum_required(VERSION 2.8)17cmake_minimum_required(VERSION 2.8)
1818
19project(onedrive)19project(storage-onedrive-provider)
2020
21include(GNUInstallDirs)21include(GNUInstallDirs)
2222
23find_package(Threads)23find_package(Threads)
2424
25set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wall -pedantic -Wextra -fvisibility=hidden")
26set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Werror -Wall -fno-strict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -pedantic -Wextra")25set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Werror -Wall -fno-strict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -pedantic -Wextra")
27set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
28
29set(ONEDRIVE_LIB_VERSION_MAJOR 0)
30set(ONEDRIVE_LIB_VERSION_MINOR 0)
31set(ONEDRIVE_LIB_VERSION_PATCH 1)
3226
33include(CTest)27include(CTest)
3428
@@ -36,20 +30,18 @@
36 include/30 include/
37)31)
3832
39file(GLOB_RECURSE ONEDRIVE_LIB_INTERFACE_HEADERS include/*.h)33file(GLOB_RECURSE ONEDRIVE_PROVIDER_LIB_INTERFACE_HEADERS include/*.h)
4034
41include(EnableCoverageReport)35find_package(CoverageReport)
4236
43add_subdirectory(doc)
44add_subdirectory(data)
45add_subdirectory(include)
46add_subdirectory(src)37add_subdirectory(src)
47add_subdirectory(tests)38add_subdirectory(tests)
48add_subdirectory(provider)39add_subdirectory(provider)
4940
50enable_coverage_report(41enable_coverage_report(
51 TARGETS 42 TARGETS
52 onedrive43 onedrive-provider-lib
44 onedrive-provider-bin
53 FILTER45 FILTER
54 ${CMAKE_SOURCE_DIR}/test/*46 ${CMAKE_SOURCE_DIR}/test/*
55 ${CMAKE_BINARY_DIR}/*47 ${CMAKE_BINARY_DIR}/*
5648
=== added file 'COPYING.GPL'
--- COPYING.GPL 1970-01-01 00:00:00 +0000
+++ COPYING.GPL 2017-01-03 04:38:36 +0000
@@ -0,0 +1,674 @@
1 GNU GENERAL PUBLIC LICENSE
2 Version 3, 29 June 2007
3
4 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5 Everyone is permitted to copy and distribute verbatim copies
6 of this license document, but changing it is not allowed.
7
8 Preamble
9
10 The GNU General Public License is a free, copyleft license for
11software and other kinds of works.
12
13 The licenses for most software and other practical works are designed
14to take away your freedom to share and change the works. By contrast,
15the GNU General Public License is intended to guarantee your freedom to
16share and change all versions of a program--to make sure it remains free
17software for all its users. We, the Free Software Foundation, use the
18GNU General Public License for most of our software; it applies also to
19any other work released this way by its authors. You can apply it to
20your programs, too.
21
22 When we speak of free software, we are referring to freedom, not
23price. Our General Public Licenses are designed to make sure that you
24have the freedom to distribute copies of free software (and charge for
25them if you wish), that you receive source code or can get it if you
26want it, that you can change the software or use pieces of it in new
27free programs, and that you know you can do these things.
28
29 To protect your rights, we need to prevent others from denying you
30these rights or asking you to surrender the rights. Therefore, you have
31certain responsibilities if you distribute copies of the software, or if
32you modify it: responsibilities to respect the freedom of others.
33
34 For example, if you distribute copies of such a program, whether
35gratis or for a fee, you must pass on to the recipients the same
36freedoms that you received. You must make sure that they, too, receive
37or can get the source code. And you must show them these terms so they
38know their rights.
39
40 Developers that use the GNU GPL protect your rights with two steps:
41(1) assert copyright on the software, and (2) offer you this License
42giving you legal permission to copy, distribute and/or modify it.
43
44 For the developers' and authors' protection, the GPL clearly explains
45that there is no warranty for this free software. For both users' and
46authors' sake, the GPL requires that modified versions be marked as
47changed, so that their problems will not be attributed erroneously to
48authors of previous versions.
49
50 Some devices are designed to deny users access to install or run
51modified versions of the software inside them, although the manufacturer
52can do so. This is fundamentally incompatible with the aim of
53protecting users' freedom to change the software. The systematic
54pattern of such abuse occurs in the area of products for individuals to
55use, which is precisely where it is most unacceptable. Therefore, we
56have designed this version of the GPL to prohibit the practice for those
57products. If such problems arise substantially in other domains, we
58stand ready to extend this provision to those domains in future versions
59of the GPL, as needed to protect the freedom of users.
60
61 Finally, every program is threatened constantly by software patents.
62States should not allow patents to restrict development and use of
63software on general-purpose computers, but in those that do, we wish to
64avoid the special danger that patents applied to a free program could
65make it effectively proprietary. To prevent this, the GPL assures that
66patents cannot be used to render the program non-free.
67
68 The precise terms and conditions for copying, distribution and
69modification follow.
70
71 TERMS AND CONDITIONS
72
73 0. Definitions.
74
75 "This License" refers to version 3 of the GNU General Public License.
76
77 "Copyright" also means copyright-like laws that apply to other kinds of
78works, such as semiconductor masks.
79
80 "The Program" refers to any copyrightable work licensed under this
81License. Each licensee is addressed as "you". "Licensees" and
82"recipients" may be individuals or organizations.
83
84 To "modify" a work means to copy from or adapt all or part of the work
85in a fashion requiring copyright permission, other than the making of an
86exact copy. The resulting work is called a "modified version" of the
87earlier work or a work "based on" the earlier work.
88
89 A "covered work" means either the unmodified Program or a work based
90on the Program.
91
92 To "propagate" a work means to do anything with it that, without
93permission, would make you directly or secondarily liable for
94infringement under applicable copyright law, except executing it on a
95computer or modifying a private copy. Propagation includes copying,
96distribution (with or without modification), making available to the
97public, and in some countries other activities as well.
98
99 To "convey" a work means any kind of propagation that enables other
100parties to make or receive copies. Mere interaction with a user through
101a computer network, with no transfer of a copy, is not conveying.
102
103 An interactive user interface displays "Appropriate Legal Notices"
104to the extent that it includes a convenient and prominently visible
105feature that (1) displays an appropriate copyright notice, and (2)
106tells the user that there is no warranty for the work (except to the
107extent that warranties are provided), that licensees may convey the
108work under this License, and how to view a copy of this License. If
109the interface presents a list of user commands or options, such as a
110menu, a prominent item in the list meets this criterion.
111
112 1. Source Code.
113
114 The "source code" for a work means the preferred form of the work
115for making modifications to it. "Object code" means any non-source
116form of a work.
117
118 A "Standard Interface" means an interface that either is an official
119standard defined by a recognized standards body, or, in the case of
120interfaces specified for a particular programming language, one that
121is widely used among developers working in that language.
122
123 The "System Libraries" of an executable work include anything, other
124than the work as a whole, that (a) is included in the normal form of
125packaging a Major Component, but which is not part of that Major
126Component, and (b) serves only to enable use of the work with that
127Major Component, or to implement a Standard Interface for which an
128implementation is available to the public in source code form. A
129"Major Component", in this context, means a major essential component
130(kernel, window system, and so on) of the specific operating system
131(if any) on which the executable work runs, or a compiler used to
132produce the work, or an object code interpreter used to run it.
133
134 The "Corresponding Source" for a work in object code form means all
135the source code needed to generate, install, and (for an executable
136work) run the object code and to modify the work, including scripts to
137control those activities. However, it does not include the work's
138System Libraries, or general-purpose tools or generally available free
139programs which are used unmodified in performing those activities but
140which are not part of the work. For example, Corresponding Source
141includes interface definition files associated with source files for
142the work, and the source code for shared libraries and dynamically
143linked subprograms that the work is specifically designed to require,
144such as by intimate data communication or control flow between those
145subprograms and other parts of the work.
146
147 The Corresponding Source need not include anything that users
148can regenerate automatically from other parts of the Corresponding
149Source.
150
151 The Corresponding Source for a work in source code form is that
152same work.
153
154 2. Basic Permissions.
155
156 All rights granted under this License are granted for the term of
157copyright on the Program, and are irrevocable provided the stated
158conditions are met. This License explicitly affirms your unlimited
159permission to run the unmodified Program. The output from running a
160covered work is covered by this License only if the output, given its
161content, constitutes a covered work. This License acknowledges your
162rights of fair use or other equivalent, as provided by copyright law.
163
164 You may make, run and propagate covered works that you do not
165convey, without conditions so long as your license otherwise remains
166in force. You may convey covered works to others for the sole purpose
167of having them make modifications exclusively for you, or provide you
168with facilities for running those works, provided that you comply with
169the terms of this License in conveying all material for which you do
170not control copyright. Those thus making or running the covered works
171for you must do so exclusively on your behalf, under your direction
172and control, on terms that prohibit them from making any copies of
173your copyrighted material outside their relationship with you.
174
175 Conveying under any other circumstances is permitted solely under
176the conditions stated below. Sublicensing is not allowed; section 10
177makes it unnecessary.
178
179 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180
181 No covered work shall be deemed part of an effective technological
182measure under any applicable law fulfilling obligations under article
18311 of the WIPO copyright treaty adopted on 20 December 1996, or
184similar laws prohibiting or restricting circumvention of such
185measures.
186
187 When you convey a covered work, you waive any legal power to forbid
188circumvention of technological measures to the extent such circumvention
189is effected by exercising rights under this License with respect to
190the covered work, and you disclaim any intention to limit operation or
191modification of the work as a means of enforcing, against the work's
192users, your or third parties' legal rights to forbid circumvention of
193technological measures.
194
195 4. Conveying Verbatim Copies.
196
197 You may convey verbatim copies of the Program's source code as you
198receive it, in any medium, provided that you conspicuously and
199appropriately publish on each copy an appropriate copyright notice;
200keep intact all notices stating that this License and any
201non-permissive terms added in accord with section 7 apply to the code;
202keep intact all notices of the absence of any warranty; and give all
203recipients a copy of this License along with the Program.
204
205 You may charge any price or no price for each copy that you convey,
206and you may offer support or warranty protection for a fee.
207
208 5. Conveying Modified Source Versions.
209
210 You may convey a work based on the Program, or the modifications to
211produce it from the Program, in the form of source code under the
212terms of section 4, provided that you also meet all of these conditions:
213
214 a) The work must carry prominent notices stating that you modified
215 it, and giving a relevant date.
216
217 b) The work must carry prominent notices stating that it is
218 released under this License and any conditions added under section
219 7. This requirement modifies the requirement in section 4 to
220 "keep intact all notices".
221
222 c) You must license the entire work, as a whole, under this
223 License to anyone who comes into possession of a copy. This
224 License will therefore apply, along with any applicable section 7
225 additional terms, to the whole of the work, and all its parts,
226 regardless of how they are packaged. This License gives no
227 permission to license the work in any other way, but it does not
228 invalidate such permission if you have separately received it.
229
230 d) If the work has interactive user interfaces, each must display
231 Appropriate Legal Notices; however, if the Program has interactive
232 interfaces that do not display Appropriate Legal Notices, your
233 work need not make them do so.
234
235 A compilation of a covered work with other separate and independent
236works, which are not by their nature extensions of the covered work,
237and which are not combined with it such as to form a larger program,
238in or on a volume of a storage or distribution medium, is called an
239"aggregate" if the compilation and its resulting copyright are not
240used to limit the access or legal rights of the compilation's users
241beyond what the individual works permit. Inclusion of a covered work
242in an aggregate does not cause this License to apply to the other
243parts of the aggregate.
244
245 6. Conveying Non-Source Forms.
246
247 You may convey a covered work in object code form under the terms
248of sections 4 and 5, provided that you also convey the
249machine-readable Corresponding Source under the terms of this License,
250in one of these ways:
251
252 a) Convey the object code in, or embodied in, a physical product
253 (including a physical distribution medium), accompanied by the
254 Corresponding Source fixed on a durable physical medium
255 customarily used for software interchange.
256
257 b) Convey the object code in, or embodied in, a physical product
258 (including a physical distribution medium), accompanied by a
259 written offer, valid for at least three years and valid for as
260 long as you offer spare parts or customer support for that product
261 model, to give anyone who possesses the object code either (1) a
262 copy of the Corresponding Source for all the software in the
263 product that is covered by this License, on a durable physical
264 medium customarily used for software interchange, for a price no
265 more than your reasonable cost of physically performing this
266 conveying of source, or (2) access to copy the
267 Corresponding Source from a network server at no charge.
268
269 c) Convey individual copies of the object code with a copy of the
270 written offer to provide the Corresponding Source. This
271 alternative is allowed only occasionally and noncommercially, and
272 only if you received the object code with such an offer, in accord
273 with subsection 6b.
274
275 d) Convey the object code by offering access from a designated
276 place (gratis or for a charge), and offer equivalent access to the
277 Corresponding Source in the same way through the same place at no
278 further charge. You need not require recipients to copy the
279 Corresponding Source along with the object code. If the place to
280 copy the object code is a network server, the Corresponding Source
281 may be on a different server (operated by you or a third party)
282 that supports equivalent copying facilities, provided you maintain
283 clear directions next to the object code saying where to find the
284 Corresponding Source. Regardless of what server hosts the
285 Corresponding Source, you remain obligated to ensure that it is
286 available for as long as needed to satisfy these requirements.
287
288 e) Convey the object code using peer-to-peer transmission, provided
289 you inform other peers where the object code and Corresponding
290 Source of the work are being offered to the general public at no
291 charge under subsection 6d.
292
293 A separable portion of the object code, whose source code is excluded
294from the Corresponding Source as a System Library, need not be
295included in conveying the object code work.
296
297 A "User Product" is either (1) a "consumer product", which means any
298tangible personal property which is normally used for personal, family,
299or household purposes, or (2) anything designed or sold for incorporation
300into a dwelling. In determining whether a product is a consumer product,
301doubtful cases shall be resolved in favor of coverage. For a particular
302product received by a particular user, "normally used" refers to a
303typical or common use of that class of product, regardless of the status
304of the particular user or of the way in which the particular user
305actually uses, or expects or is expected to use, the product. A product
306is a consumer product regardless of whether the product has substantial
307commercial, industrial or non-consumer uses, unless such uses represent
308the only significant mode of use of the product.
309
310 "Installation Information" for a User Product means any methods,
311procedures, authorization keys, or other information required to install
312and execute modified versions of a covered work in that User Product from
313a modified version of its Corresponding Source. The information must
314suffice to ensure that the continued functioning of the modified object
315code is in no case prevented or interfered with solely because
316modification has been made.
317
318 If you convey an object code work under this section in, or with, or
319specifically for use in, a User Product, and the conveying occurs as
320part of a transaction in which the right of possession and use of the
321User Product is transferred to the recipient in perpetuity or for a
322fixed term (regardless of how the transaction is characterized), the
323Corresponding Source conveyed under this section must be accompanied
324by the Installation Information. But this requirement does not apply
325if neither you nor any third party retains the ability to install
326modified object code on the User Product (for example, the work has
327been installed in ROM).
328
329 The requirement to provide Installation Information does not include a
330requirement to continue to provide support service, warranty, or updates
331for a work that has been modified or installed by the recipient, or for
332the User Product in which it has been modified or installed. Access to a
333network may be denied when the modification itself materially and
334adversely affects the operation of the network or violates the rules and
335protocols for communication across the network.
336
337 Corresponding Source conveyed, and Installation Information provided,
338in accord with this section must be in a format that is publicly
339documented (and with an implementation available to the public in
340source code form), and must require no special password or key for
341unpacking, reading or copying.
342
343 7. Additional Terms.
344
345 "Additional permissions" are terms that supplement the terms of this
346License by making exceptions from one or more of its conditions.
347Additional permissions that are applicable to the entire Program shall
348be treated as though they were included in this License, to the extent
349that they are valid under applicable law. If additional permissions
350apply only to part of the Program, that part may be used separately
351under those permissions, but the entire Program remains governed by
352this License without regard to the additional permissions.
353
354 When you convey a copy of a covered work, you may at your option
355remove any additional permissions from that copy, or from any part of
356it. (Additional permissions may be written to require their own
357removal in certain cases when you modify the work.) You may place
358additional permissions on material, added by you to a covered work,
359for which you have or can give appropriate copyright permission.
360
361 Notwithstanding any other provision of this License, for material you
362add to a covered work, you may (if authorized by the copyright holders of
363that material) supplement the terms of this License with terms:
364
365 a) Disclaiming warranty or limiting liability differently from the
366 terms of sections 15 and 16 of this License; or
367
368 b) Requiring preservation of specified reasonable legal notices or
369 author attributions in that material or in the Appropriate Legal
370 Notices displayed by works containing it; or
371
372 c) Prohibiting misrepresentation of the origin of that material, or
373 requiring that modified versions of such material be marked in
374 reasonable ways as different from the original version; or
375
376 d) Limiting the use for publicity purposes of names of licensors or
377 authors of the material; or
378
379 e) Declining to grant rights under trademark law for use of some
380 trade names, trademarks, or service marks; or
381
382 f) Requiring indemnification of licensors and authors of that
383 material by anyone who conveys the material (or modified versions of
384 it) with contractual assumptions of liability to the recipient, for
385 any liability that these contractual assumptions directly impose on
386 those licensors and authors.
387
388 All other non-permissive additional terms are considered "further
389restrictions" within the meaning of section 10. If the Program as you
390received it, or any part of it, contains a notice stating that it is
391governed by this License along with a term that is a further
392restriction, you may remove that term. If a license document contains
393a further restriction but permits relicensing or conveying under this
394License, you may add to a covered work material governed by the terms
395of that license document, provided that the further restriction does
396not survive such relicensing or conveying.
397
398 If you add terms to a covered work in accord with this section, you
399must place, in the relevant source files, a statement of the
400additional terms that apply to those files, or a notice indicating
401where to find the applicable terms.
402
403 Additional terms, permissive or non-permissive, may be stated in the
404form of a separately written license, or stated as exceptions;
405the above requirements apply either way.
406
407 8. Termination.
408
409 You may not propagate or modify a covered work except as expressly
410provided under this License. Any attempt otherwise to propagate or
411modify it is void, and will automatically terminate your rights under
412this License (including any patent licenses granted under the third
413paragraph of section 11).
414
415 However, if you cease all violation of this License, then your
416license from a particular copyright holder is reinstated (a)
417provisionally, unless and until the copyright holder explicitly and
418finally terminates your license, and (b) permanently, if the copyright
419holder fails to notify you of the violation by some reasonable means
420prior to 60 days after the cessation.
421
422 Moreover, your license from a particular copyright holder is
423reinstated permanently if the copyright holder notifies you of the
424violation by some reasonable means, this is the first time you have
425received notice of violation of this License (for any work) from that
426copyright holder, and you cure the violation prior to 30 days after
427your receipt of the notice.
428
429 Termination of your rights under this section does not terminate the
430licenses of parties who have received copies or rights from you under
431this License. If your rights have been terminated and not permanently
432reinstated, you do not qualify to receive new licenses for the same
433material under section 10.
434
435 9. Acceptance Not Required for Having Copies.
436
437 You are not required to accept this License in order to receive or
438run a copy of the Program. Ancillary propagation of a covered work
439occurring solely as a consequence of using peer-to-peer transmission
440to receive a copy likewise does not require acceptance. However,
441nothing other than this License grants you permission to propagate or
442modify any covered work. These actions infringe copyright if you do
443not accept this License. Therefore, by modifying or propagating a
444covered work, you indicate your acceptance of this License to do so.
445
446 10. Automatic Licensing of Downstream Recipients.
447
448 Each time you convey a covered work, the recipient automatically
449receives a license from the original licensors, to run, modify and
450propagate that work, subject to this License. You are not responsible
451for enforcing compliance by third parties with this License.
452
453 An "entity transaction" is a transaction transferring control of an
454organization, or substantially all assets of one, or subdividing an
455organization, or merging organizations. If propagation of a covered
456work results from an entity transaction, each party to that
457transaction who receives a copy of the work also receives whatever
458licenses to the work the party's predecessor in interest had or could
459give under the previous paragraph, plus a right to possession of the
460Corresponding Source of the work from the predecessor in interest, if
461the predecessor has it or can get it with reasonable efforts.
462
463 You may not impose any further restrictions on the exercise of the
464rights granted or affirmed under this License. For example, you may
465not impose a license fee, royalty, or other charge for exercise of
466rights granted under this License, and you may not initiate litigation
467(including a cross-claim or counterclaim in a lawsuit) alleging that
468any patent claim is infringed by making, using, selling, offering for
469sale, or importing the Program or any portion of it.
470
471 11. Patents.
472
473 A "contributor" is a copyright holder who authorizes use under this
474License of the Program or a work on which the Program is based. The
475work thus licensed is called the contributor's "contributor version".
476
477 A contributor's "essential patent claims" are all patent claims
478owned or controlled by the contributor, whether already acquired or
479hereafter acquired, that would be infringed by some manner, permitted
480by this License, of making, using, or selling its contributor version,
481but do not include claims that would be infringed only as a
482consequence of further modification of the contributor version. For
483purposes of this definition, "control" includes the right to grant
484patent sublicenses in a manner consistent with the requirements of
485this License.
486
487 Each contributor grants you a non-exclusive, worldwide, royalty-free
488patent license under the contributor's essential patent claims, to
489make, use, sell, offer for sale, import and otherwise run, modify and
490propagate the contents of its contributor version.
491
492 In the following three paragraphs, a "patent license" is any express
493agreement or commitment, however denominated, not to enforce a patent
494(such as an express permission to practice a patent or covenant not to
495sue for patent infringement). To "grant" such a patent license to a
496party means to make such an agreement or commitment not to enforce a
497patent against the party.
498
499 If you convey a covered work, knowingly relying on a patent license,
500and the Corresponding Source of the work is not available for anyone
501to copy, free of charge and under the terms of this License, through a
502publicly available network server or other readily accessible means,
503then you must either (1) cause the Corresponding Source to be so
504available, or (2) arrange to deprive yourself of the benefit of the
505patent license for this particular work, or (3) arrange, in a manner
506consistent with the requirements of this License, to extend the patent
507license to downstream recipients. "Knowingly relying" means you have
508actual knowledge that, but for the patent license, your conveying the
509covered work in a country, or your recipient's use of the covered work
510in a country, would infringe one or more identifiable patents in that
511country that you have reason to believe are valid.
512
513 If, pursuant to or in connection with a single transaction or
514arrangement, you convey, or propagate by procuring conveyance of, a
515covered work, and grant a patent license to some of the parties
516receiving the covered work authorizing them to use, propagate, modify
517or convey a specific copy of the covered work, then the patent license
518you grant is automatically extended to all recipients of the covered
519work and works based on it.
520
521 A patent license is "discriminatory" if it does not include within
522the scope of its coverage, prohibits the exercise of, or is
523conditioned on the non-exercise of one or more of the rights that are
524specifically granted under this License. You may not convey a covered
525work if you are a party to an arrangement with a third party that is
526in the business of distributing software, under which you make payment
527to the third party based on the extent of your activity of conveying
528the work, and under which the third party grants, to any of the
529parties who would receive the covered work from you, a discriminatory
530patent license (a) in connection with copies of the covered work
531conveyed by you (or copies made from those copies), or (b) primarily
532for and in connection with specific products or compilations that
533contain the covered work, unless you entered into that arrangement,
534or that patent license was granted, prior to 28 March 2007.
535
536 Nothing in this License shall be construed as excluding or limiting
537any implied license or other defenses to infringement that may
538otherwise be available to you under applicable patent law.
539
540 12. No Surrender of Others' Freedom.
541
542 If conditions are imposed on you (whether by court order, agreement or
543otherwise) that contradict the conditions of this License, they do not
544excuse you from the conditions of this License. If you cannot convey a
545covered work so as to satisfy simultaneously your obligations under this
546License and any other pertinent obligations, then as a consequence you may
547not convey it at all. For example, if you agree to terms that obligate you
548to collect a royalty for further conveying from those to whom you convey
549the Program, the only way you could satisfy both those terms and this
550License would be to refrain entirely from conveying the Program.
551
552 13. Use with the GNU Affero General Public License.
553
554 Notwithstanding any other provision of this License, you have
555permission to link or combine any covered work with a work licensed
556under version 3 of the GNU Affero General Public License into a single
557combined work, and to convey the resulting work. The terms of this
558License will continue to apply to the part which is the covered work,
559but the special requirements of the GNU Affero General Public License,
560section 13, concerning interaction through a network will apply to the
561combination as such.
562
563 14. Revised Versions of this License.
564
565 The Free Software Foundation may publish revised and/or new versions of
566the GNU General Public License from time to time. Such new versions will
567be similar in spirit to the present version, but may differ in detail to
568address new problems or concerns.
569
570 Each version is given a distinguishing version number. If the
571Program specifies that a certain numbered version of the GNU General
572Public License "or any later version" applies to it, you have the
573option of following the terms and conditions either of that numbered
574version or of any later version published by the Free Software
575Foundation. If the Program does not specify a version number of the
576GNU General Public License, you may choose any version ever published
577by the Free Software Foundation.
578
579 If the Program specifies that a proxy can decide which future
580versions of the GNU General Public License can be used, that proxy's
581public statement of acceptance of a version permanently authorizes you
582to choose that version for the Program.
583
584 Later license versions may give you additional or different
585permissions. However, no additional obligations are imposed on any
586author or copyright holder as a result of your choosing to follow a
587later version.
588
589 15. Disclaimer of Warranty.
590
591 THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599
600 16. Limitation of Liability.
601
602 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610SUCH DAMAGES.
611
612 17. Interpretation of Sections 15 and 16.
613
614 If the disclaimer of warranty and limitation of liability provided
615above cannot be given local legal effect according to their terms,
616reviewing courts shall apply local law that most closely approximates
617an absolute waiver of all civil liability in connection with the
618Program, unless a warranty or assumption of liability accompanies a
619copy of the Program in return for a fee.
620
621 END OF TERMS AND CONDITIONS
622
623 How to Apply These Terms to Your New Programs
624
625 If you develop a new program, and you want it to be of the greatest
626possible use to the public, the best way to achieve this is to make it
627free software which everyone can redistribute and change under these terms.
628
629 To do so, attach the following notices to the program. It is safest
630to attach them to the start of each source file to most effectively
631state the exclusion of warranty; and each file should have at least
632the "copyright" line and a pointer to where the full notice is found.
633
634 <one line to give the program's name and a brief idea of what it does.>
635 Copyright (C) <year> <name of author>
636
637 This program is free software: you can redistribute it and/or modify
638 it under the terms of the GNU General Public License as published by
639 the Free Software Foundation, either version 3 of the License, or
640 (at your option) any later version.
641
642 This program is distributed in the hope that it will be useful,
643 but WITHOUT ANY WARRANTY; without even the implied warranty of
644 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 GNU General Public License for more details.
646
647 You should have received a copy of the GNU General Public License
648 along with this program. If not, see <http://www.gnu.org/licenses/>.
649
650Also add information on how to contact you by electronic and paper mail.
651
652 If the program does terminal interaction, make it output a short
653notice like this when it starts in an interactive mode:
654
655 <program> Copyright (C) <year> <name of author>
656 This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 This is free software, and you are welcome to redistribute it
658 under certain conditions; type `show c' for details.
659
660The hypothetical commands `show w' and `show c' should show the appropriate
661parts of the General Public License. Of course, your program's commands
662might be different; for a GUI interface, you would use an "about box".
663
664 You should also get your employer (if you work as a programmer) or school,
665if any, to sign a "copyright disclaimer" for the program, if necessary.
666For more information on this, and how to apply and follow the GNU GPL, see
667<http://www.gnu.org/licenses/>.
668
669 The GNU General Public License does not permit incorporating your program
670into proprietary programs. If your program is a subroutine library, you
671may consider it more useful to permit linking proprietary applications with
672the library. If this is what you want to do, use the GNU Lesser General
673Public License instead of this License. But first, please read
674<http://www.gnu.org/philosophy/why-not-lgpl.html>.
0675
=== added file 'COPYING.LGPL'
--- COPYING.LGPL 1970-01-01 00:00:00 +0000
+++ COPYING.LGPL 2017-01-03 04:38:36 +0000
@@ -0,0 +1,165 @@
1 GNU LESSER GENERAL PUBLIC LICENSE
2 Version 3, 29 June 2007
3
4 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5 Everyone is permitted to copy and distribute verbatim copies
6 of this license document, but changing it is not allowed.
7
8
9 This version of the GNU Lesser General Public License incorporates
10the terms and conditions of version 3 of the GNU General Public
11License, supplemented by the additional permissions listed below.
12
13 0. Additional Definitions.
14
15 As used herein, "this License" refers to version 3 of the GNU Lesser
16General Public License, and the "GNU GPL" refers to version 3 of the GNU
17General Public License.
18
19 "The Library" refers to a covered work governed by this License,
20other than an Application or a Combined Work as defined below.
21
22 An "Application" is any work that makes use of an interface provided
23by the Library, but which is not otherwise based on the Library.
24Defining a subclass of a class defined by the Library is deemed a mode
25of using an interface provided by the Library.
26
27 A "Combined Work" is a work produced by combining or linking an
28Application with the Library. The particular version of the Library
29with which the Combined Work was made is also called the "Linked
30Version".
31
32 The "Minimal Corresponding Source" for a Combined Work means the
33Corresponding Source for the Combined Work, excluding any source code
34for portions of the Combined Work that, considered in isolation, are
35based on the Application, and not on the Linked Version.
36
37 The "Corresponding Application Code" for a Combined Work means the
38object code and/or source code for the Application, including any data
39and utility programs needed for reproducing the Combined Work from the
40Application, but excluding the System Libraries of the Combined Work.
41
42 1. Exception to Section 3 of the GNU GPL.
43
44 You may convey a covered work under sections 3 and 4 of this License
45without being bound by section 3 of the GNU GPL.
46
47 2. Conveying Modified Versions.
48
49 If you modify a copy of the Library, and, in your modifications, a
50facility refers to a function or data to be supplied by an Application
51that uses the facility (other than as an argument passed when the
52facility is invoked), then you may convey a copy of the modified
53version:
54
55 a) under this License, provided that you make a good faith effort to
56 ensure that, in the event an Application does not supply the
57 function or data, the facility still operates, and performs
58 whatever part of its purpose remains meaningful, or
59
60 b) under the GNU GPL, with none of the additional permissions of
61 this License applicable to that copy.
62
63 3. Object Code Incorporating Material from Library Header Files.
64
65 The object code form of an Application may incorporate material from
66a header file that is part of the Library. You may convey such object
67code under terms of your choice, provided that, if the incorporated
68material is not limited to numerical parameters, data structure
69layouts and accessors, or small macros, inline functions and templates
70(ten or fewer lines in length), you do both of the following:
71
72 a) Give prominent notice with each copy of the object code that the
73 Library is used in it and that the Library and its use are
74 covered by this License.
75
76 b) Accompany the object code with a copy of the GNU GPL and this license
77 document.
78
79 4. Combined Works.
80
81 You may convey a Combined Work under terms of your choice that,
82taken together, effectively do not restrict modification of the
83portions of the Library contained in the Combined Work and reverse
84engineering for debugging such modifications, if you also do each of
85the following:
86
87 a) Give prominent notice with each copy of the Combined Work that
88 the Library is used in it and that the Library and its use are
89 covered by this License.
90
91 b) Accompany the Combined Work with a copy of the GNU GPL and this license
92 document.
93
94 c) For a Combined Work that displays copyright notices during
95 execution, include the copyright notice for the Library among
96 these notices, as well as a reference directing the user to the
97 copies of the GNU GPL and this license document.
98
99 d) Do one of the following:
100
101 0) Convey the Minimal Corresponding Source under the terms of this
102 License, and the Corresponding Application Code in a form
103 suitable for, and under terms that permit, the user to
104 recombine or relink the Application with a modified version of
105 the Linked Version to produce a modified Combined Work, in the
106 manner specified by section 6 of the GNU GPL for conveying
107 Corresponding Source.
108
109 1) Use a suitable shared library mechanism for linking with the
110 Library. A suitable mechanism is one that (a) uses at run time
111 a copy of the Library already present on the user's computer
112 system, and (b) will operate properly with a modified version
113 of the Library that is interface-compatible with the Linked
114 Version.
115
116 e) Provide Installation Information, but only if you would otherwise
117 be required to provide such information under section 6 of the
118 GNU GPL, and only to the extent that such information is
119 necessary to install and execute a modified version of the
120 Combined Work produced by recombining or relinking the
121 Application with a modified version of the Linked Version. (If
122 you use option 4d0, the Installation Information must accompany
123 the Minimal Corresponding Source and Corresponding Application
124 Code. If you use option 4d1, you must provide the Installation
125 Information in the manner specified by section 6 of the GNU GPL
126 for conveying Corresponding Source.)
127
128 5. Combined Libraries.
129
130 You may place library facilities that are a work based on the
131Library side by side in a single library together with other library
132facilities that are not Applications and are not covered by this
133License, and convey such a combined library under terms of your
134choice, if you do both of the following:
135
136 a) Accompany the combined library with a copy of the same work based
137 on the Library, uncombined with any other library facilities,
138 conveyed under the terms of this License.
139
140 b) Give prominent notice with the combined library that part of it
141 is a work based on the Library, and explaining where to find the
142 accompanying uncombined form of the same work.
143
144 6. Revised Versions of the GNU Lesser General Public License.
145
146 The Free Software Foundation may publish revised and/or new versions
147of the GNU Lesser General Public License from time to time. Such new
148versions will be similar in spirit to the present version, but may
149differ in detail to address new problems or concerns.
150
151 Each version is given a distinguishing version number. If the
152Library as you received it specifies that a certain numbered version
153of the GNU Lesser General Public License "or any later version"
154applies to it, you have the option of following the terms and
155conditions either of that published version or of any later version
156published by the Free Software Foundation. If the Library as you
157received it does not specify a version number of the GNU Lesser
158General Public License, you may choose any version of the GNU Lesser
159General Public License ever published by the Free Software Foundation.
160
161 If the Library as you received it specifies that a proxy can decide
162whether future versions of the GNU Lesser General Public License shall
163apply, that proxy's public statement of acceptance of any version is
164permanent authorization for you to choose that version for the
165Library.
0166
=== removed directory 'data'
=== removed file 'data/CMakeLists.txt'
--- data/CMakeLists.txt 2016-09-26 04:27:03 +0000
+++ data/CMakeLists.txt 1970-01-01 00:00:00 +0000
@@ -1,24 +0,0 @@
1# Copyright © 2016 Canonical Ltd.
2#
3# This program is free software: you can redistribute it and/or modify
4# it under the terms of the GNU General Public License version 3 as
5# published by the Free Software Foundation.
6#
7# This program is distributed in the hope that it will be useful,
8# but WITHOUT ANY WARRANTY; without even the implied warranty of
9# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10# GNU General Public License for more details.
11#
12# You should have received a copy of the GNU General Public License
13# along with this program. If not, see <http://www.gnu.org/licenses/>.
14#
15# Authored by: Gary Wang <gary.wang@canonical.com>
16
17configure_file(
18 onedrive.pc.in onedrive.pc @ONLY
19)
20
21install(
22 FILES ${CMAKE_CURRENT_BINARY_DIR}/onedrive.pc
23 DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
24)
250
=== removed file 'data/onedrive.pc.in'
--- data/onedrive.pc.in 2016-09-26 04:27:03 +0000
+++ data/onedrive.pc.in 1970-01-01 00:00:00 +0000
@@ -1,10 +0,0 @@
1prefix=@CMAKE_INSTALL_PREFIX@
2exec_prefix=${prefix}
3libdir=${exec_prefix}/lib
4includedir=${exec_prefix}/include
5
6Name: @CMAKE_PROJECT_NAME@
7Description: Cloud based content sharing library for Microsoft Onedrive service
8Version: @ONEDRIVE_LIB_VERSION_MAJOR@.@ONEDRIVE_LIB_VERSION_MINOR@.@ONEDRIVE_LIB_VERSION_PATCH@
9Libs: -L${libdir} -lonedrive
10Cflags: -I${includedir}
110
=== modified file 'debian/control'
--- debian/control 2016-12-07 02:13:37 +0000
+++ debian/control 2017-01-03 04:38:36 +0000
@@ -2,7 +2,7 @@
2Priority: optional2Priority: optional
3Maintainer: Gary Wang <gary.wang@canonical.com>3Maintainer: Gary Wang <gary.wang@canonical.com>
4Build-Depends: cmake,4Build-Depends: cmake,
5 cmake-extras (>= 0.4),5 cmake-extras (>= 0.10),
6 debhelper (>= 9),6 debhelper (>= 9),
7 doxygen,7 doxygen,
8 google-mock,8 google-mock,
99
=== modified file 'debian/copyright'
--- debian/copyright 2016-09-26 04:27:03 +0000
+++ debian/copyright 2017-01-03 04:38:36 +0000
@@ -1,22 +1,36 @@
1Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/1Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2Upstream-Name: onedrive2Upstream-Name: storage-provider-webdav
3Source: https://launchpad.net/onedrive3Source: https://launchpad.net/storage-provider-webdav
44
5Files: *5Files: *
6Copyright: Copyright (C) 2016 Canonical, Ltd.6Copyright: 2016 Canonical Ltd.
7License: LGPL-3.07License: GPL-3
8 This package is free software; you can redistribute it and/or8 This program is free software: you can redistribute it and/or modify
9 modify it under the terms of the GNU Lesser General Public9 it under the terms of the GNU General Public License version 3 as
10 License as published by the Free Software Foundation, version 3 of10 published by the Free Software Foundation.
11 the License.11 .
12 .12 This program is distributed in the hope that it will be useful,
13 This package is distributed in the hope that it will be useful,13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 but WITHOUT ANY WARRANTY; without even the implied warranty of14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU15 GNU General Public License for more details.
16 Lesser General Public License for more details.16 .
17 .17 On Debian/Ubuntu systems, the full text of the GPL v3 can be found in
18 You should have received a copy of the GNU General Public License18 `/usr/share/common-licenses/GPL-3'
19 along with this program. If not, see <http://www.gnu.org/licenses/>.19
20 .20Files: tests/unit/onedrive-provider/utils/DBusEnvironment.*
21 On Debian systems, the complete text of the GNU Lesser General21 tests/unit/onedrive-provider/utils/ProviderEnvironment.*
22 Public License can be found in /usr/share/common-licenses/LGPL-3.22 tests/unit/onedrive-provider/utils/fake-onlye-accounts-daemon.py
23Copyright: 2016 Canonical Ltd.
24License: LGPL-3
25 This program is free software: you can redistribute it and/or modify
26 it under the terms of version 3 of the GNU Lesser General Public
27 License as published by the Free Software Foundation.
28 .
29 This program is distributed in the hope that it will be useful,
30 but WITHOUT ANY WARRANTY; without even the implied warranty of
31 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 GNU Lesser General Public License for more details.
33 .
34 On Debian systems, the full text of the GNU Lesser General Public
35 License version 3 can be found in the file
36 `/usr/share/common-licenses/LGPL-3'
2337
=== removed file 'debian/libonedrive-dev.install'
--- debian/libonedrive-dev.install 2016-09-26 04:27:03 +0000
+++ debian/libonedrive-dev.install 1970-01-01 00:00:00 +0000
@@ -1,3 +0,0 @@
1usr/include/onedrive/*
2usr/lib/*/libonedrive.so
3usr/lib/*/pkgconfig/*
40
=== removed file 'debian/libonedrive-doc.install'
--- debian/libonedrive-doc.install 2016-09-26 04:27:03 +0000
+++ debian/libonedrive-doc.install 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
1usr/share/doc/onedrive/
20
=== removed file 'debian/libonedrive0.install'
--- debian/libonedrive0.install 2016-09-26 04:27:03 +0000
+++ debian/libonedrive0.install 1970-01-01 00:00:00 +0000
@@ -1,3 +0,0 @@
1usr/lib/*/lib*.so.*
2usr/bin/*
3usr/share/dbus-1/services/*
40
=== modified file 'debian/rules' (properties changed: +x to -x)
--- debian/rules 2016-09-26 04:27:03 +0000
+++ debian/rules 2017-01-03 04:38:36 +0000
@@ -1,9 +1,10 @@
1#!/usr/bin/make -f1#!/usr/bin/make -f
2# -*- makefile -*-2# -*- makefile -*-
33
4export DPKG_GENSYMBOLS_CHECK_LEVEL=44export QT_SELECT=qt5
5
6include /usr/share/dpkg/default.mk
75
8%:6%:
9 dh $@ --fail-missing7 dh $@ --parallel --fail-missing
8
9override_dh_auto_test:
10 dh_auto_test --max-parallel=1 -- ARGS="--verbose"
1011
=== added directory 'debian/source'
=== added file 'debian/source/format'
--- debian/source/format 1970-01-01 00:00:00 +0000
+++ debian/source/format 2017-01-03 04:38:36 +0000
@@ -0,0 +1,1 @@
11.0
02
=== removed directory 'doc'
=== removed file 'doc/CMakeLists.txt'
--- doc/CMakeLists.txt 2016-09-26 04:27:03 +0000
+++ doc/CMakeLists.txt 1970-01-01 00:00:00 +0000
@@ -1,23 +0,0 @@
1option(
2 ONEDRIVE_LIB_ENABLE_DOC_GENERATION
3 "Generate package documentation with doxygen"
4 ON
5)
6
7if (ONEDRIVE_LIB_ENABLE_DOC_GENERATION)
8 find_package(Doxygen)
9
10 if (DOXYGEN_FOUND)
11 configure_file(
12 ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
13 ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
14 add_custom_target(doc ALL
15 ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
16 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
17 COMMENT "Generating API documentation with Doxygen" VERBATIM)
18 install(
19 DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html
20 DESTINATION ${CMAKE_INSTALL_DOCDIR})
21
22 endif (DOXYGEN_FOUND)
23endif (ONEDRIVE_LIB_ENABLE_DOC_GENERATION)
240
=== removed file 'doc/Doxyfile.in'
--- doc/Doxyfile.in 2016-09-26 04:27:03 +0000
+++ doc/Doxyfile.in 1970-01-01 00:00:00 +0000
@@ -1,1869 +0,0 @@
1# Doxyfile 1.8.3.1
2
3# This file describes the settings to be used by the documentation system
4# doxygen (www.doxygen.org) for a project.
5#
6# All text after a hash (#) is considered a comment and will be ignored.
7# The format is:
8# TAG = value [value, ...]
9# For lists items can also be appended using:
10# TAG += value [value, ...]
11# Values that contain spaces should be placed between quotes (" ").
12
13#---------------------------------------------------------------------------
14# Project related configuration options
15#---------------------------------------------------------------------------
16
17# This tag specifies the encoding used for all characters in the config file
18# that follow. The default is UTF-8 which is also the encoding used for all
19# text before the first occurrence of this tag. Doxygen uses libiconv (or the
20# iconv built into libc) for the transcoding. See
21# http://www.gnu.org/software/libiconv for the list of possible encodings.
22
23DOXYFILE_ENCODING = UTF-8
24
25# The PROJECT_NAME tag is a single word (or sequence of words) that should
26# identify the project. Note that if you do not use Doxywizard you need
27# to put quotes around the project name if it contains spaces.
28
29PROJECT_NAME = @CMAKE_PROJECT_NAME@
30
31# The PROJECT_NUMBER tag can be used to enter a project or revision number.
32# This could be handy for archiving the generated documentation or
33# if some version control system is used.
34
35PROJECT_NUMBER = @ONEDIRVE_LIB_VERSION_MAJOR@.@ONEDIRVE_LIB_VERSION_MINOR@.@ONEDIRVE_LIB_VERSION_PATCH@
36
37# Using the PROJECT_BRIEF tag one can provide an optional one line description
38# for a project that appears at the top of each page and should give viewer
39# a quick idea about the purpose of the project. Keep the description short.
40
41PROJECT_BRIEF = "Onedrive API library For Microsoft OneDrive Service"
42
43# With the PROJECT_LOGO tag one can specify an logo or icon that is
44# included in the documentation. The maximum height of the logo should not
45# exceed 55 pixels and the maximum width should not exceed 200 pixels.
46# Doxygen will copy the logo to the output directory.
47
48PROJECT_LOGO =
49
50# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
51# base path where the generated documentation will be put.
52# If a relative path is entered, it will be relative to the location
53# where doxygen was started. If left blank the current directory will be used.
54
55OUTPUT_DIRECTORY =
56
57# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
58# 4096 sub-directories (in 2 levels) under the output directory of each output
59# format and will distribute the generated files over these directories.
60# Enabling this option can be useful when feeding doxygen a huge amount of
61# source files, where putting all generated files in the same directory would
62# otherwise cause performance problems for the file system.
63
64CREATE_SUBDIRS = NO
65
66# The OUTPUT_LANGUAGE tag is used to specify the language in which all
67# documentation generated by doxygen is written. Doxygen will use this
68# information to generate all constant output in the proper language.
69# The default language is English, other supported languages are:
70# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
71# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
72# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
73# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
74# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
75# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
76
77OUTPUT_LANGUAGE = English
78
79# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
80# include brief member descriptions after the members that are listed in
81# the file and class documentation (similar to JavaDoc).
82# Set to NO to disable this.
83
84BRIEF_MEMBER_DESC = YES
85
86# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
87# the brief description of a member or function before the detailed description.
88# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
89# brief descriptions will be completely suppressed.
90
91REPEAT_BRIEF = YES
92
93# This tag implements a quasi-intelligent brief description abbreviator
94# that is used to form the text in various listings. Each string
95# in this list, if found as the leading text of the brief description, will be
96# stripped from the text and the result after processing the whole list, is
97# used as the annotated text. Otherwise, the brief description is used as-is.
98# If left blank, the following values are used ("$name" is automatically
99# replaced with the name of the entity): "The $name class" "The $name widget"
100# "The $name file" "is" "provides" "specifies" "contains"
101# "represents" "a" "an" "the"
102
103ABBREVIATE_BRIEF =
104
105# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
106# Doxygen will generate a detailed section even if there is only a brief
107# description.
108
109ALWAYS_DETAILED_SEC = NO
110
111# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
112# inherited members of a class in the documentation of that class as if those
113# members were ordinary class members. Constructors, destructors and assignment
114# operators of the base classes will not be shown.
115
116INLINE_INHERITED_MEMB = NO
117
118# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
119# path before files name in the file list and in the header files. If set
120# to NO the shortest path that makes the file name unique will be used.
121
122FULL_PATH_NAMES = YES
123
124# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
125# can be used to strip a user-defined part of the path. Stripping is
126# only done if one of the specified strings matches the left-hand part of
127# the path. The tag can be used to show relative paths in the file list.
128# If left blank the directory from which doxygen is run is used as the
129# path to strip. Note that you specify absolute paths here, but also
130# relative paths, which will be relative from the directory where doxygen is
131# started.
132
133STRIP_FROM_PATH =
134
135# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
136# the path mentioned in the documentation of a class, which tells
137# the reader which header file to include in order to use a class.
138# If left blank only the name of the header file containing the class
139# definition is used. Otherwise one should specify the include paths that
140# are normally passed to the compiler using the -I flag.
141
142STRIP_FROM_INC_PATH =
143
144# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
145# (but less readable) file names. This can be useful if your file system
146# doesn't support long names like on DOS, Mac, or CD-ROM.
147
148SHORT_NAMES = NO
149
150# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
151# will interpret the first line (until the first dot) of a JavaDoc-style
152# comment as the brief description. If set to NO, the JavaDoc
153# comments will behave just like regular Qt-style comments
154# (thus requiring an explicit @brief command for a brief description.)
155
156JAVADOC_AUTOBRIEF = NO
157
158# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
159# interpret the first line (until the first dot) of a Qt-style
160# comment as the brief description. If set to NO, the comments
161# will behave just like regular Qt-style comments (thus requiring
162# an explicit \brief command for a brief description.)
163
164QT_AUTOBRIEF = NO
165
166# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
167# treat a multi-line C++ special comment block (i.e. a block of //! or ///
168# comments) as a brief description. This used to be the default behaviour.
169# The new default is to treat a multi-line C++ comment block as a detailed
170# description. Set this tag to YES if you prefer the old behaviour instead.
171
172MULTILINE_CPP_IS_BRIEF = NO
173
174# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
175# member inherits the documentation from any documented member that it
176# re-implements.
177
178INHERIT_DOCS = YES
179
180# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
181# a new page for each member. If set to NO, the documentation of a member will
182# be part of the file/class/namespace that contains it.
183
184SEPARATE_MEMBER_PAGES = NO
185
186# The TAB_SIZE tag can be used to set the number of spaces in a tab.
187# Doxygen uses this value to replace tabs by spaces in code fragments.
188
189TAB_SIZE = 4
190
191# This tag can be used to specify a number of aliases that acts
192# as commands in the documentation. An alias has the form "name=value".
193# For example adding "sideeffect=\par Side Effects:\n" will allow you to
194# put the command \sideeffect (or @sideeffect) in the documentation, which
195# will result in a user-defined paragraph with heading "Side Effects:".
196# You can put \n's in the value part of an alias to insert newlines.
197
198ALIASES =
199
200# This tag can be used to specify a number of word-keyword mappings (TCL only).
201# A mapping has the form "name=value". For example adding
202# "class=itcl::class" will allow you to use the command class in the
203# itcl::class meaning.
204
205TCL_SUBST =
206
207# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
208# sources only. Doxygen will then generate output that is more tailored for C.
209# For instance, some of the names that are used will be different. The list
210# of all members will be omitted, etc.
211
212OPTIMIZE_OUTPUT_FOR_C = NO
213
214# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
215# sources only. Doxygen will then generate output that is more tailored for
216# Java. For instance, namespaces will be presented as packages, qualified
217# scopes will look different, etc.
218
219OPTIMIZE_OUTPUT_JAVA = NO
220
221# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
222# sources only. Doxygen will then generate output that is more tailored for
223# Fortran.
224
225OPTIMIZE_FOR_FORTRAN = NO
226
227# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
228# sources. Doxygen will then generate output that is tailored for
229# VHDL.
230
231OPTIMIZE_OUTPUT_VHDL = NO
232
233# Doxygen selects the parser to use depending on the extension of the files it
234# parses. With this tag you can assign which parser to use for a given
235# extension. Doxygen has a built-in mapping, but you can override or extend it
236# using this tag. The format is ext=language, where ext is a file extension,
237# and language is one of the parsers supported by doxygen: IDL, Java,
238# Javascript, CSharp, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL, C,
239# C++. For instance to make doxygen treat .inc files as Fortran files (default
240# is PHP), and .f files as C (default is Fortran), use: inc=Fortran f=C. Note
241# that for custom extensions you also need to set FILE_PATTERNS otherwise the
242# files are not read by doxygen.
243
244EXTENSION_MAPPING =
245
246# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all
247# comments according to the Markdown format, which allows for more readable
248# documentation. See http://daringfireball.net/projects/markdown/ for details.
249# The output of markdown processing is further processed by doxygen, so you
250# can mix doxygen, HTML, and XML commands with Markdown formatting.
251# Disable only in case of backward compatibilities issues.
252
253MARKDOWN_SUPPORT = YES
254
255# When enabled doxygen tries to link words that correspond to documented classes,
256# or namespaces to their corresponding documentation. Such a link can be
257# prevented in individual cases by by putting a % sign in front of the word or
258# globally by setting AUTOLINK_SUPPORT to NO.
259
260AUTOLINK_SUPPORT = YES
261
262# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
263# to include (a tag file for) the STL sources as input, then you should
264# set this tag to YES in order to let doxygen match functions declarations and
265# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
266# func(std::string) {}). This also makes the inheritance and collaboration
267# diagrams that involve STL classes more complete and accurate.
268
269BUILTIN_STL_SUPPORT = YES
270
271# If you use Microsoft's C++/CLI language, you should set this option to YES to
272# enable parsing support.
273
274CPP_CLI_SUPPORT = NO
275
276# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
277# Doxygen will parse them like normal C++ but will assume all classes use public
278# instead of private inheritance when no explicit protection keyword is present.
279
280SIP_SUPPORT = NO
281
282# For Microsoft's IDL there are propget and propput attributes to indicate
283# getter and setter methods for a property. Setting this option to YES (the
284# default) will make doxygen replace the get and set methods by a property in
285# the documentation. This will only work if the methods are indeed getting or
286# setting a simple type. If this is not the case, or you want to show the
287# methods anyway, you should set this option to NO.
288
289IDL_PROPERTY_SUPPORT = YES
290
291# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
292# tag is set to YES, then doxygen will reuse the documentation of the first
293# member in the group (if any) for the other members of the group. By default
294# all members of a group must be documented explicitly.
295
296DISTRIBUTE_GROUP_DOC = NO
297
298# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
299# the same type (for instance a group of public functions) to be put as a
300# subgroup of that type (e.g. under the Public Functions section). Set it to
301# NO to prevent subgrouping. Alternatively, this can be done per class using
302# the \nosubgrouping command.
303
304SUBGROUPING = YES
305
306# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and
307# unions are shown inside the group in which they are included (e.g. using
308# @ingroup) instead of on a separate page (for HTML and Man pages) or
309# section (for LaTeX and RTF).
310
311INLINE_GROUPED_CLASSES = NO
312
313# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and
314# unions with only public data fields will be shown inline in the documentation
315# of the scope in which they are defined (i.e. file, namespace, or group
316# documentation), provided this scope is documented. If set to NO (the default),
317# structs, classes, and unions are shown on a separate page (for HTML and Man
318# pages) or section (for LaTeX and RTF).
319
320INLINE_SIMPLE_STRUCTS = NO
321
322# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
323# is documented as struct, union, or enum with the name of the typedef. So
324# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
325# with name TypeT. When disabled the typedef will appear as a member of a file,
326# namespace, or class. And the struct will be named TypeS. This can typically
327# be useful for C code in case the coding convention dictates that all compound
328# types are typedef'ed and only the typedef is referenced, never the tag name.
329
330TYPEDEF_HIDES_STRUCT = NO
331
332# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
333# determine which symbols to keep in memory and which to flush to disk.
334# When the cache is full, less often used symbols will be written to disk.
335# For small to medium size projects (<1000 input files) the default value is
336# probably good enough. For larger projects a too small cache size can cause
337# doxygen to be busy swapping symbols to and from disk most of the time
338# causing a significant performance penalty.
339# If the system has enough physical memory increasing the cache will improve the
340# performance by keeping more symbols in memory. Note that the value works on
341# a logarithmic scale so increasing the size by one will roughly double the
342# memory usage. The cache size is given by this formula:
343# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
344# corresponding to a cache size of 2^16 = 65536 symbols.
345
346SYMBOL_CACHE_SIZE = 0
347
348# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
349# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
350# their name and scope. Since this can be an expensive process and often the
351# same symbol appear multiple times in the code, doxygen keeps a cache of
352# pre-resolved symbols. If the cache is too small doxygen will become slower.
353# If the cache is too large, memory is wasted. The cache size is given by this
354# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0,
355# corresponding to a cache size of 2^16 = 65536 symbols.
356
357LOOKUP_CACHE_SIZE = 0
358
359#---------------------------------------------------------------------------
360# Build related configuration options
361#---------------------------------------------------------------------------
362
363# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
364# documentation are documented, even if no documentation was available.
365# Private class members and static file members will be hidden unless
366# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
367
368EXTRACT_ALL = YES
369
370# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
371# will be included in the documentation.
372
373EXTRACT_PRIVATE = NO
374
375# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
376# scope will be included in the documentation.
377
378EXTRACT_PACKAGE = NO
379
380# If the EXTRACT_STATIC tag is set to YES all static members of a file
381# will be included in the documentation.
382
383EXTRACT_STATIC = NO
384
385# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
386# defined locally in source files will be included in the documentation.
387# If set to NO only classes defined in header files are included.
388
389EXTRACT_LOCAL_CLASSES = YES
390
391# This flag is only useful for Objective-C code. When set to YES local
392# methods, which are defined in the implementation section but not in
393# the interface are included in the documentation.
394# If set to NO (the default) only methods in the interface are included.
395
396EXTRACT_LOCAL_METHODS = NO
397
398# If this flag is set to YES, the members of anonymous namespaces will be
399# extracted and appear in the documentation as a namespace called
400# 'anonymous_namespace{file}', where file will be replaced with the base
401# name of the file that contains the anonymous namespace. By default
402# anonymous namespaces are hidden.
403
404EXTRACT_ANON_NSPACES = NO
405
406# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
407# undocumented members of documented classes, files or namespaces.
408# If set to NO (the default) these members will be included in the
409# various overviews, but no documentation section is generated.
410# This option has no effect if EXTRACT_ALL is enabled.
411
412HIDE_UNDOC_MEMBERS = NO
413
414# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
415# undocumented classes that are normally visible in the class hierarchy.
416# If set to NO (the default) these classes will be included in the various
417# overviews. This option has no effect if EXTRACT_ALL is enabled.
418
419HIDE_UNDOC_CLASSES = NO
420
421# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
422# friend (class|struct|union) declarations.
423# If set to NO (the default) these declarations will be included in the
424# documentation.
425
426HIDE_FRIEND_COMPOUNDS = NO
427
428# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
429# documentation blocks found inside the body of a function.
430# If set to NO (the default) these blocks will be appended to the
431# function's detailed documentation block.
432
433HIDE_IN_BODY_DOCS = NO
434
435# The INTERNAL_DOCS tag determines if documentation
436# that is typed after a \internal command is included. If the tag is set
437# to NO (the default) then the documentation will be excluded.
438# Set it to YES to include the internal documentation.
439
440INTERNAL_DOCS = NO
441
442# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
443# file names in lower-case letters. If set to YES upper-case letters are also
444# allowed. This is useful if you have classes or files whose names only differ
445# in case and if your file system supports case sensitive file names. Windows
446# and Mac users are advised to set this option to NO.
447
448CASE_SENSE_NAMES = YES
449
450# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
451# will show members with their full class and namespace scopes in the
452# documentation. If set to YES the scope will be hidden.
453
454HIDE_SCOPE_NAMES = NO
455
456# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
457# will put a list of the files that are included by a file in the documentation
458# of that file.
459
460SHOW_INCLUDE_FILES = YES
461
462# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
463# will list include files with double quotes in the documentation
464# rather than with sharp brackets.
465
466FORCE_LOCAL_INCLUDES = NO
467
468# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
469# is inserted in the documentation for inline members.
470
471INLINE_INFO = YES
472
473# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
474# will sort the (detailed) documentation of file and class members
475# alphabetically by member name. If set to NO the members will appear in
476# declaration order.
477
478SORT_MEMBER_DOCS = YES
479
480# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
481# brief documentation of file, namespace and class members alphabetically
482# by member name. If set to NO (the default) the members will appear in
483# declaration order.
484
485SORT_BRIEF_DOCS = NO
486
487# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
488# will sort the (brief and detailed) documentation of class members so that
489# constructors and destructors are listed first. If set to NO (the default)
490# the constructors will appear in the respective orders defined by
491# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
492# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
493# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
494
495SORT_MEMBERS_CTORS_1ST = NO
496
497# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
498# hierarchy of group names into alphabetical order. If set to NO (the default)
499# the group names will appear in their defined order.
500
501SORT_GROUP_NAMES = NO
502
503# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
504# sorted by fully-qualified names, including namespaces. If set to
505# NO (the default), the class list will be sorted only by class name,
506# not including the namespace part.
507# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
508# Note: This option applies only to the class list, not to the
509# alphabetical list.
510
511SORT_BY_SCOPE_NAME = NO
512
513# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to
514# do proper type resolution of all parameters of a function it will reject a
515# match between the prototype and the implementation of a member function even
516# if there is only one candidate or it is obvious which candidate to choose
517# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen
518# will still accept a match between prototype and implementation in such cases.
519
520STRICT_PROTO_MATCHING = NO
521
522# The GENERATE_TODOLIST tag can be used to enable (YES) or
523# disable (NO) the todo list. This list is created by putting \todo
524# commands in the documentation.
525
526GENERATE_TODOLIST = YES
527
528# The GENERATE_TESTLIST tag can be used to enable (YES) or
529# disable (NO) the test list. This list is created by putting \test
530# commands in the documentation.
531
532GENERATE_TESTLIST = YES
533
534# The GENERATE_BUGLIST tag can be used to enable (YES) or
535# disable (NO) the bug list. This list is created by putting \bug
536# commands in the documentation.
537
538GENERATE_BUGLIST = YES
539
540# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
541# disable (NO) the deprecated list. This list is created by putting
542# \deprecated commands in the documentation.
543
544GENERATE_DEPRECATEDLIST= YES
545
546# The ENABLED_SECTIONS tag can be used to enable conditional
547# documentation sections, marked by \if section-label ... \endif
548# and \cond section-label ... \endcond blocks.
549
550ENABLED_SECTIONS =
551
552# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
553# the initial value of a variable or macro consists of for it to appear in
554# the documentation. If the initializer consists of more lines than specified
555# here it will be hidden. Use a value of 0 to hide initializers completely.
556# The appearance of the initializer of individual variables and macros in the
557# documentation can be controlled using \showinitializer or \hideinitializer
558# command in the documentation regardless of this setting.
559
560MAX_INITIALIZER_LINES = 30
561
562# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
563# at the bottom of the documentation of classes and structs. If set to YES the
564# list will mention the files that were used to generate the documentation.
565
566SHOW_USED_FILES = YES
567
568# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
569# This will remove the Files entry from the Quick Index and from the
570# Folder Tree View (if specified). The default is YES.
571
572SHOW_FILES = YES
573
574# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
575# Namespaces page.
576# This will remove the Namespaces entry from the Quick Index
577# and from the Folder Tree View (if specified). The default is YES.
578
579SHOW_NAMESPACES = YES
580
581# The FILE_VERSION_FILTER tag can be used to specify a program or script that
582# doxygen should invoke to get the current version for each file (typically from
583# the version control system). Doxygen will invoke the program by executing (via
584# popen()) the command <command> <input-file>, where <command> is the value of
585# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
586# provided by doxygen. Whatever the program writes to standard output
587# is used as the file version. See the manual for examples.
588
589FILE_VERSION_FILTER =
590
591# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
592# by doxygen. The layout file controls the global structure of the generated
593# output files in an output format independent way. To create the layout file
594# that represents doxygen's defaults, run doxygen with the -l option.
595# You can optionally specify a file name after the option, if omitted
596# DoxygenLayout.xml will be used as the name of the layout file.
597
598LAYOUT_FILE =
599
600# The CITE_BIB_FILES tag can be used to specify one or more bib files
601# containing the references data. This must be a list of .bib files. The
602# .bib extension is automatically appended if omitted. Using this command
603# requires the bibtex tool to be installed. See also
604# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style
605# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this
606# feature you need bibtex and perl available in the search path. Do not use
607# file names with spaces, bibtex cannot handle them.
608
609CITE_BIB_FILES =
610
611#---------------------------------------------------------------------------
612# configuration options related to warning and progress messages
613#---------------------------------------------------------------------------
614
615# The QUIET tag can be used to turn on/off the messages that are generated
616# by doxygen. Possible values are YES and NO. If left blank NO is used.
617
618QUIET = NO
619
620# The WARNINGS tag can be used to turn on/off the warning messages that are
621# generated by doxygen. Possible values are YES and NO. If left blank
622# NO is used.
623
624WARNINGS = YES
625
626# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
627# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
628# automatically be disabled.
629
630WARN_IF_UNDOCUMENTED = YES
631
632# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
633# potential errors in the documentation, such as not documenting some
634# parameters in a documented function, or documenting parameters that
635# don't exist or using markup commands wrongly.
636
637WARN_IF_DOC_ERROR = YES
638
639# The WARN_NO_PARAMDOC option can be enabled to get warnings for
640# functions that are documented, but have no documentation for their parameters
641# or return value. If set to NO (the default) doxygen will only warn about
642# wrong or incomplete parameter documentation, but not about the absence of
643# documentation.
644
645WARN_NO_PARAMDOC = NO
646
647# The WARN_FORMAT tag determines the format of the warning messages that
648# doxygen can produce. The string should contain the $file, $line, and $text
649# tags, which will be replaced by the file and line number from which the
650# warning originated and the warning text. Optionally the format may contain
651# $version, which will be replaced by the version of the file (if it could
652# be obtained via FILE_VERSION_FILTER)
653
654WARN_FORMAT = "$file:$line: $text"
655
656# The WARN_LOGFILE tag can be used to specify a file to which warning
657# and error messages should be written. If left blank the output is written
658# to stderr.
659
660WARN_LOGFILE =
661
662#---------------------------------------------------------------------------
663# configuration options related to the input files
664#---------------------------------------------------------------------------
665
666# The INPUT tag can be used to specify the files and/or directories that contain
667# documented source files. You may enter file names like "myfile.cpp" or
668# directories like "/usr/src/myproject". Separate the files or directories
669# with spaces.
670
671INPUT = @CMAKE_SOURCE_DIR@/include @CMAKE_CURRENT_SOURCE_DIR@
672
673# This tag can be used to specify the character encoding of the source files
674# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
675# also the default input encoding. Doxygen uses libiconv (or the iconv built
676# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
677# the list of possible encodings.
678
679INPUT_ENCODING = UTF-8
680
681# If the value of the INPUT tag contains directories, you can use the
682# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
683# and *.h) to filter out the source-files in the directories. If left
684# blank the following patterns are tested:
685# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh
686# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
687# *.f90 *.f *.for *.vhd *.vhdl
688
689FILE_PATTERNS =
690
691# The RECURSIVE tag can be used to turn specify whether or not subdirectories
692# should be searched for input files as well. Possible values are YES and NO.
693# If left blank NO is used.
694
695RECURSIVE = YES
696
697# The EXCLUDE tag can be used to specify files and/or directories that should be
698# excluded from the INPUT source files. This way you can easily exclude a
699# subdirectory from a directory tree whose root is specified with the INPUT tag.
700# Note that relative paths are relative to the directory from which doxygen is
701# run.
702
703EXCLUDE =
704
705# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
706# directories that are symbolic links (a Unix file system feature) are excluded
707# from the input.
708
709EXCLUDE_SYMLINKS = NO
710
711# If the value of the INPUT tag contains directories, you can use the
712# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
713# certain files from those directories. Note that the wildcards are matched
714# against the file with absolute path, so to exclude all test directories
715# for example use the pattern */test/*
716
717EXCLUDE_PATTERNS =
718
719# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
720# (namespaces, classes, functions, etc.) that should be excluded from the
721# output. The symbol name can be a fully qualified name, a word, or if the
722# wildcard * is used, a substring. Examples: ANamespace, AClass,
723# AClass::ANamespace, ANamespace::*Test
724
725EXCLUDE_SYMBOLS =
726
727# The EXAMPLE_PATH tag can be used to specify one or more files or
728# directories that contain example code fragments that are included (see
729# the \include command).
730
731EXAMPLE_PATH = @CMAKE_CURRENT_SOURCE_DIR@/../tests
732
733# If the value of the EXAMPLE_PATH tag contains directories, you can use the
734# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
735# and *.h) to filter out the source-files in the directories. If left
736# blank all files are included.
737
738EXAMPLE_PATTERNS =
739
740# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
741# searched for input files to be used with the \include or \dontinclude
742# commands irrespective of the value of the RECURSIVE tag.
743# Possible values are YES and NO. If left blank NO is used.
744
745EXAMPLE_RECURSIVE = YES
746
747# The IMAGE_PATH tag can be used to specify one or more files or
748# directories that contain image that are included in the documentation (see
749# the \image command).
750
751IMAGE_PATH =
752
753# The INPUT_FILTER tag can be used to specify a program that doxygen should
754# invoke to filter for each input file. Doxygen will invoke the filter program
755# by executing (via popen()) the command <filter> <input-file>, where <filter>
756# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
757# input file. Doxygen will then use the output that the filter program writes
758# to standard output.
759# If FILTER_PATTERNS is specified, this tag will be
760# ignored.
761
762INPUT_FILTER =
763
764# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
765# basis.
766# Doxygen will compare the file name with each pattern and apply the
767# filter if there is a match.
768# The filters are a list of the form:
769# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
770# info on how filters are used. If FILTER_PATTERNS is empty or if
771# non of the patterns match the file name, INPUT_FILTER is applied.
772
773FILTER_PATTERNS =
774
775# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
776# INPUT_FILTER) will be used to filter the input files when producing source
777# files to browse (i.e. when SOURCE_BROWSER is set to YES).
778
779FILTER_SOURCE_FILES = NO
780
781# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
782# pattern. A pattern will override the setting for FILTER_PATTERN (if any)
783# and it is also possible to disable source filtering for a specific pattern
784# using *.ext= (so without naming a filter). This option only has effect when
785# FILTER_SOURCE_FILES is enabled.
786
787FILTER_SOURCE_PATTERNS =
788
789# If the USE_MD_FILE_AS_MAINPAGE tag refers to the name of a markdown file that
790# is part of the input, its contents will be placed on the main page (index.html).
791# This can be useful if you have a project on for instance GitHub and want reuse
792# the introduction page also for the doxygen output.
793
794USE_MDFILE_AS_MAINPAGE = @CMAKE_SOURCE_DIR@/README.md
795
796#---------------------------------------------------------------------------
797# configuration options related to source browsing
798#---------------------------------------------------------------------------
799
800# If the SOURCE_BROWSER tag is set to YES then a list of source files will
801# be generated. Documented entities will be cross-referenced with these sources.
802# Note: To get rid of all source code in the generated output, make sure also
803# VERBATIM_HEADERS is set to NO.
804
805SOURCE_BROWSER = YES
806
807# Setting the INLINE_SOURCES tag to YES will include the body
808# of functions and classes directly in the documentation.
809
810INLINE_SOURCES = NO
811
812# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
813# doxygen to hide any special comment blocks from generated source code
814# fragments. Normal C, C++ and Fortran comments will always remain visible.
815
816STRIP_CODE_COMMENTS = YES
817
818# If the REFERENCED_BY_RELATION tag is set to YES
819# then for each documented function all documented
820# functions referencing it will be listed.
821
822REFERENCED_BY_RELATION = YES
823
824# If the REFERENCES_RELATION tag is set to YES
825# then for each documented function all documented entities
826# called/used by that function will be listed.
827
828REFERENCES_RELATION = YES
829
830# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
831# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
832# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
833# link to the source code.
834# Otherwise they will link to the documentation.
835
836REFERENCES_LINK_SOURCE = YES
837
838# If the USE_HTAGS tag is set to YES then the references to source code
839# will point to the HTML generated by the htags(1) tool instead of doxygen
840# built-in source browser. The htags tool is part of GNU's global source
841# tagging system (see http://www.gnu.org/software/global/global.html). You
842# will need version 4.8.6 or higher.
843
844USE_HTAGS = NO
845
846# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
847# will generate a verbatim copy of the header file for each class for
848# which an include is specified. Set to NO to disable this.
849
850VERBATIM_HEADERS = YES
851
852#---------------------------------------------------------------------------
853# configuration options related to the alphabetical class index
854#---------------------------------------------------------------------------
855
856# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
857# of all compounds will be generated. Enable this if the project
858# contains a lot of classes, structs, unions or interfaces.
859
860ALPHABETICAL_INDEX = YES
861
862# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
863# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
864# in which this list will be split (can be a number in the range [1..20])
865
866COLS_IN_ALPHA_INDEX = 5
867
868# In case all classes in a project start with a common prefix, all
869# classes will be put under the same header in the alphabetical index.
870# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
871# should be ignored while generating the index headers.
872
873IGNORE_PREFIX =
874
875#---------------------------------------------------------------------------
876# configuration options related to the HTML output
877#---------------------------------------------------------------------------
878
879# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
880# generate HTML output.
881
882GENERATE_HTML = YES
883
884# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
885# If a relative path is entered the value of OUTPUT_DIRECTORY will be
886# put in front of it. If left blank `html' will be used as the default path.
887
888HTML_OUTPUT = html
889
890# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
891# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
892# doxygen will generate files with .html extension.
893
894HTML_FILE_EXTENSION = .html
895
896# The HTML_HEADER tag can be used to specify a personal HTML header for
897# each generated HTML page. If it is left blank doxygen will generate a
898# standard header. Note that when using a custom header you are responsible
899# for the proper inclusion of any scripts and style sheets that doxygen
900# needs, which is dependent on the configuration options used.
901# It is advised to generate a default header using "doxygen -w html
902# header.html footer.html stylesheet.css YourConfigFile" and then modify
903# that header. Note that the header is subject to change so you typically
904# have to redo this when upgrading to a newer version of doxygen or when
905# changing the value of configuration settings such as GENERATE_TREEVIEW!
906
907HTML_HEADER =
908
909# The HTML_FOOTER tag can be used to specify a personal HTML footer for
910# each generated HTML page. If it is left blank doxygen will generate a
911# standard footer.
912
913HTML_FOOTER =
914
915# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
916# style sheet that is used by each HTML page. It can be used to
917# fine-tune the look of the HTML output. If left blank doxygen will
918# generate a default style sheet. Note that it is recommended to use
919# HTML_EXTRA_STYLESHEET instead of this one, as it is more robust and this
920# tag will in the future become obsolete.
921
922HTML_STYLESHEET =
923
924# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional
925# user-defined cascading style sheet that is included after the standard
926# style sheets created by doxygen. Using this option one can overrule
927# certain style aspects. This is preferred over using HTML_STYLESHEET
928# since it does not replace the standard style sheet and is therefor more
929# robust against future updates. Doxygen will copy the style sheet file to
930# the output directory.
931
932HTML_EXTRA_STYLESHEET = @CMAKE_CURRENT_SOURCE_DIR@/extra.css
933
934# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
935# other source files which should be copied to the HTML output directory. Note
936# that these files will be copied to the base HTML output directory. Use the
937# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
938# files. In the HTML_STYLESHEET file, use the file name only. Also note that
939# the files will be copied as-is; there are no commands or markers available.
940
941HTML_EXTRA_FILES =
942
943# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
944# Doxygen will adjust the colors in the style sheet and background images
945# according to this color. Hue is specified as an angle on a colorwheel,
946# see http://en.wikipedia.org/wiki/Hue for more information.
947# For instance the value 0 represents red, 60 is yellow, 120 is green,
948# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
949# The allowed range is 0 to 359.
950
951HTML_COLORSTYLE_HUE = 220
952
953# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
954# the colors in the HTML output. For a value of 0 the output will use
955# grayscales only. A value of 255 will produce the most vivid colors.
956
957HTML_COLORSTYLE_SAT = 100
958
959# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
960# the luminance component of the colors in the HTML output. Values below
961# 100 gradually make the output lighter, whereas values above 100 make
962# the output darker. The value divided by 100 is the actual gamma applied,
963# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
964# and 100 does not change the gamma.
965
966HTML_COLORSTYLE_GAMMA = 80
967
968# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
969# page will contain the date and time when the page was generated. Setting
970# this to NO can help when comparing the output of multiple runs.
971
972HTML_TIMESTAMP = YES
973
974# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
975# documentation will contain sections that can be hidden and shown after the
976# page has loaded.
977
978HTML_DYNAMIC_SECTIONS = YES
979
980# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of
981# entries shown in the various tree structured indices initially; the user
982# can expand and collapse entries dynamically later on. Doxygen will expand
983# the tree to such a level that at most the specified number of entries are
984# visible (unless a fully collapsed tree already exceeds this amount).
985# So setting the number of entries 1 will produce a full collapsed tree by
986# default. 0 is a special value representing an infinite number of entries
987# and will result in a full expanded tree by default.
988
989HTML_INDEX_NUM_ENTRIES = 100
990
991# If the GENERATE_DOCSET tag is set to YES, additional index files
992# will be generated that can be used as input for Apple's Xcode 3
993# integrated development environment, introduced with OSX 10.5 (Leopard).
994# To create a documentation set, doxygen will generate a Makefile in the
995# HTML output directory. Running make will produce the docset in that
996# directory and running "make install" will install the docset in
997# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
998# it at startup.
999# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
1000# for more information.
1001
1002GENERATE_DOCSET = NO
1003
1004# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
1005# feed. A documentation feed provides an umbrella under which multiple
1006# documentation sets from a single provider (such as a company or product suite)
1007# can be grouped.
1008
1009DOCSET_FEEDNAME = "Doxygen generated docs"
1010
1011# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
1012# should uniquely identify the documentation set bundle. This should be a
1013# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
1014# will append .docset to the name.
1015
1016DOCSET_BUNDLE_ID = org.doxygen.Project
1017
1018# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely
1019# identify the documentation publisher. This should be a reverse domain-name
1020# style string, e.g. com.mycompany.MyDocSet.documentation.
1021
1022DOCSET_PUBLISHER_ID = org.doxygen.Publisher
1023
1024# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
1025
1026DOCSET_PUBLISHER_NAME = Publisher
1027
1028# If the GENERATE_HTMLHELP tag is set to YES, additional index files
1029# will be generated that can be used as input for tools like the
1030# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
1031# of the generated HTML documentation.
1032
1033GENERATE_HTMLHELP = NO
1034
1035# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
1036# be used to specify the file name of the resulting .chm file. You
1037# can add a path in front of the file if the result should not be
1038# written to the html output directory.
1039
1040CHM_FILE =
1041
1042# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
1043# be used to specify the location (absolute path including file name) of
1044# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
1045# the HTML help compiler on the generated index.hhp.
1046
1047HHC_LOCATION =
1048
1049# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
1050# controls if a separate .chi index file is generated (YES) or that
1051# it should be included in the master .chm file (NO).
1052
1053GENERATE_CHI = NO
1054
1055# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
1056# is used to encode HtmlHelp index (hhk), content (hhc) and project file
1057# content.
1058
1059CHM_INDEX_ENCODING =
1060
1061# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
1062# controls whether a binary table of contents is generated (YES) or a
1063# normal table of contents (NO) in the .chm file.
1064
1065BINARY_TOC = NO
1066
1067# The TOC_EXPAND flag can be set to YES to add extra items for group members
1068# to the contents of the HTML help documentation and to the tree view.
1069
1070TOC_EXPAND = NO
1071
1072# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
1073# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
1074# that can be used as input for Qt's qhelpgenerator to generate a
1075# Qt Compressed Help (.qch) of the generated HTML documentation.
1076
1077GENERATE_QHP = NO
1078
1079# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
1080# be used to specify the file name of the resulting .qch file.
1081# The path specified is relative to the HTML output folder.
1082
1083QCH_FILE =
1084
1085# The QHP_NAMESPACE tag specifies the namespace to use when generating
1086# Qt Help Project output. For more information please see
1087# http://doc.trolltech.com/qthelpproject.html#namespace
1088
1089QHP_NAMESPACE = org.doxygen.Project
1090
1091# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
1092# Qt Help Project output. For more information please see
1093# http://doc.trolltech.com/qthelpproject.html#virtual-folders
1094
1095QHP_VIRTUAL_FOLDER = doc
1096
1097# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
1098# add. For more information please see
1099# http://doc.trolltech.com/qthelpproject.html#custom-filters
1100
1101QHP_CUST_FILTER_NAME =
1102
1103# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
1104# custom filter to add. For more information please see
1105# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
1106# Qt Help Project / Custom Filters</a>.
1107
1108QHP_CUST_FILTER_ATTRS =
1109
1110# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
1111# project's
1112# filter section matches.
1113# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
1114# Qt Help Project / Filter Attributes</a>.
1115
1116QHP_SECT_FILTER_ATTRS =
1117
1118# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
1119# be used to specify the location of Qt's qhelpgenerator.
1120# If non-empty doxygen will try to run qhelpgenerator on the generated
1121# .qhp file.
1122
1123QHG_LOCATION =
1124
1125# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
1126# will be generated, which together with the HTML files, form an Eclipse help
1127# plugin. To install this plugin and make it available under the help contents
1128# menu in Eclipse, the contents of the directory containing the HTML and XML
1129# files needs to be copied into the plugins directory of eclipse. The name of
1130# the directory within the plugins directory should be the same as
1131# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
1132# the help appears.
1133
1134GENERATE_ECLIPSEHELP = NO
1135
1136# A unique identifier for the eclipse help plugin. When installing the plugin
1137# the directory name containing the HTML and XML files should also have
1138# this name.
1139
1140ECLIPSE_DOC_ID = org.doxygen.Project
1141
1142# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs)
1143# at top of each HTML page. The value NO (the default) enables the index and
1144# the value YES disables it. Since the tabs have the same information as the
1145# navigation tree you can set this option to NO if you already set
1146# GENERATE_TREEVIEW to YES.
1147
1148DISABLE_INDEX = YES
1149
1150# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
1151# structure should be generated to display hierarchical information.
1152# If the tag value is set to YES, a side panel will be generated
1153# containing a tree-like index structure (just like the one that
1154# is generated for HTML Help). For this to work a browser that supports
1155# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
1156# Windows users are probably better off using the HTML help feature.
1157# Since the tree basically has the same information as the tab index you
1158# could consider to set DISABLE_INDEX to NO when enabling this option.
1159
1160GENERATE_TREEVIEW = YES
1161
1162# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values
1163# (range [0,1..20]) that doxygen will group on one line in the generated HTML
1164# documentation. Note that a value of 0 will completely suppress the enum
1165# values from appearing in the overview section.
1166
1167ENUM_VALUES_PER_LINE = 1
1168
1169# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
1170# used to set the initial width (in pixels) of the frame in which the tree
1171# is shown.
1172
1173TREEVIEW_WIDTH = 250
1174
1175# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
1176# links to external symbols imported via tag files in a separate window.
1177
1178EXT_LINKS_IN_WINDOW = NO
1179
1180# Use this tag to change the font size of Latex formulas included
1181# as images in the HTML documentation. The default is 10. Note that
1182# when you change the font size after a successful doxygen run you need
1183# to manually remove any form_*.png images from the HTML output directory
1184# to force them to be regenerated.
1185
1186FORMULA_FONTSIZE = 10
1187
1188# Use the FORMULA_TRANPARENT tag to determine whether or not the images
1189# generated for formulas are transparent PNGs. Transparent PNGs are
1190# not supported properly for IE 6.0, but are supported on all modern browsers.
1191# Note that when changing this option you need to delete any form_*.png files
1192# in the HTML output before the changes have effect.
1193
1194FORMULA_TRANSPARENT = YES
1195
1196# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax
1197# (see http://www.mathjax.org) which uses client side Javascript for the
1198# rendering instead of using prerendered bitmaps. Use this if you do not
1199# have LaTeX installed or if you want to formulas look prettier in the HTML
1200# output. When enabled you may also need to install MathJax separately and
1201# configure the path to it using the MATHJAX_RELPATH option.
1202
1203USE_MATHJAX = NO
1204
1205# When MathJax is enabled you can set the default output format to be used for
1206# thA MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and
1207# SVG. The default value is HTML-CSS, which is slower, but has the best
1208# compatibility.
1209
1210MATHJAX_FORMAT = HTML-CSS
1211
1212# When MathJax is enabled you need to specify the location relative to the
1213# HTML output directory using the MATHJAX_RELPATH option. The destination
1214# directory should contain the MathJax.js script. For instance, if the mathjax
1215# directory is located at the same level as the HTML output directory, then
1216# MATHJAX_RELPATH should be ../mathjax. The default value points to
1217# the MathJax Content Delivery Network so you can quickly see the result without
1218# installing MathJax.
1219# However, it is strongly recommended to install a local
1220# copy of MathJax from http://www.mathjax.org before deployment.
1221
1222MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
1223
1224# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
1225# names that should be enabled during MathJax rendering.
1226
1227MATHJAX_EXTENSIONS =
1228
1229# When the SEARCHENGINE tag is enabled doxygen will generate a search box
1230# for the HTML output. The underlying search engine uses javascript
1231# and DHTML and should work on any modern browser. Note that when using
1232# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
1233# (GENERATE_DOCSET) there is already a search function so this one should
1234# typically be disabled. For large projects the javascript based search engine
1235# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
1236
1237SEARCHENGINE = NO
1238
1239# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
1240# implemented using a web server instead of a web client using Javascript.
1241# There are two flavours of web server based search depending on the
1242# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for
1243# searching and an index file used by the script. When EXTERNAL_SEARCH is
1244# enabled the indexing and searching needs to be provided by external tools.
1245# See the manual for details.
1246
1247SERVER_BASED_SEARCH = NO
1248
1249# When EXTERNAL_SEARCH is enabled doxygen will no longer generate the PHP
1250# script for searching. Instead the search results are written to an XML file
1251# which needs to be processed by an external indexer. Doxygen will invoke an
1252# external search engine pointed to by the SEARCHENGINE_URL option to obtain
1253# the search results. Doxygen ships with an example indexer (doxyindexer) and
1254# search engine (doxysearch.cgi) which are based on the open source search engine
1255# library Xapian. See the manual for configuration details.
1256
1257EXTERNAL_SEARCH = NO
1258
1259# The SEARCHENGINE_URL should point to a search engine hosted by a web server
1260# which will returned the search results when EXTERNAL_SEARCH is enabled.
1261# Doxygen ships with an example search engine (doxysearch) which is based on
1262# the open source search engine library Xapian. See the manual for configuration
1263# details.
1264
1265SEARCHENGINE_URL =
1266
1267# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
1268# search data is written to a file for indexing by an external tool. With the
1269# SEARCHDATA_FILE tag the name of this file can be specified.
1270
1271SEARCHDATA_FILE = searchdata.xml
1272
1273# When SERVER_BASED_SEARCH AND EXTERNAL_SEARCH are both enabled the
1274# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
1275# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
1276# projects and redirect the results back to the right project.
1277
1278EXTERNAL_SEARCH_ID =
1279
1280# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
1281# projects other than the one defined by this configuration file, but that are
1282# all added to the same external search index. Each project needs to have a
1283# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id
1284# of to a relative location where the documentation can be found.
1285# The format is: EXTRA_SEARCH_MAPPINGS = id1=loc1 id2=loc2 ...
1286
1287EXTRA_SEARCH_MAPPINGS =
1288
1289#---------------------------------------------------------------------------
1290# configuration options related to the LaTeX output
1291#---------------------------------------------------------------------------
1292
1293# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
1294# generate Latex output.
1295
1296GENERATE_LATEX = YES
1297
1298# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
1299# If a relative path is entered the value of OUTPUT_DIRECTORY will be
1300# put in front of it. If left blank `latex' will be used as the default path.
1301
1302LATEX_OUTPUT = latex
1303
1304# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
1305# invoked. If left blank `latex' will be used as the default command name.
1306# Note that when enabling USE_PDFLATEX this option is only used for
1307# generating bitmaps for formulas in the HTML output, but not in the
1308# Makefile that is written to the output directory.
1309
1310LATEX_CMD_NAME = latex
1311
1312# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
1313# generate index for LaTeX. If left blank `makeindex' will be used as the
1314# default command name.
1315
1316MAKEINDEX_CMD_NAME = makeindex
1317
1318# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
1319# LaTeX documents. This may be useful for small projects and may help to
1320# save some trees in general.
1321
1322COMPACT_LATEX = YES
1323
1324# The PAPER_TYPE tag can be used to set the paper type that is used
1325# by the printer. Possible values are: a4, letter, legal and
1326# executive. If left blank a4wide will be used.
1327
1328PAPER_TYPE = a4
1329
1330# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
1331# packages that should be included in the LaTeX output.
1332
1333EXTRA_PACKAGES =
1334
1335# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
1336# the generated latex document. The header should contain everything until
1337# the first chapter. If it is left blank doxygen will generate a
1338# standard header. Notice: only use this tag if you know what you are doing!
1339
1340LATEX_HEADER =
1341
1342# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for
1343# the generated latex document. The footer should contain everything after
1344# the last chapter. If it is left blank doxygen will generate a
1345# standard footer. Notice: only use this tag if you know what you are doing!
1346
1347LATEX_FOOTER =
1348
1349# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
1350# is prepared for conversion to pdf (using ps2pdf). The pdf file will
1351# contain links (just like the HTML output) instead of page references
1352# This makes the output suitable for online browsing using a pdf viewer.
1353
1354PDF_HYPERLINKS = YES
1355
1356# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
1357# plain latex in the generated Makefile. Set this option to YES to get a
1358# higher quality PDF documentation.
1359
1360USE_PDFLATEX = YES
1361
1362# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
1363# command to the generated LaTeX files. This will instruct LaTeX to keep
1364# running if errors occur, instead of asking the user for help.
1365# This option is also used when generating formulas in HTML.
1366
1367LATEX_BATCHMODE = NO
1368
1369# If LATEX_HIDE_INDICES is set to YES then doxygen will not
1370# include the index chapters (such as File Index, Compound Index, etc.)
1371# in the output.
1372
1373LATEX_HIDE_INDICES = NO
1374
1375# If LATEX_SOURCE_CODE is set to YES then doxygen will include
1376# source code with syntax highlighting in the LaTeX output.
1377# Note that which sources are shown also depends on other settings
1378# such as SOURCE_BROWSER.
1379
1380LATEX_SOURCE_CODE = NO
1381
1382# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
1383# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See
1384# http://en.wikipedia.org/wiki/BibTeX for more info.
1385
1386LATEX_BIB_STYLE = plain
1387
1388#---------------------------------------------------------------------------
1389# configuration options related to the RTF output
1390#---------------------------------------------------------------------------
1391
1392# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
1393# The RTF output is optimized for Word 97 and may not look very pretty with
1394# other RTF readers or editors.
1395
1396GENERATE_RTF = NO
1397
1398# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
1399# If a relative path is entered the value of OUTPUT_DIRECTORY will be
1400# put in front of it. If left blank `rtf' will be used as the default path.
1401
1402RTF_OUTPUT = rtf
1403
1404# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
1405# RTF documents. This may be useful for small projects and may help to
1406# save some trees in general.
1407
1408COMPACT_RTF = NO
1409
1410# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
1411# will contain hyperlink fields. The RTF file will
1412# contain links (just like the HTML output) instead of page references.
1413# This makes the output suitable for online browsing using WORD or other
1414# programs which support those fields.
1415# Note: wordpad (write) and others do not support links.
1416
1417RTF_HYPERLINKS = NO
1418
1419# Load style sheet definitions from file. Syntax is similar to doxygen's
1420# config file, i.e. a series of assignments. You only have to provide
1421# replacements, missing definitions are set to their default value.
1422
1423RTF_STYLESHEET_FILE =
1424
1425# Set optional variables used in the generation of an rtf document.
1426# Syntax is similar to doxygen's config file.
1427
1428RTF_EXTENSIONS_FILE =
1429
1430#---------------------------------------------------------------------------
1431# configuration options related to the man page output
1432#---------------------------------------------------------------------------
1433
1434# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
1435# generate man pages
1436
1437GENERATE_MAN = YES
1438
1439# The MAN_OUTPUT tag is used to specify where the man pages will be put.
1440# If a relative path is entered the value of OUTPUT_DIRECTORY will be
1441# put in front of it. If left blank `man' will be used as the default path.
1442
1443MAN_OUTPUT = man
1444
1445# The MAN_EXTENSION tag determines the extension that is added to
1446# the generated man pages (default is the subroutine's section .3)
1447
1448MAN_EXTENSION = .3
1449
1450# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
1451# then it will generate one additional man file for each entity
1452# documented in the real man page(s). These additional files
1453# only source the real man page, but without them the man command
1454# would be unable to find the correct page. The default is NO.
1455
1456MAN_LINKS = NO
1457
1458#---------------------------------------------------------------------------
1459# configuration options related to the XML output
1460#---------------------------------------------------------------------------
1461
1462# If the GENERATE_XML tag is set to YES Doxygen will
1463# generate an XML file that captures the structure of
1464# the code including all documentation.
1465
1466GENERATE_XML = NO
1467
1468# The XML_OUTPUT tag is used to specify where the XML pages will be put.
1469# If a relative path is entered the value of OUTPUT_DIRECTORY will be
1470# put in front of it. If left blank `xml' will be used as the default path.
1471
1472XML_OUTPUT = xml
1473
1474# The XML_SCHEMA tag can be used to specify an XML schema,
1475# which can be used by a validating XML parser to check the
1476# syntax of the XML files.
1477
1478XML_SCHEMA =
1479
1480# The XML_DTD tag can be used to specify an XML DTD,
1481# which can be used by a validating XML parser to check the
1482# syntax of the XML files.
1483
1484XML_DTD =
1485
1486# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
1487# dump the program listings (including syntax highlighting
1488# and cross-referencing information) to the XML output. Note that
1489# enabling this will significantly increase the size of the XML output.
1490
1491XML_PROGRAMLISTING = YES
1492
1493#---------------------------------------------------------------------------
1494# configuration options for the AutoGen Definitions output
1495#---------------------------------------------------------------------------
1496
1497# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
1498# generate an AutoGen Definitions (see autogen.sf.net) file
1499# that captures the structure of the code including all
1500# documentation. Note that this feature is still experimental
1501# and incomplete at the moment.
1502
1503GENERATE_AUTOGEN_DEF = NO
1504
1505#---------------------------------------------------------------------------
1506# configuration options related to the Perl module output
1507#---------------------------------------------------------------------------
1508
1509# If the GENERATE_PERLMOD tag is set to YES Doxygen will
1510# generate a Perl module file that captures the structure of
1511# the code including all documentation. Note that this
1512# feature is still experimental and incomplete at the
1513# moment.
1514
1515GENERATE_PERLMOD = NO
1516
1517# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
1518# the necessary Makefile rules, Perl scripts and LaTeX code to be able
1519# to generate PDF and DVI output from the Perl module output.
1520
1521PERLMOD_LATEX = NO
1522
1523# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
1524# nicely formatted so it can be parsed by a human reader.
1525# This is useful
1526# if you want to understand what is going on.
1527# On the other hand, if this
1528# tag is set to NO the size of the Perl module output will be much smaller
1529# and Perl will parse it just the same.
1530
1531PERLMOD_PRETTY = YES
1532
1533# The names of the make variables in the generated doxyrules.make file
1534# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
1535# This is useful so different doxyrules.make files included by the same
1536# Makefile don't overwrite each other's variables.
1537
1538PERLMOD_MAKEVAR_PREFIX =
1539
1540#---------------------------------------------------------------------------
1541# Configuration options related to the preprocessor
1542#---------------------------------------------------------------------------
1543
1544# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
1545# evaluate all C-preprocessor directives found in the sources and include
1546# files.
1547
1548ENABLE_PREPROCESSING = YES
1549
1550# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
1551# names in the source code. If set to NO (the default) only conditional
1552# compilation will be performed. Macro expansion can be done in a controlled
1553# way by setting EXPAND_ONLY_PREDEF to YES.
1554
1555MACRO_EXPANSION = NO
1556
1557# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
1558# then the macro expansion is limited to the macros specified with the
1559# PREDEFINED and EXPAND_AS_DEFINED tags.
1560
1561EXPAND_ONLY_PREDEF = NO
1562
1563# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
1564# pointed to by INCLUDE_PATH will be searched when a #include is found.
1565
1566SEARCH_INCLUDES = YES
1567
1568# The INCLUDE_PATH tag can be used to specify one or more directories that
1569# contain include files that are not input files but should be processed by
1570# the preprocessor.
1571
1572INCLUDE_PATH =
1573
1574# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
1575# patterns (like *.h and *.hpp) to filter out the header-files in the
1576# directories. If left blank, the patterns specified with FILE_PATTERNS will
1577# be used.
1578
1579INCLUDE_FILE_PATTERNS =
1580
1581# The PREDEFINED tag can be used to specify one or more macro names that
1582# are defined before the preprocessor is started (similar to the -D option of
1583# gcc). The argument of the tag is a list of macros of the form: name
1584# or name=definition (no spaces). If the definition and the = are
1585# omitted =1 is assumed. To prevent a macro definition from being
1586# undefined via #undef or recursively expanded use the := operator
1587# instead of the = operator.
1588
1589PREDEFINED =
1590
1591# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
1592# this tag can be used to specify a list of macro names that should be expanded.
1593# The macro definition that is found in the sources will be used.
1594# Use the PREDEFINED tag if you want to use a different macro definition that
1595# overrules the definition found in the source code.
1596
1597EXPAND_AS_DEFINED =
1598
1599# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
1600# doxygen's preprocessor will remove all references to function-like macros
1601# that are alone on a line, have an all uppercase name, and do not end with a
1602# semicolon, because these will confuse the parser if not removed.
1603
1604SKIP_FUNCTION_MACROS = YES
1605
1606#---------------------------------------------------------------------------
1607# Configuration::additions related to external references
1608#---------------------------------------------------------------------------
1609
1610# The TAGFILES option can be used to specify one or more tagfiles. For each
1611# tag file the location of the external documentation should be added. The
1612# format of a tag file without this location is as follows:
1613#
1614# TAGFILES = file1 file2 ...
1615# Adding location for the tag files is done as follows:
1616#
1617# TAGFILES = file1=loc1 "file2 = loc2" ...
1618# where "loc1" and "loc2" can be relative or absolute paths
1619# or URLs. Note that each tag file must have a unique name (where the name does
1620# NOT include the path). If a tag file is not located in the directory in which
1621# doxygen is run, you must also specify the path to the tagfile here.
1622
1623TAGFILES =
1624
1625# When a file name is specified after GENERATE_TAGFILE, doxygen will create
1626# a tag file that is based on the input files it reads.
1627
1628GENERATE_TAGFILE =
1629
1630# If the ALLEXTERNALS tag is set to YES all external classes will be listed
1631# in the class index. If set to NO only the inherited external classes
1632# will be listed.
1633
1634ALLEXTERNALS = NO
1635
1636# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
1637# in the modules index. If set to NO, only the current project's groups will
1638# be listed.
1639
1640EXTERNAL_GROUPS = YES
1641
1642# The PERL_PATH should be the absolute path and name of the perl script
1643# interpreter (i.e. the result of `which perl').
1644
1645PERL_PATH = /usr/bin/perl
1646
1647#---------------------------------------------------------------------------
1648# Configuration options related to the dot tool
1649#---------------------------------------------------------------------------
1650
1651# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
1652# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
1653# or super classes. Setting the tag to NO turns the diagrams off. Note that
1654# this option also works with HAVE_DOT disabled, but it is recommended to
1655# install and use dot, since it yields more powerful graphs.
1656
1657CLASS_DIAGRAMS = YES
1658
1659# You can define message sequence charts within doxygen comments using the \msc
1660# command. Doxygen will then run the mscgen tool (see
1661# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
1662# documentation. The MSCGEN_PATH tag allows you to specify the directory where
1663# the mscgen tool resides. If left empty the tool is assumed to be found in the
1664# default search path.
1665
1666MSCGEN_PATH =
1667
1668# If set to YES, the inheritance and collaboration graphs will hide
1669# inheritance and usage relations if the target is undocumented
1670# or is not a class.
1671
1672HIDE_UNDOC_RELATIONS = NO
1673
1674# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
1675# available from the path. This tool is part of Graphviz, a graph visualization
1676# toolkit from AT&T and Lucent Bell Labs. The other options in this section
1677# have no effect if this option is set to NO (the default)
1678
1679HAVE_DOT = YES
1680
1681# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
1682# allowed to run in parallel. When set to 0 (the default) doxygen will
1683# base this on the number of processors available in the system. You can set it
1684# explicitly to a value larger than 0 to get control over the balance
1685# between CPU load and processing speed.
1686
1687DOT_NUM_THREADS = 1
1688
1689# By default doxygen will use the Helvetica font for all dot files that
1690# doxygen generates. When you want a differently looking font you can specify
1691# the font name using DOT_FONTNAME. You need to make sure dot is able to find
1692# the font, which can be done by putting it in a standard location or by setting
1693# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the
1694# directory containing the font.
1695
1696DOT_FONTNAME = Helvetica
1697
1698# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
1699# The default size is 10pt.
1700
1701DOT_FONTSIZE = 10
1702
1703# By default doxygen will tell dot to use the Helvetica font.
1704# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to
1705# set the path where dot can find it.
1706
1707DOT_FONTPATH =
1708
1709# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
1710# will generate a graph for each documented class showing the direct and
1711# indirect inheritance relations. Setting this tag to YES will force the
1712# CLASS_DIAGRAMS tag to NO.
1713
1714CLASS_GRAPH = YES
1715
1716# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
1717# will generate a graph for each documented class showing the direct and
1718# indirect implementation dependencies (inheritance, containment, and
1719# class references variables) of the class with other documented classes.
1720
1721COLLABORATION_GRAPH = YES
1722
1723# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
1724# will generate a graph for groups, showing the direct groups dependencies
1725
1726GROUP_GRAPHS = YES
1727
1728# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
1729# collaboration diagrams in a style similar to the OMG's Unified Modeling
1730# Language.
1731
1732UML_LOOK = YES
1733
1734# If the UML_LOOK tag is enabled, the fields and methods are shown inside
1735# the class node. If there are many fields or methods and many nodes the
1736# graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS
1737# threshold limits the number of items for each type to make the size more
1738# managable. Set this to 0 for no limit. Note that the threshold may be
1739# exceeded by 50% before the limit is enforced.
1740
1741UML_LIMIT_NUM_FIELDS = 10
1742
1743# If set to YES, the inheritance and collaboration graphs will show the
1744# relations between templates and their instances.
1745
1746TEMPLATE_RELATIONS = NO
1747
1748# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
1749# tags are set to YES then doxygen will generate a graph for each documented
1750# file showing the direct and indirect include dependencies of the file with
1751# other documented files.
1752
1753INCLUDE_GRAPH = YES
1754
1755# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
1756# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
1757# documented header file showing the documented files that directly or
1758# indirectly include this file.
1759
1760INCLUDED_BY_GRAPH = YES
1761
1762# If the CALL_GRAPH and HAVE_DOT options are set to YES then
1763# doxygen will generate a call dependency graph for every global function
1764# or class method. Note that enabling this option will significantly increase
1765# the time of a run. So in most cases it will be better to enable call graphs
1766# for selected functions only using the \callgraph command.
1767
1768CALL_GRAPH = YES
1769
1770# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
1771# doxygen will generate a caller dependency graph for every global function
1772# or class method. Note that enabling this option will significantly increase
1773# the time of a run. So in most cases it will be better to enable caller
1774# graphs for selected functions only using the \callergraph command.
1775
1776CALLER_GRAPH = NO
1777
1778# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
1779# will generate a graphical hierarchy of all classes instead of a textual one.
1780
1781GRAPHICAL_HIERARCHY = YES
1782
1783# If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES
1784# then doxygen will show the dependencies a directory has on other directories
1785# in a graphical way. The dependency relations are determined by the #include
1786# relations between the files in the directories.
1787
1788DIRECTORY_GRAPH = YES
1789
1790# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
1791# generated by dot. Possible values are svg, png, jpg, or gif.
1792# If left blank png will be used. If you choose svg you need to set
1793# HTML_FILE_EXTENSION to xhtml in order to make the SVG files
1794# visible in IE 9+ (other browsers do not have this requirement).
1795
1796DOT_IMAGE_FORMAT = png
1797
1798# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
1799# enable generation of interactive SVG images that allow zooming and panning.
1800# Note that this requires a modern browser other than Internet Explorer.
1801# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you
1802# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files
1803# visible. Older versions of IE do not have SVG support.
1804
1805INTERACTIVE_SVG = YES
1806
1807# The tag DOT_PATH can be used to specify the path where the dot tool can be
1808# found. If left blank, it is assumed the dot tool can be found in the path.
1809
1810DOT_PATH =
1811
1812# The DOTFILE_DIRS tag can be used to specify one or more directories that
1813# contain dot files that are included in the documentation (see the
1814# \dotfile command).
1815
1816DOTFILE_DIRS =
1817
1818# The MSCFILE_DIRS tag can be used to specify one or more directories that
1819# contain msc files that are included in the documentation (see the
1820# \mscfile command).
1821
1822MSCFILE_DIRS =
1823
1824# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
1825# nodes that will be shown in the graph. If the number of nodes in a graph
1826# becomes larger than this value, doxygen will truncate the graph, which is
1827# visualized by representing a node as a red box. Note that doxygen if the
1828# number of direct children of the root node in a graph is already larger than
1829# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
1830# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
1831
1832DOT_GRAPH_MAX_NODES = 50
1833
1834# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
1835# graphs generated by dot. A depth value of 3 means that only nodes reachable
1836# from the root by following a path via at most 3 edges will be shown. Nodes
1837# that lay further from the root node will be omitted. Note that setting this
1838# option to 1 or 2 may greatly reduce the computation time needed for large
1839# code bases. Also note that the size of a graph can be further restricted by
1840# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
1841
1842MAX_DOT_GRAPH_DEPTH = 0
1843
1844# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
1845# background. This is disabled by default, because dot on Windows does not
1846# seem to support this out of the box. Warning: Depending on the platform used,
1847# enabling this option may lead to badly anti-aliased labels on the edges of
1848# a graph (i.e. they become hard to read).
1849
1850DOT_TRANSPARENT = YES
1851
1852# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
1853# files in one run (i.e. multiple -o and -T options on the command line). This
1854# makes dot run faster, but since only newer versions of dot (>1.8.10)
1855# support this, this feature is disabled by default.
1856
1857DOT_MULTI_TARGETS = YES
1858
1859# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
1860# generate a legend page explaining the meaning of the various boxes and
1861# arrows in the dot generated graphs.
1862
1863GENERATE_LEGEND = YES
1864
1865# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
1866# remove the intermediate dot files that are used to generate
1867# the various graphs.
1868
1869DOT_CLEANUP = YES
18700
=== removed file 'include/CMakeLists.txt'
--- include/CMakeLists.txt 2016-09-26 04:27:03 +0000
+++ include/CMakeLists.txt 1970-01-01 00:00:00 +0000
@@ -1,5 +0,0 @@
1install(
2 DIRECTORY onedrive
3 DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/
4)
5
60
=== added file 'include/onedrive/api/client.h'
--- include/onedrive/api/client.h 1970-01-01 00:00:00 +0000
+++ include/onedrive/api/client.h 2017-01-03 04:38:36 +0000
@@ -0,0 +1,194 @@
1/*
2 * Copyright © 2016 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authored by: Gary Wang <gary.wang@canonical.com>
17 */
18
19#ifndef ONEDRIVE_API_CLIENT_H_
20#define ONEDRIVE_API_CLIENT_H_
21
22#include <onedrive/api/visibility.h>
23#include <onedrive/api/taskqueue.h>
24#include <onedrive/api/storageinfo.h>
25#include <onedrive/api/cloudresource.h>
26#include <onedrive/api/clouditem.h>
27#include <onedrive/api/cloudfolder.h>
28#include <onedrive/api/downloadtask.h>
29#include <onedrive/api/uploadtask.h>
30#include <onedrive/api/syncmanager.h>
31
32#include <deque>
33#include <future>
34
35namespace onedrive {
36namespace api {
37
38class ClientPriv;
39
40/*!
41 \class Client
42 \brief Onedrive API provides developer to easily access login user's cloud contents stored on microsoft onedrive service,
43 such as musics, movie, docs, images, and so on.
44
45 The API enable developers to
46 <list type="bullet">
47 <item>retrieve authorized user cloud content list.</item>
48 <item>create, delete, move and update cloud resources.</item>
49 <item>query content infomation.</item>
50 <item>create an extranet link to share.</item>
51 <item>upload a local content to onedrive.</item>
52 <item>download a content from onedrive.</item>
53 </list>
54
55 Also sync up manager will be running on the background when client is constructed. It handles over
56 local content upload and cloud item download. \sa syncmanager.
57
58 \note Onedrive API covers cloud resourece access and content sync-up between local and cloud. It does not take
59 responsibility of account authentication. So before using onedrive APIs, developers need to call \sa set_access_token to
60 manually set a valid access_token or \sa refresh_token to fetch access token,
61 which is used to call onedrive APIs internally to pass through authentication.
62 */
63
64class ONEDRIVE_API_DLL_PUBLIC Client {
65
66 public:
67 typedef std::shared_ptr<Client> Ptr;
68
69 typedef std::deque<CloudResource::Ptr> ResourceList;
70
71 /*!
72 * \brief Constructs a onedrive Client object with \a request_timeout seconds.
73 * Meanwhile client launches sync-up manager to deal with task download and upload by default.
74 */
75 Client(int request_timeout = 10);
76
77 Client(const Client &) = delete;
78
79 Client &operator=(const Client &) = delete;
80
81 virtual ~Client();
82
83 /*!
84 * \brief Set \a access_token to authenticate all onedrive API calls with the bearer HTTP authorization scheme.
85 * The access token can be fetched through ubuntu sso services.
86 */
87 void set_access_token(const std::string &access_token);
88
89 /*!
90 * \brief Returns the login user's onedrive cloud storage information.
91 * \throw Onedrive specific exceptions or std::runtime_error if error occurs.
92 */
93 StorageInfo::Ptr storage_info();
94
95 /*!
96 * \brief Returns the root folder object on onedrive.
97 * \throw Onedrive specific exceptions or std::runtime_error if error occurs.
98 * \sa cloud_content_list(), storage_info()
99 */
100 CloudFolder::Ptr root_folder();
101
102 /*!
103 * \brief Returns the file list and next page token when listing all files from one specific folder \a folder_id.
104 * if the \a folder_id is empty, returns item list under root directory of onedrive.
105 * if the \a page_token is empty, queries contents from the first page.
106 * The fetched content count is 200 at most per call.
107 * \a page_token indicates the specific page index on the onedrive.
108 * \throw Onedrive specific exceptions or std::runtime_error if error occurs.
109 * \sa root_folder(), metadata(), search()
110 */
111 std::tuple<ResourceList, std::string> cloud_content_list(const std::string &folder_id = std::string(),
112 const std::string &page_token = std::string());
113
114 /*!
115 * \brief Returns the resouce item object if the content with a given \a content_id can be found on onedrive.
116 * otherwise return nullptr.
117 * \throw Onedrive specific exceptions or std::runtime_error if error occurs.
118 * \sa cloud_content_list()
119 */
120 CloudResource::Ptr metadata(const std::string &content_id);
121
122 /*!
123 * \brief Returns the folder item object if the folder with a given \a folder_name is created under a given \a folder_id folder,
124 * otherwise return nullptr.
125 * if the \a folder_id is empty, creates a folder item under root folder of onedrive.
126 * \throw Onedrive specific exceptions or std::runtime_error if error occurs.
127 * \sa delete_item(), move_item(), copy_item()
128 */
129 CloudFolder::Ptr create_folder(const std::string &folder_name,
130 const std::string &folder_id = std::string());
131
132 /*!
133 * \brief Returns the cloud item list if there are available items that matches with the \a name under a given \a folder_id folder.
134 * if the \a folder_id is empty, searches items under root folder of onedrive.
135 * \throw Onedrive specific exceptions or std::runtime_error if error occurs.
136 * \sa metadata()
137 */
138 Client::ResourceList search(const std::string &name,
139 const std::string &folder_id = std::string());
140
141 /*!
142 * \brief Returns true if content \a content_id is deleted, otherwise return false.
143 * \throw Onedrive specific exceptions or std::runtime_error if error occurs.
144 * \sa move_item(), rename_item(), copy_item()
145 */
146 bool delete_item(const std::string &content_id);
147
148 /*!
149 * \brief Returns the resource item object if the item \a item_id is moved to a given folder \a folder_id on onedrive with new \a name.
150 * otherwise return nullptr.
151 * if \a name is empty, the same name will be used as the original.
152 * \throw Onedrive specific exceptions or std::runtime_error if error occurs.
153 * \sa rename_item(), delete_item(), copy_item()
154 */
155 CloudResource::Ptr move_item(const std::string &item_id,
156 const std::string &folder_id,
157 const std::string &name = std::string());
158
159 /*!
160 * \brief Returns the resource item object if the item \a item_id is updated with a new \a name, otherwise return false.
161 * otherwise return nullptr.
162 * \throw Onedrive specific exceptions or std::runtime_error if error occurs.
163 * \sa delete_item(), copy_item(), move_item()
164 */
165 CloudResource::Ptr rename_item(const std::string &folder_id,
166 const std::string &new_folder_name);
167
168 /*!
169 * \brief Returns the future object of item if the item \a item_id is copied to a given folder \a folder_id with a new \a name on onedrive.
170 * if \a name is empty, the same name will be used as the original.
171 * \throw std::runtime_error if error occurs.
172 * \throw Onedrive specific exceptions or std::runtime_error if error occurs.
173 * \note we returns future object as onedrive returns an AsyncJobStatus resource that defines the current status of the copy job.
174 * see https://graph.microsoft.io/en-us/docs/api-reference/v1.0/api/item_copy for details.
175 */
176 std::future<CloudResource::Ptr> copy_item(const std::string &item_id,
177 const std::string &folder_id,
178 const std::string &name);
179
180 /*!
181 * \brief Returns the sync-up manager running on the background.
182 * sync-up manager scheduled tasks \sa start, pause, cancel for content upload and download.
183 */
184 SyncManager::Ptr syncmanager() const;
185
186 private:
187 std::unique_ptr<ClientPriv> p;
188
189};
190
191}
192}
193
194#endif // ONEDRIVE_API_CLIENT_H_
0195
=== added file 'include/onedrive/api/cloudfolder.h'
--- include/onedrive/api/cloudfolder.h 1970-01-01 00:00:00 +0000
+++ include/onedrive/api/cloudfolder.h 2017-01-03 04:38:36 +0000
@@ -0,0 +1,111 @@
1/*
2 * Copyright © 2016 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authored by: Gary Wang <gary.wang@canonical.com>
17 */
18
19#ifndef ONEDRIVE_API_CLOUDFOLDER_H_
20#define ONEDRIVE_API_CLOUDFOLDER_H_
21
22#include <onedrive/api/cloudresource.h>
23#include <onedrive/api/visibility.h>
24
25namespace Json {
26 class Value;
27}
28
29namespace onedrive {
30namespace api {
31
32/*!
33 \class CloudFolder
34 \brief CloudFolder represents a folder object on onedrive.
35 */
36
37class ONEDRIVE_API_DLL_PUBLIC CloudFolder : public CloudResource {
38 public:
39 typedef std::shared_ptr<CloudFolder> Ptr;
40
41 ~CloudFolder();
42
43 /*!
44 * \brief Returns the unique id of cloud folder object.
45 */
46 const std::string &id() const override;
47
48 /*!
49 * \brief Returns the name of cloud folder object.
50 */
51 const std::string &name() const override;
52
53 /*!
54 * \brief Returns the datetime when folder was created.
55 */
56 const std::string &created_date() const override;
57
58 /*!
59 * \brief Returns the datetime when folder was updated.
60 */
61 const std::string &updated_date() const override;
62
63 /*!
64 * \brief Returns the download link on onedriver for a folder.
65 */
66 const std::string &download_url() const override;
67
68 /*!
69 * \brief Returns the unique id of the parent folder.
70 */
71 const std::string &parent_folder_id() const override;
72
73 /*!
74 * \brief Returns the etag of a folder object.
75 */
76 const std::string &etag() const override;
77
78 /*!
79 * \brief Returns the owner id of a folder object.
80 */
81 const std::string &owner() const override;
82
83 /*!
84 * \brief Returns resource property of an object.
85 * \sa CloudResource::Property
86 */
87 CloudResource::Property property() const override;
88
89 /*!
90 * \brief Returns the number of children items under this folder.
91 */
92 int children_count() const;
93
94 /*!
95 * \brief Returns the folder's thumbnails set.
96 */
97 const thumbnail_set &thumbnails() const;
98
99 private:
100 CloudFolder(const Json::Value &root);
101
102 friend class ClientPriv;
103
104 class Priv;
105 std::unique_ptr<Priv> p;
106};
107
108}
109}
110
111#endif // ONEDRIVE_API_CLOUDFOLDER_H_
0112
=== added file 'include/onedrive/api/clouditem.h'
--- include/onedrive/api/clouditem.h 1970-01-01 00:00:00 +0000
+++ include/onedrive/api/clouditem.h 2017-01-03 04:38:36 +0000
@@ -0,0 +1,127 @@
1/*
2 * Copyright © 2016 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authored by: Gary Wang <gary.wang@canonical.com>
17 */
18
19#ifndef ONEDRIVE_API_CLOUDITEM_H_
20#define ONEDRIVE_API_CLOUDITEM_H_
21
22#include <onedrive/api/cloudresource.h>
23#include <onedrive/api/visibility.h>
24
25namespace Json {
26 class Value;
27}
28
29namespace onedrive {
30namespace api {
31
32/*!
33 \class CloudItem
34 \brief CloudItem represents a item object on onedrive.
35 */
36
37class ONEDRIVE_API_DLL_PUBLIC CloudItem: public CloudResource {
38 public:
39 typedef std::shared_ptr<CloudItem> Ptr;
40
41 ~CloudItem();
42
43 /*!
44 * \brief Returns the unique id of cloud item object.
45 */
46 const std::string &id() const override;
47
48 /*!
49 * \brief Returns the name of cloud item object.
50 */
51 const std::string &name() const override;
52
53 /*!
54 * \brief Returns the datetime when item was created.
55 */
56 const std::string &created_date() const override;
57
58 /*!
59 * \brief Returns the datetime when item was updated.
60 */
61 const std::string &updated_date() const override;
62
63 /*!
64 * \brief Returns the item's download link.
65 */
66 const std::string &download_url() const override;
67
68 /*!
69 * \brief Returns the item' parent folder id.
70 */
71 const std::string &parent_folder_id() const override;
72
73 /*!
74 * \brief Returns the item' etag.
75 */
76 const std::string &etag() const override;
77
78 /*!
79 * \brief Returns the item' owner id.
80 */
81 const std::string &owner() const override;
82
83 /*!
84 * \brief Returns the item' resource type.
85 * \sa CloudResource::Property
86 */
87 CloudResource::Property property() const override;
88
89 /*!
90 * \brief Returns content size of the item in bytes.
91 */
92 int64_t size() const;
93
94 /*!
95 * \brief Returns the item's mimetype.
96 */
97 const std::string &mimetype() const;
98
99 /*!
100 * \brief Returns the item's file hash.
101 */
102 const std::string &hash() const;
103
104 /*!
105 * \brief Returns the item's file description.
106 */
107 const std::string &description() const;
108
109 /*!
110 * \brief Returns the item's thumbnails set.
111 */
112 const thumbnail_set &thumbnails() const;
113
114 private:
115 CloudItem(const Json::Value &root);
116
117 friend class UploadTaskPriv;
118 friend class ClientPriv;
119
120 class Priv;
121 std::unique_ptr<Priv> p;
122};
123
124}
125}
126
127#endif // ONEDRIVE_API_CLOUDITEM_H_
0128
=== added file 'include/onedrive/api/cloudresource.h'
--- include/onedrive/api/cloudresource.h 1970-01-01 00:00:00 +0000
+++ include/onedrive/api/cloudresource.h 2017-01-03 04:38:36 +0000
@@ -0,0 +1,75 @@
1/*
2 * Copyright © 2016 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authored by: Gary Wang <gary.wang@canonical.com>
17 */
18
19#ifndef ONEDRIVE_API_CLOUDRESOURCE_H_
20#define ONEDRIVE_API_CLOUDRESOURCE_H_
21
22#include <memory>
23#include <string>
24#include <ctime>
25
26namespace onedrive {
27namespace api {
28
29/*!
30 \class CloudResource
31 \brief CloudResource is an abstract object that provides common interfaces for CloudItem and CloudFolder.
32 */
33
34class CloudResource {
35 public:
36 typedef std::shared_ptr<CloudResource> Ptr;
37
38 typedef struct {
39 std::string large_url;
40 std::string medium_url;
41 std::string small_url;
42 } thumbnail_set;
43
44 enum class Property {
45 Content, ///< content resource
46 Folder ///< folder resource
47 };
48
49 virtual ~CloudResource() = default;
50
51 virtual const std::string& id() const = 0;
52
53 virtual const std::string& name() const = 0;
54
55 virtual const std::string& created_date() const = 0;
56
57 virtual const std::string& updated_date() const = 0;
58
59 virtual const std::string& download_url() const = 0;
60
61 virtual const std::string& parent_folder_id() const = 0;
62
63 virtual const std::string& etag() const = 0;
64
65 virtual const std::string& owner() const = 0;
66
67 virtual const thumbnail_set& thumbnails() const =0;
68
69 virtual Property property() const = 0;
70};
71
72}
73}
74
75#endif // ONEDRIVE_API_CLOUDRESOURCE_H_
076
=== added file 'include/onedrive/api/downloadtask.h'
--- include/onedrive/api/downloadtask.h 1970-01-01 00:00:00 +0000
+++ include/onedrive/api/downloadtask.h 2017-01-03 04:38:36 +0000
@@ -0,0 +1,127 @@
1/*
2 * Copyright © 2016 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authored by: Gary Wang <gary.wang@canonical.com>
17 */
18
19#ifndef ONEDRIVE_API_DOWNLOADTASK_H_
20#define ONEDRIVE_API_DOWNLOADTASK_H_
21
22#include <onedrive/api/visibility.h>
23#include <onedrive/api/cloudresource.h>
24#include <onedrive/api/task.h>
25
26#include <vector>
27
28namespace onedrive {
29namespace api {
30
31class TaskHandler;
32
33/*!
34 \struct DownloadRequest
35 \brief DownloadRequest is an object which can be used to request to download a content from onedrive. Itconsists of a \a item_id and, and a writing callback function \a write_cb allows content data can be received in buffering via callback function.
36 \note if \a write_cb is nullptr, content will be downloaded into a local file. The file path of content can be found from DownloadTask::file_path.
37 \sa Task::Buffer_Callback
38 */
39
40struct ONEDRIVE_API_DLL_PUBLIC DownloadRequest {
41 DownloadRequest(const std::string &id,
42 Task::Buffer_Callback write_callback = nullptr)
43 : item_id(id),
44 write_cb(write_callback) {
45
46 }
47 std::string item_id;
48 Task::Buffer_Callback write_cb;
49};
50typedef std::vector<DownloadRequest> DownloadRequestList;
51
52class DownloadTaskPriv;
53class SyncManagerPriv;
54
55/*!
56 \class DownloadTask
57 \brief DownloadTask is a task item that can be accessed from application layer to fetch
58 basic download item information, also it's used for content download by sync manager.
59 */
60class ONEDRIVE_API_DLL_PUBLIC DownloadTask : public Task {
61 public:
62 typedef std::shared_ptr<DownloadTask> Ptr;
63
64 DownloadTask &operator=(const DownloadTask &) = delete;
65
66 /*!
67 * \brief Returns the display name of cloud content on onedrive.
68 */
69 const std::string &content_name() const override;
70
71 /*!
72 * \brief Returns the cloud content local storage file path.
73 */
74 const std::string &file_path() const override;
75
76 /*!
77 * \brief Returns download url assigned by onedrive for this task.
78 * \note this url will be expried after a period of time.
79 */
80 const std::string &task_url() const override;
81
82 /*!
83 * \brief Returns the error code if an error occurs during content download.
84 */
85 const std::string &error_code() const override;
86
87 /*!
88 * \brief Returns the error string if an error occurs during content download.
89 */
90 const std::string &error_message() const override;
91
92 /*!
93 * \brief Returns current sync-up status for this task.
94 * \sa Task::TaskStatus
95 */
96 Task::Status status() const override;
97
98 /*!
99 * \brief Handler for download progress of a task.
100 * \sa Task::ProgressHandler
101 */
102 Task::ProgressHandler &progress_changed() override;
103
104 /*!
105 * \brief Handler for download status of a task.
106 * \sa Task::StatusHandler
107 */
108 Task::StatusHandler &status_changed() override;
109
110 /*!
111 * \brief cancel the task.
112 * \sa Task::StatusHandler
113 */
114 void cancel() override;
115
116 private:
117 DownloadTask(const std::shared_ptr<DownloadTaskPriv> &p);
118
119 friend class SyncManagerPriv;
120
121 std::shared_ptr<DownloadTaskPriv> p_;
122};
123
124}
125}
126
127#endif // ONEDRIVE_API_DOWNLOADTASK_H_
0128
=== added file 'include/onedrive/api/exceptions.h'
--- include/onedrive/api/exceptions.h 1970-01-01 00:00:00 +0000
+++ include/onedrive/api/exceptions.h 2017-01-03 04:38:36 +0000
@@ -0,0 +1,97 @@
1/*
2 * Copyright © 2016 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authored by: Gary Wang <gary.wang@canonical.com>
17 */
18
19#ifndef ONEDRIVE_API_EXCEPTIONS_H_
20#define ONEDRIVE_API_EXCEPTIONS_H_
21
22#include <onedrive/api/visibility.h>
23
24#include <exception>
25
26namespace onedrive {
27namespace api {
28
29 /**
30 * \brief Indicates a content or a folder can not be found on onedrive.
31 */
32 class ONEDRIVE_API_DLL_PUBLIC NonExistentException : public std::runtime_error {
33 public:
34 using runtime_error::runtime_error;
35 };
36
37 /**
38 * \brief Indicates a content or a folder already exists on one certain folder.
39 */
40 class ONEDRIVE_API_DLL_PUBLIC ItemExistentException : public std::runtime_error {
41 public:
42 using runtime_error::runtime_error;
43 };
44
45 /**
46 * \brief User ran out of space on onedrive storage.
47 */
48 class ONEDRIVE_API_DLL_PUBLIC OutofSpaceException : public std::runtime_error {
49 public:
50 using runtime_error::runtime_error;
51 };
52
53 /**
54 * \brief Indicates a timeout on HTTP requests.
55 */
56 class ONEDRIVE_API_DLL_PUBLIC HttpTimeoutException : public std::runtime_error {
57 public:
58 using runtime_error::runtime_error;
59 };
60
61 /**
62 * \brief Indicates one or more http request parameters are invalid.
63 */
64 class ONEDRIVE_API_DLL_PUBLIC ParameterInvalidException : public std::runtime_error {
65 public:
66 using runtime_error::runtime_error;
67 };
68
69 /**
70 * \brief Indicates access token is invalid or expired.
71 */
72 class ONEDRIVE_API_DLL_PUBLIC CredentialException : public std::runtime_error {
73 public:
74 using runtime_error::runtime_error;
75 };
76
77 /**
78 * \brief Indicates The service is not available. Try the request again after a delay.
79 */
80 class ONEDRIVE_API_DLL_PUBLIC ServiceNotAvailableException : public std::runtime_error {
81 public:
82 using runtime_error::runtime_error;
83 };
84
85 /**
86 * \brief Unknown exception.
87 */
88 class ONEDRIVE_API_DLL_PUBLIC UnknownException : public std::runtime_error {
89 public:
90 using runtime_error::runtime_error;
91 };
92
93
94}
95}
96
97#endif // ONEDRIVE_API_EXCEPTIONS_H_
098
=== added file 'include/onedrive/api/storageinfo.h'
--- include/onedrive/api/storageinfo.h 1970-01-01 00:00:00 +0000
+++ include/onedrive/api/storageinfo.h 2017-01-03 04:38:36 +0000
@@ -0,0 +1,76 @@
1/*
2 * Copyright © 2016 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authored by: Gary Wang <gary.wang@canonical.com>
17 */
18
19#ifndef ONEDRIVE_API_STORAGEINFO_H_
20#define ONEDRIVE_API_STORAGEINFO_H_
21
22#include <onedrive/api/visibility.h>
23
24#include <memory>
25#include <string>
26
27namespace Json {
28class Value;
29}
30
31namespace onedrive {
32namespace api {
33
34/*!
35 \class StorageInfo
36 \brief StorageInfo is a class that provides basic user's account and storage usage information on onedrive.
37 */
38
39class ONEDRIVE_API_DLL_PUBLIC StorageInfo {
40 public:
41 typedef std::shared_ptr<StorageInfo> Ptr;
42
43 ~StorageInfo();
44
45 /*!
46 * \brief Returns the authorized user's id.
47 */
48 const std::string& id() const;
49
50 /*!
51 * \brief Returns the authorized user's name.
52 */
53 const std::string& name() const;
54
55 /*!
56 * \brief Returns the used disk size of user cloud storage in bytes.
57 */
58 int64_t used_disk_size() const;
59
60 /*!
61 * \brief Returns the total disk size assigned by onedrive in bytes.
62 */
63 int64_t total_disk_size() const;
64 private:
65 StorageInfo(const Json::Value& root);
66
67 friend class ClientPriv;
68 class Priv;
69
70 std::unique_ptr<Priv> p;
71};
72
73}
74}
75
76#endif // ONEDRIVE_API_STORAGEINFO_H_
077
=== added file 'include/onedrive/api/syncmanager.h'
--- include/onedrive/api/syncmanager.h 1970-01-01 00:00:00 +0000
+++ include/onedrive/api/syncmanager.h 2017-01-03 04:38:36 +0000
@@ -0,0 +1,168 @@
1/*
2 * Copyright © 2016 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authored by: Gary Wang <gary.wang@canonical.com>
17 */
18
19#ifndef ONEDRIVE_API_SYNCMANAGER_H_
20#define ONEDRIVE_API_SYNCMANAGER_H_
21
22#include <onedrive/api/taskqueue.h>
23#include <onedrive/api/downloadtask.h>
24#include <onedrive/api/uploadtask.h>
25#include <onedrive/api/visibility.h>
26
27#include <memory>
28#include <vector>
29
30namespace onedrive {
31namespace api {
32
33class ClientPriv;
34class SyncManagerPriv;
35
36/*!
37 \class SyncManager
38 \brief SyncManager handles all the requests to upload and download.
39 It's constructed around two threads for content synchronization. One for content upload to cloud, another for cloud item download to local.
40 Both thread are running asynchronously.
41 Calls \sa add_download_task() by passing a \a DownloadRequest for cloud content download,
42 Calls \sa add_upload_tasks() by passing a \a UploadRequest or \a UploadBufferCb for local content upload.
43 */
44
45class ONEDRIVE_API_DLL_PUBLIC SyncManager {
46 public:
47 typedef std::shared_ptr<SyncManager> Ptr;
48
49 typedef TaskQueue<DownloadTask::Ptr> DownloadList;
50
51 typedef TaskQueue<UploadTask::Ptr> UploadList;
52
53 typedef std::vector<std::string> Stringlist;
54
55 virtual ~SyncManager() = default;
56
57 SyncManager(const SyncManager &) = delete;
58
59 SyncManager &operator=(const SyncManager &) = delete;
60
61 /*!
62 * \brief Starts to run download and upload tasks from sync-up thread.
63 * The tasks can be resumed by sync-up thread if sync manager is in paused or cancelled state.
64 * \sa pause(), cancel()
65 */
66 void start();
67
68 /*!
69 * \brief Cancels all download andupload tasks from sync-up thread if sync manager is running.
70 * \note The cancelled download or upload tasks can not be resumed by sync-up thread.
71 * \sa start(), pause()
72 */
73 void cancel();
74
75 /*!
76 * \brief Pauses download and upload task from sync-up thread if sync manager is running.
77 * Sync-up thread can resume previous paused tasks by calling \sa start().
78 * \sa start(), cancel()
79 */
80 void pause();
81
82 /*!
83 * \brief Pushes the download request item \a buffer_cb_item into download queue and add the download task into download queue.
84 * Each download buffer consists of the following fields
85 * - `content_id` (string)
86 * The id of content on onedrive.
87 * - `write_cb` (std::function<size_t(void *dest, size_t buf_size)>)
88 * buffer writing callback function.
89 * The buffer area pointed at by the pointer \a dest should be filled up with at most \a buf_size number of bytes.
90 * \return a download task item that is pushed in sync-up manager.
91 * \throw onedrive specific exceptions or std::runtime_error if error occurs.
92 * \note if \a write_cb is nullptr, content will be downloaded into a local file. The file path of content can ben found from DownloadTask::file_path.
93 * \sa add_download_tasks(), DownloadTask
94 */
95 DownloadTask::Ptr add_download_task(const DownloadRequest &request_item);
96
97 /*!
98 * \brief Pushes the upload request item \a reqeust_item to sync manager and add the upload task into upload queue.
99 * A upload request consists of the following fields
100 * - `file_path` (string)
101 * local file path.
102 * - `folder_id` (string)
103 * onedrive folder id which stores content in uploads folder.
104 * - `content_name` (string)
105 * uploaded content name.
106 * - `conflict_behavior` (enum)
107 * name conflict behavior
108 * If content_name is empty, local file name will be used as a content name displayed on onedrive.
109 * If folder_id is empty, content will be uploaded into root folder.
110 * \return a upload task item that is pushed in sync-up manager.
111 * \throw onedrive specific exceptions or std::runtime_error if error occurs.
112 * \note A file name can not contain any of following characters:
113 * '\', '/', ':', '*', '?', '"', '<', '>', '|'
114 * \note Sync manager will detect if the uploading file is already existing on cloud,
115 * if so, it simply sets the status of upload task completed to avoid duplicate upload.
116 * \sa add_download_tasks(), UploadRequest, UploadTask,
117 */
118 UploadTask::Ptr add_upload_task(const UploadRequest &reqeust_item);
119
120 /*!
121 * \brief Pushes the upload callback item \a buffer_cb to sync manager and add the upload task into upload queue.
122 * A upload buffer consists of the following fields
123 * - `read_cb` (std::function<size_t(void *dest, size_t buf_size)>)
124 * buffer reading callback function.
125 * The buffer area pointed at by the pointer \a dest should be filled up with at most \a buf_size number of bytes.
126 * - `total_size` (size_t)
127 * total size of data buffers.
128 * - `folder_id` (string)
129 * onedrive folder id which stores content in uploads folder.
130 * - `content_name` (string)
131 * uploaded content name, should not be empty.
132 * - `conflict_behavior` (enum)
133 * name conflict behavior
134 * If folder_id is empty, content will be uploaded into root folder.
135 * \return a upload task item that are pushed in sync-up manager.
136 * \throw onedrive specific exception or std::runtime_error if error occurs.
137 * \note A file name can not contain any of following characters:
138 * '\', '/', ':', '*', '?', '"', '<', '>', '|'
139 * \sa add_download_tasks(), UploadRequest, UploadTask,
140 */
141 UploadTask::Ptr add_upload_task(const UploadBufferCb &buffer_cb);
142
143 /*!
144 * \brief Returns the download task list hold by sync up manager.
145 * Each item in the list contains basic information of associated task.
146 * \sa upload_queue(), DownloadTask
147 */
148 DownloadList download_queue();
149
150 /*!
151 * \brief Returns the upload task list hold by sync up manager.
152 * Each item in the list contains basic information of associated task.
153 * \sa download_queue(), UploadTask
154 */
155 UploadList upload_queue();
156
157 private:
158 SyncManager(ClientPriv *client_priv);
159
160 friend class ClientPriv;
161
162 std::unique_ptr<SyncManagerPriv> p_;
163};
164
165}
166}
167
168#endif // ONEDRIVE_API_SYNCMANAGER_H_
0169
=== added file 'include/onedrive/api/task.h'
--- include/onedrive/api/task.h 1970-01-01 00:00:00 +0000
+++ include/onedrive/api/task.h 2017-01-03 04:38:36 +0000
@@ -0,0 +1,127 @@
1/*
2 * Copyright © 2016 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authored by: Gary Wang <gary.wang@canonical.com>
17 */
18
19#ifndef ONEDRIVE_API_TASK_H_
20#define ONEDRIVE_API_TASK_H_
21
22#include <onedrive/api/visibility.h>
23#include <functional>
24#include <string>
25
26namespace onedrive {
27namespace api {
28
29/*!
30 \class Task
31 \brief Task is an abstract class that defines common interfaces for upload and download task.
32 */
33
34class ONEDRIVE_API_DLL_PUBLIC Task {
35 public:
36
37 /*!
38 * \brief job chunk size.
39 */
40 enum {
41 CHUNK_SIZE = 1024 * 1024 * 10
42 };
43
44 /*!
45 * \brief The Status enum indicates current status of this task.
46 */
47 enum class Status {
48 Unstart, ///< Task is in queue and sync manager does not run this task yet.
49 Running, ///< Task is being processed by sync manager.
50 Cancelled, ///< Task is in cancelled status, \sa Client::cancel_sync().
51 Paused, ///< Task is in paused status, \sa Client::pause_sync().
52 Broken, ///< Task is broken when sync manager failed to download/upload a task after several times trying.
53 Complete, ///< Task is completed.
54 };
55
56 /*!
57 * \brief The name conflict enum which can be specified to decide the file name conflict behavior when uploading a content on onedrive.
58 * The default name conflict behavior is NameConflictBehavior::Replace.
59 */
60 enum class NameConflictBehavior {
61 Fail, ///<Failed if the file already exists.
62 Replace, ///<Replace current content if the file already exists.
63 Rename ///<Automatically renamed by onedrive if the file already exists.
64 };
65
66 typedef std::function<void(float)> ProgressHandler;
67
68 typedef std::function<void(Status)> StatusHandler;
69
70 typedef std::function<size_t(void* dest, size_t buf_size)> Buffer_Callback;
71
72 virtual ~Task() = default;
73
74 /*!
75 * \brief Returns the display name of cloud content on onedrive.
76 */
77 virtual const std::string& content_name() const = 0;
78
79 /*!
80 * \brief Returns the cloud content local storage file path.
81 */
82 virtual const std::string& file_path() const = 0;
83
84 /*!
85 * \brief Returns the error code if an error occurs during task running.
86 */
87 virtual const std::string& error_code() const = 0;
88
89 /*!
90 * \brief Returns the error string if an error occurs during task running.
91 */
92 virtual const std::string& error_message() const = 0;
93
94 /*!
95 * \brief Returns the task url.
96 * \note the url will be expried after a period of time.
97 */
98 virtual const std::string& task_url() const = 0;
99
100 /*!
101 * \brief Returns current download or upload item sync-up status.
102 */
103 virtual Task::Status status() const = 0;
104
105 /*!
106 * \brief Handler for download or upload progress of a task.
107 * \sa Task::ProgressHandler
108 */
109 virtual Task::ProgressHandler& progress_changed() = 0;
110
111 /*!
112 * \brief Handler for download or upload progress of a task.
113 * \sa Task::StatusHandler
114 */
115 virtual Task::StatusHandler& status_changed() = 0;
116
117 /*!
118 * \brief Cancel the task.
119 * \sa Task::StatusHandler
120 */
121 virtual void cancel() = 0;
122};
123
124}
125}
126
127#endif // ONEDRIVE_API_TASK_H_
0128
=== added file 'include/onedrive/api/taskqueue.h'
--- include/onedrive/api/taskqueue.h 1970-01-01 00:00:00 +0000
+++ include/onedrive/api/taskqueue.h 2017-01-03 04:38:36 +0000
@@ -0,0 +1,132 @@
1/*
2 * Copyright © 2016 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authored by: Gary Wang <gary.wang@canonical.com>
17 */
18
19#ifndef ONEDRIVE_API_TASKQUEUE_H_
20#define ONEDRIVE_API_TASKQUEUE_H_
21
22#include <memory>
23#include <deque>
24#include <mutex>
25
26namespace onedrive {
27namespace api {
28
29/*!
30 \class TaskQueue
31 \brief A thread-safe deque template.
32 */
33template<typename T, typename Container = std::deque<T>>
34class TaskQueue {
35 public:
36 typedef std::shared_ptr<TaskQueue> Ptr;
37 typedef typename Container::size_type size_type;
38 typedef typename Container::const_iterator const_iterator;
39
40 TaskQueue() = default;
41
42 virtual ~TaskQueue() = default;
43
44 TaskQueue(TaskQueue&& queue) {
45 std::lock_guard<std::mutex> lock(mutex_);
46 tasks_ = std::move(queue.tasks_);
47 }
48
49 TaskQueue(const TaskQueue& queue) {
50 std::lock_guard<std::mutex> lock(mutex_);
51 tasks_ = queue.tasks_;
52 }
53
54 TaskQueue& operator= (const TaskQueue& queue) {
55 if (this != &queue) {
56 std::lock_guard<std::mutex> lock1(mutex_);
57 std::lock_guard<std::mutex> lock2(queue.mutex_);
58 tasks_ = queue.tasks_;
59 }
60
61 return *this;
62 }
63
64 typename Container::iterator begin() {
65 std::lock_guard<std::mutex> lock(mutex_);
66 return tasks_.begin();
67 }
68
69 typename Container::iterator end() {
70 std::lock_guard<std::mutex> lock(mutex_);
71 return tasks_.end();
72 }
73
74 typename Container::iterator cbegin() const {
75 std::lock_guard<std::mutex> lock(mutex_);
76 return tasks_.cbegin();
77 }
78
79 typename Container::iterator cend() const {
80 std::lock_guard<std::mutex> lock(mutex_);
81 return tasks_.cend();
82 }
83
84 size_type size() const {
85 std::lock_guard<std::mutex> lock(mutex_);
86 return tasks_.size();
87 }
88
89 bool empty() const {
90 std::lock_guard<std::mutex> lock(mutex_);
91 return tasks_.empty();
92 }
93
94 void push(const T& task) {
95 std::lock_guard<std::mutex> lock(mutex_);
96 tasks_.push_back(task);
97 }
98
99 void push(const TaskQueue& queue) {
100 std::lock_guard<std::mutex> lock(mutex_);
101 for (const T& task : queue.tasks_) {
102 tasks_.push_back(task);
103 }
104 }
105
106 bool try_pop(T& task) {
107 std::lock_guard<std::mutex> lock(mutex_);
108
109 if (tasks_.empty()) {
110 return false;
111 }
112
113 task = tasks_.front();
114 tasks_.pop_front();
115 return true;
116 }
117
118 const T& operator[](int index) const {
119 std::lock_guard<std::mutex> lock(mutex_);
120 return tasks_[index];
121 }
122
123 private:
124 Container tasks_;
125
126 mutable std::mutex mutex_;
127};
128
129}
130}
131
132#endif // ONEDRIVE_API_TASKQUEUE_H_
0133
=== added file 'include/onedrive/api/uploadtask.h'
--- include/onedrive/api/uploadtask.h 1970-01-01 00:00:00 +0000
+++ include/onedrive/api/uploadtask.h 2017-01-03 04:38:36 +0000
@@ -0,0 +1,171 @@
1/*
2 * Copyright © 2016 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authored by: Gary Wang <gary.wang@canonical.com>
17 */
18
19#ifndef ONEDRIVE_API_UPLOADTASK_H_
20#define ONEDRIVE_API_UPLOADTASK_H_
21
22#include <onedrive/api/task.h>
23#include <onedrive/api/visibility.h>
24
25#include <memory>
26#include <vector>
27
28namespace Json {
29class Value;
30}
31
32namespace onedrive {
33namespace api {
34
35class TaskHandler;
36
37/*!
38 \struct UploadRequest
39 \brief UploadRequest is an object which can be used to request to upload local file on ondrive. It consists of a local file path \a path, a folder id \a parent_folder_id, a content name \a upload_file_name, and a name conflict behavior \a behavior.
40 \sa Task::NameConflictBehavior
41 */
42struct ONEDRIVE_API_DLL_PUBLIC UploadRequest {
43 UploadRequest(const std::string &path,
44 const std::string &parent_folder_id,
45 const std::string &upload_file_name,
46 Task::NameConflictBehavior conflict_name_behavior = Task::NameConflictBehavior::Replace)
47 : file_path(path),
48 folder_id(parent_folder_id),
49 content_name(upload_file_name),
50 conflict_behavior(conflict_name_behavior) {
51 }
52
53 std::string file_path;
54 std::string folder_id;
55 std::string content_name;
56 Task::NameConflictBehavior conflict_behavior;
57};
58typedef std::vector<UploadRequest> UploadRequestList;
59
60/*!
61 \struct UploadBufferCb
62 \brief UploadBufferCb is an object which can be used to request to upload content on onedrive in streaming. It consists of a reading callback function \a read_callback which allows content data can be sent in buffering via callback function, a up-front content size \a total_buf_size, a folder id \a parent_folder_id, a \a upload_file_name, and a name conflict behavior \a behavior.
63 \sa Task::NameConflictBehavior, Task::Buffer_Callback
64*/
65struct ONEDRIVE_API_DLL_PUBLIC UploadBufferCb {
66 UploadBufferCb(const Task::Buffer_Callback read_callback,
67 size_t total_buffer_size,
68 const std::string &parent_folder_id,
69 const std::string &upload_file_name,
70 Task::NameConflictBehavior behavior = Task::NameConflictBehavior::Replace)
71 : read_cb(read_callback),
72 total_size(total_buffer_size),
73 folder_id(parent_folder_id),
74 content_name(upload_file_name),
75 conflict_behavior(behavior) {
76 }
77
78 Task::Buffer_Callback read_cb;
79 size_t total_size;
80 std::string folder_id;
81 std::string content_name;
82 Task::NameConflictBehavior conflict_behavior = Task::NameConflictBehavior::Replace;
83};
84typedef std::vector<UploadBufferCb> UploadBufferCbList;
85
86class UploadTaskPriv;
87class CloudItem;
88
89/*!
90 \class UploadTask
91 \brief UploadTask is a task item that can be accessed from application layer to fetch
92 basic upload item information, also it's used for content upload by sync manager.
93 */
94class ONEDRIVE_API_DLL_PUBLIC UploadTask : public Task {
95 public:
96 typedef std::shared_ptr<UploadTask> Ptr;
97
98 UploadTask &operator=(const UploadTask &) = delete;
99
100 /*!
101 * \brief Returns the display name of local content.
102 */
103 const std::string &content_name() const override;
104
105 /*!
106 * \brief Returns the uploaded local content file path.
107 */
108 const std::string &file_path() const override;
109
110 /*!
111 * \brief Returns the upload session url for this task.
112 * \note this url will be expried after a period of time.
113 */
114 const std::string &task_url() const override;
115
116 /*!
117 * \brief Returns the error code if an error occurs during content uploading.
118 */
119 const std::string &error_code() const override;
120
121 /*!
122 * \brief Returns the error string if an error occurs during content uploading.
123 */
124 const std::string &error_message() const override;
125
126 /*!
127 * \brief Returns current sync-up status for this task.
128 */
129 Task::Status status() const override;
130
131 /*!
132 * \brief Handler for upload progress of a task.
133 * \sa Task::ProgressHandler
134 */
135 Task::ProgressHandler &progress_changed() override;
136
137 /*!
138 * \brief Handler for upload status of a task.
139 * \sa Task::StatusHandler
140 */
141 Task::StatusHandler &status_changed() override;
142
143 /*!
144 * \brief Returns the cloud item object on ondrive associated with the uploaded content.
145 * \note Returns nullptr if task failed to upload regarding content on onedrive.
146 */
147 std::shared_ptr<CloudItem> upload_item() const;
148
149 /*!
150 * \brief cancel the task.
151 * \sa Task::StatusHandler
152 */
153 void cancel() override;
154
155 /*!
156 * \brief Returns file size of upload content.
157 */
158 size_t file_size() const;
159
160 private:
161 UploadTask(std::shared_ptr<UploadTaskPriv> p);
162
163 friend class SyncManagerPriv;
164
165 std::shared_ptr<UploadTaskPriv> p_;
166};
167
168}
169}
170
171#endif // ONEDRIVE_API_UPLOADTASK_H_
0172
=== added file 'include/onedrive/api/visibility.h'
--- include/onedrive/api/visibility.h 1970-01-01 00:00:00 +0000
+++ include/onedrive/api/visibility.h 2017-01-03 04:38:36 +0000
@@ -0,0 +1,30 @@
1/*
2 * Copyright (C) 2016 Canonical, Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Author: Gary Wang <gary.wang@canonical.com>
17 */
18
19#ifndef ONEDRIVE_API_VISIBILITY_H_
20#define ONEDRIVE_API_VISIBILITY_H_
21
22#if __GNUC__ >= 4
23#define ONEDRIVE_API_DLL_PUBLIC __attribute__ ((visibility ("default")))
24#define ONEDRIVE_API_DLL_LOCAL __attribute__ ((visibility ("hidden")))
25#else
26#define ONEDRIVE_API_DLL_PUBLIC
27#define ONEDRIVE_API_DLL_LOCAL
28#endif
29
30#endif // ONEDRIVE_API_VISIBILITY_H_
031
=== modified file 'provider/CMakeLists.txt'
--- provider/CMakeLists.txt 2016-09-26 04:27:03 +0000
+++ provider/CMakeLists.txt 2017-01-03 04:38:36 +0000
@@ -0,0 +1,56 @@
1install(
2 FILES storage-provider-onedrive.service
3 DESTINATION ${CMAKE_INSTALL_DATADIR}/accounts/services
4)
5
6install(
7 FILES storage-provider-onedrive.application
8 DESTINATION ${CMAKE_INSTALL_DATADIR}/accounts/applications
9)
10
11install(
12 FILES storage-provider-onedrive.desktop
13 DESTINATION ${CMAKE_INSTALL_DATADIR}/applications
14)
15
16find_package(PkgConfig REQUIRED)
17find_package(Boost COMPONENTS filesystem system thread REQUIRED)
18
19pkg_check_modules(STORAGE_FRAMEWORK_PROVIDER storage-framework-provider-1>=0.2 REQUIRED)
20
21include_directories(${CMAKE_CURRENT_BINARY_DIR} ${STORAGE_FRAMEWORK_PROVIDER_INCLUDE_DIRS})
22
23add_definitions(-DBOOST_THREAD_VERSION=4)
24
25add_library(onedrive-provider-static STATIC onedriveprovider.cpp)
26
27add_executable(onedrive-provider-bin main.cpp onedriveprovider.cpp)
28
29target_link_libraries(
30 onedrive-provider-bin
31
32 onedrive-provider-static
33 onedrive-provider-lib
34
35 ${Boost_LIBRARIES}
36 ${STORAGE_FRAMEWORK_PROVIDER_LDFLAGS}
37)
38
39SET_TARGET_PROPERTIES(onedrive-provider-bin
40 PROPERTIES OUTPUT_NAME onedrive-provider
41)
42
43install(
44 TARGETS onedrive-provider-bin
45 RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}
46)
47
48configure_file(
49 com.canonical.StorageFramework.Provider.OnedriveProvider.service.in
50 com.canonical.StorageFramework.Provider.OnedriveProvider.service
51)
52
53install(
54 FILES ${CMAKE_CURRENT_BINARY_DIR}/com.canonical.StorageFramework.Provider.OnedriveProvider.service
55 DESTINATION ${CMAKE_INSTALL_DATADIR}/dbus-1/services
56)
057
=== added file 'provider/com.canonical.StorageFramework.Provider.OnedriveProvider.service.in'
--- provider/com.canonical.StorageFramework.Provider.OnedriveProvider.service.in 1970-01-01 00:00:00 +0000
+++ provider/com.canonical.StorageFramework.Provider.OnedriveProvider.service.in 2017-01-03 04:38:36 +0000
@@ -0,0 +1,3 @@
1[D-BUS Service]
2Name=com.canonical.StorageFramework.Provider.OnedriveProvider
3Exec=@CMAKE_INSTALL_FULL_LIBDIR@/@PROJECT_NAME@/onedrive-provider
04
=== added file 'provider/main.cpp'
--- provider/main.cpp 1970-01-01 00:00:00 +0000
+++ provider/main.cpp 2017-01-03 04:38:36 +0000
@@ -0,0 +1,23 @@
1#include "onedriveprovider.h"
2#include <unity/storage/provider/Server.h>
3#include <signal.h>
4
5using namespace std;
6using namespace unity::storage::provider;
7
8int main(int argc, char **argv)
9{
10 signal(SIGPIPE, SIG_IGN);
11
12 const string bus_name = "com.canonical.StorageFramework.Provider.OnedriveProvider";
13 string account_service_id = "storage-provider-onedrive";
14 if (argc > 1)
15 {
16 account_service_id = argv[1];
17 }
18
19 Server<OnedriveProvider> server(bus_name, account_service_id);
20 server.init(argc, argv);
21 server.run();
22}
23
024
=== added file 'provider/onedriveprovider.cpp'
--- provider/onedriveprovider.cpp 1970-01-01 00:00:00 +0000
+++ provider/onedriveprovider.cpp 2017-01-03 04:38:36 +0000
@@ -0,0 +1,677 @@
1/*
2 * Copyright (C) 2016 Canonical Ltd
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authors: Gary Wang <gary.wang@canonical.com>
17 */
18
19#include "onedriveprovider.h"
20#include <unity/storage/common.h>
21#include <unity/storage/provider/ProviderBase.h>
22#include <unity/storage/provider/TempfileUploadJob.h>
23#include <unity/storage/provider/UploadJob.h>
24#include <unity/storage/provider/DownloadJob.h>
25#include <unity/storage/provider/Exceptions.h>
26
27#include <boost/thread.hpp>
28#include <boost/thread/future.hpp>
29#include <boost/filesystem.hpp>
30#include <boost/make_shared.hpp>
31#include <boost/uuid/uuid_generators.hpp>
32#include <boost/uuid/uuid_io.hpp>
33#include <boost/format.hpp>
34
35#include <unistd.h>
36#include <sys/socket.h>
37#include <iostream>
38#include <memory>
39#include <mutex>
40#include <stdexcept>
41
42#include <onedrive/api/client.h>
43#include <onedrive/api/uploadtask.h>
44#include <onedrive/api/syncmanager.h>
45#include <onedrive/api/cloudresource.h>
46#include <onedrive/api/clouditem.h>
47#include <onedrive/api/cloudfolder.h>
48#include <onedrive/api/exceptions.h>
49
50using namespace std;
51using namespace unity::storage;
52using namespace unity::storage::provider;
53using namespace onedrive::api;
54using namespace boost::uuids;
55
56using boost::make_ready_future;
57using boost::make_exceptional_future;
58using boost::format;
59
60namespace {
61 static constexpr const int TIME_OUT = 10;
62 static constexpr const int CLIENT_COUNT = 3;
63
64 static const char *STATUS[] = {"unstart", "running", "cancelled", "paused", "broken", "complete"};
65
66 string make_job_id() {
67 auto uuid = random_generator()();
68 return to_string(uuid);
69 }
70
71 string status_to_string(Task::Status status) {
72 return STATUS[int(status)];
73 }
74
75 int pending_jobs_count(Client::Ptr client, OnedriveProvider::JobMode mode) {
76 int count = 0;
77 auto syncmanager = client->syncmanager();
78 if (mode == OnedriveProvider::JobMode::Download) {
79 auto download_task_queue = syncmanager->download_queue();
80 for (auto& item_ptr : download_task_queue) {
81 if (item_ptr->status() == Task::Status::Running
82 || item_ptr->status() == Task::Status::Paused
83 || item_ptr->status() == Task::Status::Unstart) {
84 count++;
85 }
86 }
87 } else if (mode == OnedriveProvider::JobMode::Upload) {
88 auto upload_task_queue = syncmanager->upload_queue();
89 for (auto& item_ptr : upload_task_queue) {
90 if (item_ptr->status() == Task::Status::Running
91 || item_ptr->status() == Task::Status::Paused
92 || item_ptr->status() == Task::Status::Unstart) {
93 count++;
94 }
95 }
96 }
97
98 return count;
99 }
100
101 Item content_to_item(CloudResource::Ptr resource, vector<string> const& keys) {
102 Item item;
103 item.item_id = resource->id();
104 item.parent_ids = {resource->parent_folder_id()};
105 item.name = resource->name();
106 item.etag = resource->etag();
107 item.metadata[metadata::LAST_MODIFIED_TIME] = resource->updated_date();
108 if (resource->property() == CloudResource::Property::Folder) {
109 item.type = ItemType::folder;
110 } else if (resource->property() == CloudResource::Property::Content) {
111 item.type = ItemType::file;
112 auto file = std::static_pointer_cast<onedrive::api::CloudItem>(resource);
113 item.metadata[metadata::SIZE_IN_BYTES] = file->size();
114 }
115
116 if (!keys.empty()) {
117 if (keys[0] == metadata::ALL) {
118 item.metadata[metadata::CREATION_TIME] = resource->created_date();
119 item.metadata["onedrive:owner"] = resource->owner();
120 item.metadata["onedrive:large_thumbnail"] = resource->thumbnails().large_url;
121 item.metadata["onedrive:medium_thumbnail"] = resource->thumbnails().medium_url;
122 item.metadata["onedrive:small_thumbnail"] = resource->thumbnails().small_url;
123 if (resource->property() == CloudResource::Property::Folder) {
124 auto folder = std::static_pointer_cast<onedrive::api::CloudFolder>(resource);
125 item.metadata[metadata::CHILD_COUNT] = folder->children_count();
126 } else if (resource->property() == CloudResource::Property::Content) {
127 auto file = std::static_pointer_cast<onedrive::api::CloudItem>(resource);
128 item.metadata[metadata::DOWNLOAD_URL] = file->download_url();
129 item.metadata[metadata::DESCRIPTION] = file->description();
130 item.metadata[metadata::CONTENT_TYPE] = file->mimetype();
131 item.metadata["onedrive:hash"] = file->hash();
132 }
133 } else {
134 auto metadata = [&]() {
135 std::map<std::string, MetadataValue> metadata;
136 auto type = resource->property();
137 for (const auto& key: keys) {
138 if (key == "onedrive:owner") {
139 metadata["onedrive:owner"] = resource->owner();
140 } else if (key == "onedrive:large_thumbnail") {
141 metadata["onedrive:large_thumbnail"] = resource->thumbnails().large_url;
142 } else if (key == "onedrive:medium_thumbnail") {
143 metadata["onedrive:medium_thumbnail"] = resource->thumbnails().medium_url;
144 } else if (key == "onedrive:small_thumbnail") {
145 metadata["onedrive:small_thumbnail"] = resource->thumbnails().small_url;
146 } else if (key == metadata::CREATION_TIME) {
147 metadata[metadata::CREATION_TIME] = resource->created_date();
148 } else if (type == CloudResource::Property::Folder && key == metadata::CHILD_COUNT) {
149 auto folder = std::static_pointer_cast<onedrive::api::CloudFolder>(resource);
150 metadata[metadata::CHILD_COUNT] = folder->children_count();
151 } else if (type == CloudResource::Property::Content && key == "onedrive:hash") {
152 auto file = std::static_pointer_cast<onedrive::api::CloudItem>(resource);
153 item.metadata["onedrive:hash"] = file->hash();
154 } else if (type == CloudResource::Property::Content && key == metadata::CONTENT_TYPE) {
155 auto file = std::static_pointer_cast<onedrive::api::CloudItem>(resource);
156 metadata[metadata::CONTENT_TYPE] = file->mimetype();
157 } else if (type == CloudResource::Property::Content && key == metadata::DOWNLOAD_URL) {
158 auto file = std::static_pointer_cast<onedrive::api::CloudItem>(resource);
159 metadata[metadata::DOWNLOAD_URL] = file->download_url();
160 } else if (type == CloudResource::Property::Content && key == metadata::SIZE_IN_BYTES){
161 auto file = std::static_pointer_cast<onedrive::api::CloudItem>(resource);
162 metadata[metadata::SIZE_IN_BYTES] = file->size();
163 } else if (type == CloudResource::Property::Content && key == metadata::DESCRIPTION) {
164 auto file = std::static_pointer_cast<onedrive::api::CloudItem>(resource);
165 metadata[metadata::DESCRIPTION] = file->description();
166 }
167 }
168
169 return metadata;
170 }();
171
172 item.metadata.insert(metadata.begin(), metadata.end());
173 }
174 }
175
176 return item;
177 }
178}
179
180class OnedriveUploadJob : public UploadJob {
181 public:
182 OnedriveUploadJob(string const& upload_id,
183 string const& parent_id,
184 string const& file_name,
185 int64_t size,
186 bool allow_overwrite,
187 vector<string> const& keys,
188 Client::Ptr client);
189
190 boost::future<void> cancel() override;
191 boost::future<Item> finish() override;
192 private:
193 boost::future<tuple<Item, string>> upload_data();
194 void stop_and_cancel();
195 private:
196 string parent_id_;
197 string file_name_;
198 int64_t upload_size_;
199 bool allow_overwrite_;
200 vector<string> keys_;
201
202 std::mutex mutex_;
203 UploadTask::Ptr task_;
204 Client::Ptr client_;
205 boost::future<tuple<Item, string>> upload_future_;
206};
207
208class OnedriveDownloadJob : public DownloadJob {
209 public:
210 OnedriveDownloadJob(string const& download_id,
211 string const& item_id,
212 Client::Ptr client);
213
214 boost::future<void> cancel() override;
215 boost::future<void> finish() override;
216 private:
217 boost::future<tuple<bool, string>> download_data();
218 void send_data();
219 void stop_and_cancel();
220 private:
221 string item_id_;
222
223 std::mutex mutex_;
224 DownloadTask::Ptr task_;
225 Client::Ptr client_;
226 boost::future<tuple<bool, string>> download_future_;
227};
228
229OnedriveProvider::OnedriveProvider()
230 : client_list_(CLIENT_COUNT, std::make_shared<Client>(TIME_OUT)) {
231}
232
233boost::future<ItemList> OnedriveProvider::roots(vector<string> const& keys,
234 Context const& ctx) {
235 return boost::async([=]() {
236 try {
237 auto client = assign_client(ctx);
238 auto root_folder = client->root_folder();
239 auto root = content_to_item(root_folder, keys);
240 //manually set item type as root and parent ids to empty.
241 root.type = ItemType::root;
242 root.parent_ids = {};
243 ItemList roots = {{root}};
244 return roots;
245 } catch (runtime_error& e) {
246 throw boost::enable_current_exception(
247 RemoteCommsException(string("OnedriveProvider::roots() failed: ") + e.what()));
248 }
249 });
250}
251
252boost::future<tuple<ItemList, string>> OnedriveProvider::list(string const& item_id,
253 string const& page_token,
254 vector<string> const& keys,
255 Context const& ctx) {
256 return boost::async([=]() {
257 try {
258 auto client = assign_client(ctx);
259
260 Client::ResourceList content_list;
261 std::string next_page_token;
262 std::tie(content_list, next_page_token) = client->cloud_content_list(item_id, page_token);
263
264 ItemList items;
265 for (const auto& content : content_list) {
266 items.push_back(content_to_item(content, keys));
267 }
268
269 return make_tuple(items, next_page_token);
270 } catch (NonExistentException& e) {
271 throw boost::enable_current_exception(
272 NotExistsException(string("OnedriveProvider::list() failed: ") + e.what(), item_id));
273 } catch (runtime_error& e) {
274 throw boost::enable_current_exception(
275 RemoteCommsException(string("OnedriveProvider::list() failed: ") + e.what()));
276 }
277 });
278}
279
280boost::future<ItemList> OnedriveProvider::lookup(string const& parent_id,
281 string const& name,
282 vector<string> const& keys,
283 Context const& ctx) {
284 return boost::async([=]() {
285 try {
286 auto client = assign_client(ctx);
287 auto content_list = client->search(name, parent_id);
288
289 ItemList items;
290 for (const auto& content : content_list) {
291 items.push_back(content_to_item(content, keys));
292 }
293
294 return items;
295 } catch (NotExistsException& e) {
296 throw boost::enable_current_exception(
297 NotExistsException(string("OnedriveProvider::lookup() folder not exists: ") + e.what(), parent_id));
298 } catch (runtime_error& e) {
299 throw boost::enable_current_exception(
300 RemoteCommsException(string("OnedriveProvider::lookup() failed: ") + e.what()));
301 }
302 });
303}
304
305boost::future<Item> OnedriveProvider::metadata(string const& item_id,
306 vector<string> const& keys,
307 Context const& ctx) {
308 return boost::async([=]() {
309 try {
310 auto client = assign_client(ctx);
311 auto content = client->metadata(item_id);
312 return content_to_item(content, keys);
313 } catch (NonExistentException& e) {
314 throw boost::enable_current_exception(
315 NotExistsException(string("OnedriveProvider::metadata() content not exists: ") + e.what(), item_id));
316 } catch (runtime_error& e) {
317 throw boost::enable_current_exception(
318 RemoteCommsException(string("OnedriveProvider::metadata() failed: ") + e.what()));
319 }
320 });
321}
322
323boost::future<Item> OnedriveProvider::create_folder(string const& parent_id,
324 string const& name,
325 vector<string> const& keys,
326 Context const& ctx) {
327 return boost::async([=]() {
328 try {
329 auto client = assign_client(ctx);
330 auto content = client->create_folder(name, parent_id);
331 return content_to_item(content, keys);
332 } catch (NonExistentException& e) {
333 throw boost::enable_current_exception(
334 NotExistsException(string("OnedriveProvider::create_folder() failed: ") + e.what(), name));
335 } catch (runtime_error& e) {
336 throw boost::enable_current_exception(
337 RemoteCommsException(string("OnedriveProvider::create_folder() failed: ") + e.what()));
338 }
339 });
340}
341
342boost::future<unique_ptr<UploadJob>> OnedriveProvider::create_file(string const& parent_id,
343 string const& name,
344 int64_t size,
345 string const& /*content_type*/,
346 bool allow_overwrite,
347 vector<string> const& keys,
348 Context const& ctx) {
349 auto client = assign_client(ctx, JobMode::Upload);
350 return make_ready_future(unique_ptr<UploadJob>(new OnedriveUploadJob(make_job_id(), parent_id, name, size, allow_overwrite, keys, client)));
351}
352
353boost::future<unique_ptr<UploadJob>> OnedriveProvider::update(string const& item_id,
354 int64_t size,
355 string const& /*old_etag*/,
356 vector<string> const& keys,
357 Context const& ctx) {
358 //1.fetch metadata to get item's name and folder id.
359 //2.update the file with Task::NameConflictBehavior::Replace
360
361 return boost::async([=]() {
362 try {
363 auto client = assign_client(ctx);
364 auto content = client->metadata(item_id);
365 auto parent_id = content->parent_folder_id();
366 auto file_name = content->name();
367
368 return create_file(parent_id, file_name, size, "", true, keys, ctx).get();
369 } catch (NonExistentException& e) {
370 throw boost::enable_current_exception(
371 NotExistsException(string("OnedriveProvider::update() failed: ") + e.what(), item_id));
372 } catch (runtime_error& e) {
373 throw boost::enable_current_exception(
374 RemoteCommsException(string("OnedriveProvider::update() failed: ") + e.what()));
375 }
376 });
377}
378
379boost::future<unique_ptr<DownloadJob>> OnedriveProvider::download(string const& item_id,
380 string const& /*match_etag*/,
381 Context const& ctx) {
382 auto client = assign_client(ctx, JobMode::Download);
383 return make_ready_future(unique_ptr<DownloadJob>(new OnedriveDownloadJob(make_job_id(), item_id, client)));
384}
385
386boost::future<void> OnedriveProvider::delete_item(string const& item_id,
387 Context const& ctx) {
388 return boost::async([=]() {
389 try {
390 auto client = assign_client(ctx);
391 client->delete_item(item_id);
392 } catch (NonExistentException& e) {
393 throw boost::enable_current_exception(
394 NotExistsException(string("OnedriveProvider::delete_item() failed: ") + e.what(), item_id));
395 } catch (runtime_error& e) {
396 throw boost::enable_current_exception(
397 RemoteCommsException(string("OnedriveProvider::delete_item() failed: ") + e.what()));
398 }
399 });
400}
401
402boost::future<Item> OnedriveProvider::move(string const& item_id,
403 string const& new_parent_id,
404 string const& new_name,
405 vector<string> const& keys,
406 Context const& ctx) {
407 return boost::async([=]() {
408 try {
409 auto client = assign_client(ctx);
410 auto move_item = client->move_item(item_id, new_parent_id, new_name);
411 return content_to_item(move_item, keys);
412 } catch (NonExistentException& e) {
413 throw boost::enable_current_exception(
414 NotExistsException(string("OnedriveProvider::move() content or folder not exist: ") + e.what(), new_parent_id));
415 } catch (ItemExistentException& e) {
416 throw boost::enable_current_exception(
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: