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

Proposed by Gary.Wang
Reviewer Review Type Date Requested Status
onedrive-team Pending

### Commit message

First release of storage provider onedrive.

### Description of the change

First release of storage provider onedrive.

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
 1 === added directory '.bzr-builddeb' 2 === added file '.bzr-builddeb/default.conf' 3 --- .bzr-builddeb/default.conf 1970-01-01 00:00:00 +0000 4 +++ .bzr-builddeb/default.conf 2017-01-03 04:38:36 +0000 5 @@ -0,0 +1,2 @@ 6 +[BUILDDEB] 7 +split = True 8 9 === modified file 'CMakeLists.txt' 10 --- CMakeLists.txt 2016-09-26 04:27:03 +0000 11 +++ CMakeLists.txt 2017-01-03 04:38:36 +0000 12 @@ -16,19 +16,13 @@ 13 14 cmake_minimum_required(VERSION 2.8) 15 16 -project(onedrive) 17 +project(storage-onedrive-provider) 18 19 include(GNUInstallDirs) 20 21 find_package(Threads) 22 23 -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wall -pedantic -Wextra -fvisibility=hidden") 24 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Werror -Wall -fno-strict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -pedantic -Wextra") 25 -set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined") 26 - 27 -set(ONEDRIVE_LIB_VERSION_MAJOR 0) 28 -set(ONEDRIVE_LIB_VERSION_MINOR 0) 29 -set(ONEDRIVE_LIB_VERSION_PATCH 1) 30 31 include(CTest) 32 33 @@ -36,20 +30,18 @@ 34 include/ 35 ) 36 37 -file(GLOB_RECURSE ONEDRIVE_LIB_INTERFACE_HEADERS include/*.h) 38 - 39 -include(EnableCoverageReport) 40 - 41 -add_subdirectory(doc) 42 -add_subdirectory(data) 43 -add_subdirectory(include) 44 +file(GLOB_RECURSE ONEDRIVE_PROVIDER_LIB_INTERFACE_HEADERS include/*.h) 45 + 46 +find_package(CoverageReport) 47 + 48 add_subdirectory(src) 49 add_subdirectory(tests) 50 add_subdirectory(provider) 51 52 enable_coverage_report( 53 TARGETS 54 - onedrive 55 + onedrive-provider-lib 56 + onedrive-provider-bin 57 FILTER 58${CMAKE_SOURCE_DIR}/test/* 59 ${CMAKE_BINARY_DIR}/* 60 61 === added file 'COPYING.GPL' 62 --- COPYING.GPL 1970-01-01 00:00:00 +0000 63 +++ COPYING.GPL 2017-01-03 04:38:36 +0000 64 @@ -0,0 +1,674 @@ 65 + GNU GENERAL PUBLIC LICENSE 66 + Version 3, 29 June 2007 67 + 68 + Copyright (C) 2007 Free Software Foundation, Inc. 69 + Everyone is permitted to copy and distribute verbatim copies 70 + of this license document, but changing it is not allowed. 71 + 72 + Preamble 73 + 74 + The GNU General Public License is a free, copyleft license for 75 +software and other kinds of works. 76 + 77 + The licenses for most software and other practical works are designed 78 +to take away your freedom to share and change the works. By contrast, 79 +the GNU General Public License is intended to guarantee your freedom to 80 +share and change all versions of a program--to make sure it remains free 81 +software for all its users. We, the Free Software Foundation, use the 82 +GNU General Public License for most of our software; it applies also to 83 +any other work released this way by its authors. You can apply it to 84 +your programs, too. 85 + 86 + When we speak of free software, we are referring to freedom, not 87 +price. Our General Public Licenses are designed to make sure that you 88 +have the freedom to distribute copies of free software (and charge for 89 +them if you wish), that you receive source code or can get it if you 90 +want it, that you can change the software or use pieces of it in new 91 +free programs, and that you know you can do these things. 92 + 93 + To protect your rights, we need to prevent others from denying you 94 +these rights or asking you to surrender the rights. Therefore, you have 95 +certain responsibilities if you distribute copies of the software, or if 96 +you modify it: responsibilities to respect the freedom of others. 97 + 98 + For example, if you distribute copies of such a program, whether 99 +gratis or for a fee, you must pass on to the recipients the same 100 +freedoms that you received. You must make sure that they, too, receive 101 +or can get the source code. And you must show them these terms so they 102 +know their rights. 103 + 104 + Developers that use the GNU GPL protect your rights with two steps: 105 +(1) assert copyright on the software, and (2) offer you this License 106 +giving you legal permission to copy, distribute and/or modify it. 107 + 108 + For the developers' and authors' protection, the GPL clearly explains 109 +that there is no warranty for this free software. For both users' and 110 +authors' sake, the GPL requires that modified versions be marked as 111 +changed, so that their problems will not be attributed erroneously to 112 +authors of previous versions. 113 + 114 + Some devices are designed to deny users access to install or run 115 +modified versions of the software inside them, although the manufacturer 116 +can do so. This is fundamentally incompatible with the aim of 117 +protecting users' freedom to change the software. The systematic 118 +pattern of such abuse occurs in the area of products for individuals to 119 +use, which is precisely where it is most unacceptable. Therefore, we 120 +have designed this version of the GPL to prohibit the practice for those 121 +products. If such problems arise substantially in other domains, we 122 +stand ready to extend this provision to those domains in future versions 123 +of the GPL, as needed to protect the freedom of users. 124 + 125 + Finally, every program is threatened constantly by software patents. 126 +States should not allow patents to restrict development and use of 127 +software on general-purpose computers, but in those that do, we wish to 128 +avoid the special danger that patents applied to a free program could 129 +make it effectively proprietary. To prevent this, the GPL assures that 130 +patents cannot be used to render the program non-free. 131 + 132 + The precise terms and conditions for copying, distribution and 133 +modification follow. 134 + 135 + TERMS AND CONDITIONS 136 + 137 + 0. Definitions. 138 + 139 + "This License" refers to version 3 of the GNU General Public License. 140 + 141 + "Copyright" also means copyright-like laws that apply to other kinds of 142 +works, such as semiconductor masks. 143 + 144 + "The Program" refers to any copyrightable work licensed under this 145 +License. Each licensee is addressed as "you". "Licensees" and 146 +"recipients" may be individuals or organizations. 147 + 148 + To "modify" a work means to copy from or adapt all or part of the work 149 +in a fashion requiring copyright permission, other than the making of an 150 +exact copy. The resulting work is called a "modified version" of the 151 +earlier work or a work "based on" the earlier work. 152 + 153 + A "covered work" means either the unmodified Program or a work based 154 +on the Program. 155 + 156 + To "propagate" a work means to do anything with it that, without 157 +permission, would make you directly or secondarily liable for 158 +infringement under applicable copyright law, except executing it on a 159 +computer or modifying a private copy. Propagation includes copying, 160 +distribution (with or without modification), making available to the 161 +public, and in some countries other activities as well. 162 + 163 + To "convey" a work means any kind of propagation that enables other 164 +parties to make or receive copies. Mere interaction with a user through 165 +a computer network, with no transfer of a copy, is not conveying. 166 + 167 + An interactive user interface displays "Appropriate Legal Notices" 168 +to the extent that it includes a convenient and prominently visible 169 +feature that (1) displays an appropriate copyright notice, and (2) 170 +tells the user that there is no warranty for the work (except to the 171 +extent that warranties are provided), that licensees may convey the 172 +work under this License, and how to view a copy of this License. If 173 +the interface presents a list of user commands or options, such as a 174 +menu, a prominent item in the list meets this criterion. 175 + 176 + 1. Source Code. 177 + 178 + The "source code" for a work means the preferred form of the work 179 +for making modifications to it. "Object code" means any non-source 180 +form of a work. 181 + 182 + A "Standard Interface" means an interface that either is an official 183 +standard defined by a recognized standards body, or, in the case of 184 +interfaces specified for a particular programming language, one that 185 +is widely used among developers working in that language. 186 + 187 + The "System Libraries" of an executable work include anything, other 188 +than the work as a whole, that (a) is included in the normal form of 189 +packaging a Major Component, but which is not part of that Major 190 +Component, and (b) serves only to enable use of the work with that 191 +Major Component, or to implement a Standard Interface for which an 192 +implementation is available to the public in source code form. A 193 +"Major Component", in this context, means a major essential component 194 +(kernel, window system, and so on) of the specific operating system 195 +(if any) on which the executable work runs, or a compiler used to 196 +produce the work, or an object code interpreter used to run it. 197 + 198 + The "Corresponding Source" for a work in object code form means all 199 +the source code needed to generate, install, and (for an executable 200 +work) run the object code and to modify the work, including scripts to 201 +control those activities. However, it does not include the work's 202 +System Libraries, or general-purpose tools or generally available free 203 +programs which are used unmodified in performing those activities but 204 +which are not part of the work. For example, Corresponding Source 205 +includes interface definition files associated with source files for 206 +the work, and the source code for shared libraries and dynamically 207 +linked subprograms that the work is specifically designed to require, 208 +such as by intimate data communication or control flow between those 209 +subprograms and other parts of the work. 210 + 211 + The Corresponding Source need not include anything that users 212 +can regenerate automatically from other parts of the Corresponding 213 +Source. 214 + 215 + The Corresponding Source for a work in source code form is that 216 +same work. 217 + 218 + 2. Basic Permissions. 219 + 220 + All rights granted under this License are granted for the term of 221 +copyright on the Program, and are irrevocable provided the stated 222 +conditions are met. This License explicitly affirms your unlimited 223 +permission to run the unmodified Program. The output from running a 224 +covered work is covered by this License only if the output, given its 225 +content, constitutes a covered work. This License acknowledges your 226 +rights of fair use or other equivalent, as provided by copyright law. 227 + 228 + You may make, run and propagate covered works that you do not 229 +convey, without conditions so long as your license otherwise remains 230 +in force. You may convey covered works to others for the sole purpose 231 +of having them make modifications exclusively for you, or provide you 232 +with facilities for running those works, provided that you comply with 233 +the terms of this License in conveying all material for which you do 234 +not control copyright. Those thus making or running the covered works 235 +for you must do so exclusively on your behalf, under your direction 236 +and control, on terms that prohibit them from making any copies of 237 +your copyrighted material outside their relationship with you. 238 + 239 + Conveying under any other circumstances is permitted solely under 240 +the conditions stated below. Sublicensing is not allowed; section 10 241 +makes it unnecessary. 242 + 243 + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 244 + 245 + No covered work shall be deemed part of an effective technological 246 +measure under any applicable law fulfilling obligations under article 247 +11 of the WIPO copyright treaty adopted on 20 December 1996, or 248 +similar laws prohibiting or restricting circumvention of such 249 +measures. 250 + 251 + When you convey a covered work, you waive any legal power to forbid 252 +circumvention of technological measures to the extent such circumvention 253 +is effected by exercising rights under this License with respect to 254 +the covered work, and you disclaim any intention to limit operation or 255 +modification of the work as a means of enforcing, against the work's 256 +users, your or third parties' legal rights to forbid circumvention of 257 +technological measures. 258 + 259 + 4. Conveying Verbatim Copies. 260 + 261 + You may convey verbatim copies of the Program's source code as you 262 +receive it, in any medium, provided that you conspicuously and 263 +appropriately publish on each copy an appropriate copyright notice; 264 +keep intact all notices stating that this License and any 265 +non-permissive terms added in accord with section 7 apply to the code; 266 +keep intact all notices of the absence of any warranty; and give all 267 +recipients a copy of this License along with the Program. 268 + 269 + You may charge any price or no price for each copy that you convey, 270 +and you may offer support or warranty protection for a fee. 271 + 272 + 5. Conveying Modified Source Versions. 273 + 274 + You may convey a work based on the Program, or the modifications to 275 +produce it from the Program, in the form of source code under the 276 +terms of section 4, provided that you also meet all of these conditions: 277 + 278 + a) The work must carry prominent notices stating that you modified 279 + it, and giving a relevant date. 280 + 281 + b) The work must carry prominent notices stating that it is 282 + released under this License and any conditions added under section 283 + 7. This requirement modifies the requirement in section 4 to 284 + "keep intact all notices". 285 + 286 + c) You must license the entire work, as a whole, under this 287 + License to anyone who comes into possession of a copy. This 288 + License will therefore apply, along with any applicable section 7 289 + additional terms, to the whole of the work, and all its parts, 290 + regardless of how they are packaged. This License gives no 291 + permission to license the work in any other way, but it does not 292 + invalidate such permission if you have separately received it. 293 + 294 + d) If the work has interactive user interfaces, each must display 295 + Appropriate Legal Notices; however, if the Program has interactive 296 + interfaces that do not display Appropriate Legal Notices, your 297 + work need not make them do so. 298 + 299 + A compilation of a covered work with other separate and independent 300 +works, which are not by their nature extensions of the covered work, 301 +and which are not combined with it such as to form a larger program, 302 +in or on a volume of a storage or distribution medium, is called an 303 +"aggregate" if the compilation and its resulting copyright are not 304 +used to limit the access or legal rights of the compilation's users 305 +beyond what the individual works permit. Inclusion of a covered work 306 +in an aggregate does not cause this License to apply to the other 307 +parts of the aggregate. 308 + 309 + 6. Conveying Non-Source Forms. 310 + 311 + You may convey a covered work in object code form under the terms 312 +of sections 4 and 5, provided that you also convey the 313 +machine-readable Corresponding Source under the terms of this License, 314 +in one of these ways: 315 + 316 + a) Convey the object code in, or embodied in, a physical product 317 + (including a physical distribution medium), accompanied by the 318 + Corresponding Source fixed on a durable physical medium 319 + customarily used for software interchange. 320 + 321 + b) Convey the object code in, or embodied in, a physical product 322 + (including a physical distribution medium), accompanied by a 323 + written offer, valid for at least three years and valid for as 324 + long as you offer spare parts or customer support for that product 325 + model, to give anyone who possesses the object code either (1) a 326 + copy of the Corresponding Source for all the software in the 327 + product that is covered by this License, on a durable physical 328 + medium customarily used for software interchange, for a price no 329 + more than your reasonable cost of physically performing this 330 + conveying of source, or (2) access to copy the 331 + Corresponding Source from a network server at no charge. 332 + 333 + c) Convey individual copies of the object code with a copy of the 334 + written offer to provide the Corresponding Source. This 335 + alternative is allowed only occasionally and noncommercially, and 336 + only if you received the object code with such an offer, in accord 337 + with subsection 6b. 338 + 339 + d) Convey the object code by offering access from a designated 340 + place (gratis or for a charge), and offer equivalent access to the 341 + Corresponding Source in the same way through the same place at no 342 + further charge. You need not require recipients to copy the 343 + Corresponding Source along with the object code. If the place to 344 + copy the object code is a network server, the Corresponding Source 345 + may be on a different server (operated by you or a third party) 346 + that supports equivalent copying facilities, provided you maintain 347 + clear directions next to the object code saying where to find the 348 + Corresponding Source. Regardless of what server hosts the 349 + Corresponding Source, you remain obligated to ensure that it is 350 + available for as long as needed to satisfy these requirements. 351 + 352 + e) Convey the object code using peer-to-peer transmission, provided 353 + you inform other peers where the object code and Corresponding 354 + Source of the work are being offered to the general public at no 355 + charge under subsection 6d. 356 + 357 + A separable portion of the object code, whose source code is excluded 358 +from the Corresponding Source as a System Library, need not be 359 +included in conveying the object code work. 360 + 361 + A "User Product" is either (1) a "consumer product", which means any 362 +tangible personal property which is normally used for personal, family, 363 +or household purposes, or (2) anything designed or sold for incorporation 364 +into a dwelling. In determining whether a product is a consumer product, 365 +doubtful cases shall be resolved in favor of coverage. For a particular 366 +product received by a particular user, "normally used" refers to a 367 +typical or common use of that class of product, regardless of the status 368 +of the particular user or of the way in which the particular user 369 +actually uses, or expects or is expected to use, the product. A product 370 +is a consumer product regardless of whether the product has substantial 371 +commercial, industrial or non-consumer uses, unless such uses represent 372 +the only significant mode of use of the product. 373 + 374 + "Installation Information" for a User Product means any methods, 375 +procedures, authorization keys, or other information required to install 376 +and execute modified versions of a covered work in that User Product from 377 +a modified version of its Corresponding Source. The information must 378 +suffice to ensure that the continued functioning of the modified object 379 +code is in no case prevented or interfered with solely because 380 +modification has been made. 381 + 382 + If you convey an object code work under this section in, or with, or 383 +specifically for use in, a User Product, and the conveying occurs as 384 +part of a transaction in which the right of possession and use of the 385 +User Product is transferred to the recipient in perpetuity or for a 386 +fixed term (regardless of how the transaction is characterized), the 387 +Corresponding Source conveyed under this section must be accompanied 388 +by the Installation Information. But this requirement does not apply 389 +if neither you nor any third party retains the ability to install 390 +modified object code on the User Product (for example, the work has 391 +been installed in ROM). 392 + 393 + The requirement to provide Installation Information does not include a 394 +requirement to continue to provide support service, warranty, or updates 395 +for a work that has been modified or installed by the recipient, or for 396 +the User Product in which it has been modified or installed. Access to a 397 +network may be denied when the modification itself materially and 398 +adversely affects the operation of the network or violates the rules and 399 +protocols for communication across the network. 400 + 401 + Corresponding Source conveyed, and Installation Information provided, 402 +in accord with this section must be in a format that is publicly 403 +documented (and with an implementation available to the public in 404 +source code form), and must require no special password or key for 405 +unpacking, reading or copying. 406 + 407 + 7. Additional Terms. 408 + 409 + "Additional permissions" are terms that supplement the terms of this 410 +License by making exceptions from one or more of its conditions. 411 +Additional permissions that are applicable to the entire Program shall 412 +be treated as though they were included in this License, to the extent 413 +that they are valid under applicable law. If additional permissions 414 +apply only to part of the Program, that part may be used separately 415 +under those permissions, but the entire Program remains governed by 416 +this License without regard to the additional permissions. 417 + 418 + When you convey a copy of a covered work, you may at your option 419 +remove any additional permissions from that copy, or from any part of 420 +it. (Additional permissions may be written to require their own 421 +removal in certain cases when you modify the work.) You may place 422 +additional permissions on material, added by you to a covered work, 423 +for which you have or can give appropriate copyright permission. 424 + 425 + Notwithstanding any other provision of this License, for material you 426 +add to a covered work, you may (if authorized by the copyright holders of 427 +that material) supplement the terms of this License with terms: 428 + 429 + a) Disclaiming warranty or limiting liability differently from the 430 + terms of sections 15 and 16 of this License; or 431 + 432 + b) Requiring preservation of specified reasonable legal notices or 433 + author attributions in that material or in the Appropriate Legal 434 + Notices displayed by works containing it; or 435 + 436 + c) Prohibiting misrepresentation of the origin of that material, or 437 + requiring that modified versions of such material be marked in 438 + reasonable ways as different from the original version; or 439 + 440 + d) Limiting the use for publicity purposes of names of licensors or 441 + authors of the material; or 442 + 443 + e) Declining to grant rights under trademark law for use of some 444 + trade names, trademarks, or service marks; or 445 + 446 + f) Requiring indemnification of licensors and authors of that 447 + material by anyone who conveys the material (or modified versions of 448 + it) with contractual assumptions of liability to the recipient, for 449 + any liability that these contractual assumptions directly impose on 450 + those licensors and authors. 451 + 452 + All other non-permissive additional terms are considered "further 453 +restrictions" within the meaning of section 10. If the Program as you 454 +received it, or any part of it, contains a notice stating that it is 455 +governed by this License along with a term that is a further 456 +restriction, you may remove that term. If a license document contains 457 +a further restriction but permits relicensing or conveying under this 458 +License, you may add to a covered work material governed by the terms 459 +of that license document, provided that the further restriction does 460 +not survive such relicensing or conveying. 461 + 462 + If you add terms to a covered work in accord with this section, you 463 +must place, in the relevant source files, a statement of the 464 +additional terms that apply to those files, or a notice indicating 465 +where to find the applicable terms. 466 + 467 + Additional terms, permissive or non-permissive, may be stated in the 468 +form of a separately written license, or stated as exceptions; 469 +the above requirements apply either way. 470 + 471 + 8. Termination. 472 + 473 + You may not propagate or modify a covered work except as expressly 474 +provided under this License. Any attempt otherwise to propagate or 475 +modify it is void, and will automatically terminate your rights under 476 +this License (including any patent licenses granted under the third 477 +paragraph of section 11). 478 + 479 + However, if you cease all violation of this License, then your 480 +license from a particular copyright holder is reinstated (a) 481 +provisionally, unless and until the copyright holder explicitly and 482 +finally terminates your license, and (b) permanently, if the copyright 483 +holder fails to notify you of the violation by some reasonable means 484 +prior to 60 days after the cessation. 485 + 486 + Moreover, your license from a particular copyright holder is 487 +reinstated permanently if the copyright holder notifies you of the 488 +violation by some reasonable means, this is the first time you have 489 +received notice of violation of this License (for any work) from that 490 +copyright holder, and you cure the violation prior to 30 days after 491 +your receipt of the notice. 492 + 493 + Termination of your rights under this section does not terminate the 494 +licenses of parties who have received copies or rights from you under 495 +this License. If your rights have been terminated and not permanently 496 +reinstated, you do not qualify to receive new licenses for the same 497 +material under section 10. 498 + 499 + 9. Acceptance Not Required for Having Copies. 500 + 501 + You are not required to accept this License in order to receive or 502 +run a copy of the Program. Ancillary propagation of a covered work 503 +occurring solely as a consequence of using peer-to-peer transmission 504 +to receive a copy likewise does not require acceptance. However, 505 +nothing other than this License grants you permission to propagate or 506 +modify any covered work. These actions infringe copyright if you do 507 +not accept this License. Therefore, by modifying or propagating a 508 +covered work, you indicate your acceptance of this License to do so. 509 + 510 + 10. Automatic Licensing of Downstream Recipients. 511 + 512 + Each time you convey a covered work, the recipient automatically 513 +receives a license from the original licensors, to run, modify and 514 +propagate that work, subject to this License. You are not responsible 515 +for enforcing compliance by third parties with this License. 516 + 517 + An "entity transaction" is a transaction transferring control of an 518 +organization, or substantially all assets of one, or subdividing an 519 +organization, or merging organizations. If propagation of a covered 520 +work results from an entity transaction, each party to that 521 +transaction who receives a copy of the work also receives whatever 522 +licenses to the work the party's predecessor in interest had or could 523 +give under the previous paragraph, plus a right to possession of the 524 +Corresponding Source of the work from the predecessor in interest, if 525 +the predecessor has it or can get it with reasonable efforts. 526 + 527 + You may not impose any further restrictions on the exercise of the 528 +rights granted or affirmed under this License. For example, you may 529 +not impose a license fee, royalty, or other charge for exercise of 530 +rights granted under this License, and you may not initiate litigation 531 +(including a cross-claim or counterclaim in a lawsuit) alleging that 532 +any patent claim is infringed by making, using, selling, offering for 533 +sale, or importing the Program or any portion of it. 534 + 535 + 11. Patents. 536 + 537 + A "contributor" is a copyright holder who authorizes use under this 538 +License of the Program or a work on which the Program is based. The 539 +work thus licensed is called the contributor's "contributor version". 540 + 541 + A contributor's "essential patent claims" are all patent claims 542 +owned or controlled by the contributor, whether already acquired or 543 +hereafter acquired, that would be infringed by some manner, permitted 544 +by this License, of making, using, or selling its contributor version, 545 +but do not include claims that would be infringed only as a 546 +consequence of further modification of the contributor version. For 547 +purposes of this definition, "control" includes the right to grant 548 +patent sublicenses in a manner consistent with the requirements of 549 +this License. 550 + 551 + Each contributor grants you a non-exclusive, worldwide, royalty-free 552 +patent license under the contributor's essential patent claims, to 553 +make, use, sell, offer for sale, import and otherwise run, modify and 554 +propagate the contents of its contributor version. 555 + 556 + In the following three paragraphs, a "patent license" is any express 557 +agreement or commitment, however denominated, not to enforce a patent 558 +(such as an express permission to practice a patent or covenant not to 559 +sue for patent infringement). To "grant" such a patent license to a 560 +party means to make such an agreement or commitment not to enforce a 561 +patent against the party. 562 + 563 + If you convey a covered work, knowingly relying on a patent license, 564 +and the Corresponding Source of the work is not available for anyone 565 +to copy, free of charge and under the terms of this License, through a 566 +publicly available network server or other readily accessible means, 567 +then you must either (1) cause the Corresponding Source to be so 568 +available, or (2) arrange to deprive yourself of the benefit of the 569 +patent license for this particular work, or (3) arrange, in a manner 570 +consistent with the requirements of this License, to extend the patent 571 +license to downstream recipients. "Knowingly relying" means you have 572 +actual knowledge that, but for the patent license, your conveying the 573 +covered work in a country, or your recipient's use of the covered work 574 +in a country, would infringe one or more identifiable patents in that 575 +country that you have reason to believe are valid. 576 + 577 + If, pursuant to or in connection with a single transaction or 578 +arrangement, you convey, or propagate by procuring conveyance of, a 579 +covered work, and grant a patent license to some of the parties 580 +receiving the covered work authorizing them to use, propagate, modify 581 +or convey a specific copy of the covered work, then the patent license 582 +you grant is automatically extended to all recipients of the covered 583 +work and works based on it. 584 + 585 + A patent license is "discriminatory" if it does not include within 586 +the scope of its coverage, prohibits the exercise of, or is 587 +conditioned on the non-exercise of one or more of the rights that are 588 +specifically granted under this License. You may not convey a covered 589 +work if you are a party to an arrangement with a third party that is 590 +in the business of distributing software, under which you make payment 591 +to the third party based on the extent of your activity of conveying 592 +the work, and under which the third party grants, to any of the 593 +parties who would receive the covered work from you, a discriminatory 594 +patent license (a) in connection with copies of the covered work 595 +conveyed by you (or copies made from those copies), or (b) primarily 596 +for and in connection with specific products or compilations that 597 +contain the covered work, unless you entered into that arrangement, 598 +or that patent license was granted, prior to 28 March 2007. 599 + 600 + Nothing in this License shall be construed as excluding or limiting 601 +any implied license or other defenses to infringement that may 602 +otherwise be available to you under applicable patent law. 603 + 604 + 12. No Surrender of Others' Freedom. 605 + 606 + If conditions are imposed on you (whether by court order, agreement or 607 +otherwise) that contradict the conditions of this License, they do not 608 +excuse you from the conditions of this License. If you cannot convey a 609 +covered work so as to satisfy simultaneously your obligations under this 610 +License and any other pertinent obligations, then as a consequence you may 611 +not convey it at all. For example, if you agree to terms that obligate you 612 +to collect a royalty for further conveying from those to whom you convey 613 +the Program, the only way you could satisfy both those terms and this 614 +License would be to refrain entirely from conveying the Program. 615 + 616 + 13. Use with the GNU Affero General Public License. 617 + 618 + Notwithstanding any other provision of this License, you have 619 +permission to link or combine any covered work with a work licensed 620 +under version 3 of the GNU Affero General Public License into a single 621 +combined work, and to convey the resulting work. The terms of this 622 +License will continue to apply to the part which is the covered work, 623 +but the special requirements of the GNU Affero General Public License, 624 +section 13, concerning interaction through a network will apply to the 625 +combination as such. 626 + 627 + 14. Revised Versions of this License. 628 + 629 + The Free Software Foundation may publish revised and/or new versions of 630 +the GNU General Public License from time to time. Such new versions will 631 +be similar in spirit to the present version, but may differ in detail to 632 +address new problems or concerns. 633 + 634 + Each version is given a distinguishing version number. If the 635 +Program specifies that a certain numbered version of the GNU General 636 +Public License "or any later version" applies to it, you have the 637 +option of following the terms and conditions either of that numbered 638 +version or of any later version published by the Free Software 639 +Foundation. If the Program does not specify a version number of the 640 +GNU General Public License, you may choose any version ever published 641 +by the Free Software Foundation. 642 + 643 + If the Program specifies that a proxy can decide which future 644 +versions of the GNU General Public License can be used, that proxy's 645 +public statement of acceptance of a version permanently authorizes you 646 +to choose that version for the Program. 647 + 648 + Later license versions may give you additional or different 649 +permissions. However, no additional obligations are imposed on any 650 +author or copyright holder as a result of your choosing to follow a 651 +later version. 652 + 653 + 15. Disclaimer of Warranty. 654 + 655 + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 656 +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 657 +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 658 +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 659 +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 660 +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 661 +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 662 +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 663 + 664 + 16. Limitation of Liability. 665 + 666 + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 667 +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 668 +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 669 +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 670 +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 671 +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 672 +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 673 +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 674 +SUCH DAMAGES. 675 + 676 + 17. Interpretation of Sections 15 and 16. 677 + 678 + If the disclaimer of warranty and limitation of liability provided 679 +above cannot be given local legal effect according to their terms, 680 +reviewing courts shall apply local law that most closely approximates 681 +an absolute waiver of all civil liability in connection with the 682 +Program, unless a warranty or assumption of liability accompanies a 683 +copy of the Program in return for a fee. 684 + 685 + END OF TERMS AND CONDITIONS 686 + 687 + How to Apply These Terms to Your New Programs 688 + 689 + If you develop a new program, and you want it to be of the greatest 690 +possible use to the public, the best way to achieve this is to make it 691 +free software which everyone can redistribute and change under these terms. 692 + 693 + To do so, attach the following notices to the program. It is safest 694 +to attach them to the start of each source file to most effectively 695 +state the exclusion of warranty; and each file should have at least 696 +the "copyright" line and a pointer to where the full notice is found. 697 + 698 + 699 + Copyright (C) 700 + 701 + This program is free software: you can redistribute it and/or modify 702 + it under the terms of the GNU General Public License as published by 703 + the Free Software Foundation, either version 3 of the License, or 704 + (at your option) any later version. 705 + 706 + This program is distributed in the hope that it will be useful, 707 + but WITHOUT ANY WARRANTY; without even the implied warranty of 708 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 709 + GNU General Public License for more details. 710 + 711 + You should have received a copy of the GNU General Public License 712 + along with this program. If not, see . 713 + 714 +Also add information on how to contact you by electronic and paper mail. 715 + 716 + If the program does terminal interaction, make it output a short 717 +notice like this when it starts in an interactive mode: 718 + 719 + Copyright (C) 720 + This program comes with ABSOLUTELY NO WARRANTY; for details type show w'. 721 + This is free software, and you are welcome to redistribute it 722 + under certain conditions; type show c' for details. 723 + 724 +The hypothetical commands show w' and show c' should show the appropriate 725 +parts of the General Public License. Of course, your program's commands 726 +might be different; for a GUI interface, you would use an "about box". 727 + 728 + You should also get your employer (if you work as a programmer) or school, 729 +if any, to sign a "copyright disclaimer" for the program, if necessary. 730 +For more information on this, and how to apply and follow the GNU GPL, see 731 +. 732 + 733 + The GNU General Public License does not permit incorporating your program 734 +into proprietary programs. If your program is a subroutine library, you 735 +may consider it more useful to permit linking proprietary applications with 736 +the library. If this is what you want to do, use the GNU Lesser General 737 +Public License instead of this License. But first, please read 738 +. 739 740 === added file 'COPYING.LGPL' 741 --- COPYING.LGPL 1970-01-01 00:00:00 +0000 742 +++ COPYING.LGPL 2017-01-03 04:38:36 +0000 743 @@ -0,0 +1,165 @@ 744 + GNU LESSER GENERAL PUBLIC LICENSE 745 + Version 3, 29 June 2007 746 + 747 + Copyright (C) 2007 Free Software Foundation, Inc. 748 + Everyone is permitted to copy and distribute verbatim copies 749 + of this license document, but changing it is not allowed. 750 + 751 + 752 + This version of the GNU Lesser General Public License incorporates 753 +the terms and conditions of version 3 of the GNU General Public 754 +License, supplemented by the additional permissions listed below. 755 + 756 + 0. Additional Definitions. 757 + 758 + As used herein, "this License" refers to version 3 of the GNU Lesser 759 +General Public License, and the "GNU GPL" refers to version 3 of the GNU 760 +General Public License. 761 + 762 + "The Library" refers to a covered work governed by this License, 763 +other than an Application or a Combined Work as defined below. 764 + 765 + An "Application" is any work that makes use of an interface provided 766 +by the Library, but which is not otherwise based on the Library. 767 +Defining a subclass of a class defined by the Library is deemed a mode 768 +of using an interface provided by the Library. 769 + 770 + A "Combined Work" is a work produced by combining or linking an 771 +Application with the Library. The particular version of the Library 772 +with which the Combined Work was made is also called the "Linked 773 +Version". 774 + 775 + The "Minimal Corresponding Source" for a Combined Work means the 776 +Corresponding Source for the Combined Work, excluding any source code 777 +for portions of the Combined Work that, considered in isolation, are 778 +based on the Application, and not on the Linked Version. 779 + 780 + The "Corresponding Application Code" for a Combined Work means the 781 +object code and/or source code for the Application, including any data 782 +and utility programs needed for reproducing the Combined Work from the 783 +Application, but excluding the System Libraries of the Combined Work. 784 + 785 + 1. Exception to Section 3 of the GNU GPL. 786 + 787 + You may convey a covered work under sections 3 and 4 of this License 788 +without being bound by section 3 of the GNU GPL. 789 + 790 + 2. Conveying Modified Versions. 791 + 792 + If you modify a copy of the Library, and, in your modifications, a 793 +facility refers to a function or data to be supplied by an Application 794 +that uses the facility (other than as an argument passed when the 795 +facility is invoked), then you may convey a copy of the modified 796 +version: 797 + 798 + a) under this License, provided that you make a good faith effort to 799 + ensure that, in the event an Application does not supply the 800 + function or data, the facility still operates, and performs 801 + whatever part of its purpose remains meaningful, or 802 + 803 + b) under the GNU GPL, with none of the additional permissions of 804 + this License applicable to that copy. 805 + 806 + 3. Object Code Incorporating Material from Library Header Files. 807 + 808 + The object code form of an Application may incorporate material from 809 +a header file that is part of the Library. You may convey such object 810 +code under terms of your choice, provided that, if the incorporated 811 +material is not limited to numerical parameters, data structure 812 +layouts and accessors, or small macros, inline functions and templates 813 +(ten or fewer lines in length), you do both of the following: 814 + 815 + a) Give prominent notice with each copy of the object code that the 816 + Library is used in it and that the Library and its use are 817 + covered by this License. 818 + 819 + b) Accompany the object code with a copy of the GNU GPL and this license 820 + document. 821 + 822 + 4. Combined Works. 823 + 824 + You may convey a Combined Work under terms of your choice that, 825 +taken together, effectively do not restrict modification of the 826 +portions of the Library contained in the Combined Work and reverse 827 +engineering for debugging such modifications, if you also do each of 828 +the following: 829 + 830 + a) Give prominent notice with each copy of the Combined Work that 831 + the Library is used in it and that the Library and its use are 832 + covered by this License. 833 + 834 + b) Accompany the Combined Work with a copy of the GNU GPL and this license 835 + document. 836 + 837 + c) For a Combined Work that displays copyright notices during 838 + execution, include the copyright notice for the Library among 839 + these notices, as well as a reference directing the user to the 840 + copies of the GNU GPL and this license document. 841 + 842 + d) Do one of the following: 843 + 844 + 0) Convey the Minimal Corresponding Source under the terms of this 845 + License, and the Corresponding Application Code in a form 846 + suitable for, and under terms that permit, the user to 847 + recombine or relink the Application with a modified version of 848 + the Linked Version to produce a modified Combined Work, in the 849 + manner specified by section 6 of the GNU GPL for conveying 850 + Corresponding Source. 851 + 852 + 1) Use a suitable shared library mechanism for linking with the 853 + Library. A suitable mechanism is one that (a) uses at run time 854 + a copy of the Library already present on the user's computer 855 + system, and (b) will operate properly with a modified version 856 + of the Library that is interface-compatible with the Linked 857 + Version. 858 + 859 + e) Provide Installation Information, but only if you would otherwise 860 + be required to provide such information under section 6 of the 861 + GNU GPL, and only to the extent that such information is 862 + necessary to install and execute a modified version of the 863 + Combined Work produced by recombining or relinking the 864 + Application with a modified version of the Linked Version. (If 865 + you use option 4d0, the Installation Information must accompany 866 + the Minimal Corresponding Source and Corresponding Application 867 + Code. If you use option 4d1, you must provide the Installation 868 + Information in the manner specified by section 6 of the GNU GPL 869 + for conveying Corresponding Source.) 870 + 871 + 5. Combined Libraries. 872 + 873 + You may place library facilities that are a work based on the 874 +Library side by side in a single library together with other library 875 +facilities that are not Applications and are not covered by this 876 +License, and convey such a combined library under terms of your 877 +choice, if you do both of the following: 878 + 879 + a) Accompany the combined library with a copy of the same work based 880 + on the Library, uncombined with any other library facilities, 881 + conveyed under the terms of this License. 882 + 883 + b) Give prominent notice with the combined library that part of it 884 + is a work based on the Library, and explaining where to find the 885 + accompanying uncombined form of the same work. 886 + 887 + 6. Revised Versions of the GNU Lesser General Public License. 888 + 889 + The Free Software Foundation may publish revised and/or new versions 890 +of the GNU Lesser General Public License from time to time. Such new 891 +versions will be similar in spirit to the present version, but may 892 +differ in detail to address new problems or concerns. 893 + 894 + Each version is given a distinguishing version number. If the 895 +Library as you received it specifies that a certain numbered version 896 +of the GNU Lesser General Public License "or any later version" 897 +applies to it, you have the option of following the terms and 898 +conditions either of that published version or of any later version 899 +published by the Free Software Foundation. If the Library as you 900 +received it does not specify a version number of the GNU Lesser 901 +General Public License, you may choose any version of the GNU Lesser 902 +General Public License ever published by the Free Software Foundation. 903 + 904 + If the Library as you received it specifies that a proxy can decide 905 +whether future versions of the GNU Lesser General Public License shall 906 +apply, that proxy's public statement of acceptance of any version is 907 +permanent authorization for you to choose that version for the 908 +Library. 909 910 === removed directory 'data' 911 === removed file 'data/CMakeLists.txt' 912 --- data/CMakeLists.txt 2016-09-26 04:27:03 +0000 913 +++ data/CMakeLists.txt 1970-01-01 00:00:00 +0000 914 @@ -1,24 +0,0 @@ 915 -# Copyright © 2016 Canonical Ltd. 916 -# 917 -# This program is free software: you can redistribute it and/or modify 918 -# it under the terms of the GNU General Public License version 3 as 919 -# published by the Free Software Foundation. 920 -# 921 -# This program is distributed in the hope that it will be useful, 922 -# but WITHOUT ANY WARRANTY; without even the implied warranty of 923 -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 924 -# GNU General Public License for more details. 925 -# 926 -# You should have received a copy of the GNU General Public License 927 -# along with this program. If not, see . 928 -# 929 -# Authored by: Gary Wang 930 - 931 -configure_file( 932 - onedrive.pc.in onedrive.pc @ONLY 933 -) 934 - 935 -install( 936 - FILES${CMAKE_CURRENT_BINARY_DIR}/onedrive.pc 937 - DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig 938 -) 939 940 === removed file 'data/onedrive.pc.in' 941 --- data/onedrive.pc.in 2016-09-26 04:27:03 +0000 942 +++ data/onedrive.pc.in 1970-01-01 00:00:00 +0000 943 @@ -1,10 +0,0 @@ 944 -prefix=@CMAKE_INSTALL_PREFIX@ 945 -exec_prefix=${prefix} 946 -libdir=${exec_prefix}/lib 947 -includedir=${exec_prefix}/include 948 - 949 -Name: @CMAKE_PROJECT_NAME@ 950 -Description: Cloud based content sharing library for Microsoft Onedrive service 951 -Version: @ONEDRIVE_LIB_VERSION_MAJOR@.@ONEDRIVE_LIB_VERSION_MINOR@.@ONEDRIVE_LIB_VERSION_PATCH@ 952 -Libs: -L${libdir} -lonedrive 953 -Cflags: -I${includedir} 954 955 === modified file 'debian/control' 956 --- debian/control 2016-12-07 02:13:37 +0000 957 +++ debian/control 2017-01-03 04:38:36 +0000 958 @@ -2,7 +2,7 @@ 959 Priority: optional 960 Maintainer: Gary Wang 961 Build-Depends: cmake, 962 - cmake-extras (>= 0.4), 963 + cmake-extras (>= 0.10), 964 debhelper (>= 9), 965 doxygen, 966 google-mock, 967 968 === modified file 'debian/copyright' 969 --- debian/copyright 2016-09-26 04:27:03 +0000 970 +++ debian/copyright 2017-01-03 04:38:36 +0000 971 @@ -1,22 +1,36 @@ 972 Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 973 -Upstream-Name: onedrive 974 -Source: https://launchpad.net/onedrive 975 +Upstream-Name: storage-provider-webdav 976 +Source: https://launchpad.net/storage-provider-webdav 977 978 Files: * 979 -Copyright: Copyright (C) 2016 Canonical, Ltd. 980 -License: LGPL-3.0 981 - This package is free software; you can redistribute it and/or 982 - modify it under the terms of the GNU Lesser General Public 983 - License as published by the Free Software Foundation, version 3 of 984 - the License. 985 - . 986 - This package is distributed in the hope that it will be useful, 987 - but WITHOUT ANY WARRANTY; without even the implied warranty of 988 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 989 - Lesser General Public License for more details. 990 - . 991 - You should have received a copy of the GNU General Public License 992 - along with this program. If not, see . 993 - . 994 - On Debian systems, the complete text of the GNU Lesser General 995 - Public License can be found in /usr/share/common-licenses/LGPL-3. 996 +Copyright: 2016 Canonical Ltd. 997 +License: GPL-3 998 + This program is free software: you can redistribute it and/or modify 999 + it under the terms of the GNU General Public License version 3 as 1000 + published by the Free Software Foundation. 1001 + . 1002 + This program is distributed in the hope that it will be useful, 1003 + but WITHOUT ANY WARRANTY; without even the implied warranty of 1004 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1005 + GNU General Public License for more details. 1006 + . 1007 + On Debian/Ubuntu systems, the full text of the GPL v3 can be found in 1008 + /usr/share/common-licenses/GPL-3' 1009 + 1010 +Files: tests/unit/onedrive-provider/utils/DBusEnvironment.* 1011 + tests/unit/onedrive-provider/utils/ProviderEnvironment.* 1012 + tests/unit/onedrive-provider/utils/fake-onlye-accounts-daemon.py 1013 +Copyright: 2016 Canonical Ltd. 1014 +License: LGPL-3 1015 + This program is free software: you can redistribute it and/or modify 1016 + it under the terms of version 3 of the GNU Lesser General Public 1017 + License as published by the Free Software Foundation. 1018 + . 1019 + This program is distributed in the hope that it will be useful, 1020 + but WITHOUT ANY WARRANTY; without even the implied warranty of 1021 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1022 + GNU Lesser General Public License for more details. 1023 + . 1024 + On Debian systems, the full text of the GNU Lesser General Public 1025 + License version 3 can be found in the file 1026 + /usr/share/common-licenses/LGPL-3' 1027 1028 === removed file 'debian/libonedrive-dev.install' 1029 --- debian/libonedrive-dev.install 2016-09-26 04:27:03 +0000 1030 +++ debian/libonedrive-dev.install 1970-01-01 00:00:00 +0000 1031 @@ -1,3 +0,0 @@ 1032 -usr/include/onedrive/* 1033 -usr/lib/*/libonedrive.so 1034 -usr/lib/*/pkgconfig/* 1035 1036 === removed file 'debian/libonedrive-doc.install' 1037 --- debian/libonedrive-doc.install 2016-09-26 04:27:03 +0000 1038 +++ debian/libonedrive-doc.install 1970-01-01 00:00:00 +0000 1039 @@ -1,1 +0,0 @@ 1040 -usr/share/doc/onedrive/ 1041 1042 === removed file 'debian/libonedrive0.install' 1043 --- debian/libonedrive0.install 2016-09-26 04:27:03 +0000 1044 +++ debian/libonedrive0.install 1970-01-01 00:00:00 +0000 1045 @@ -1,3 +0,0 @@ 1046 -usr/lib/*/lib*.so.* 1047 -usr/bin/* 1048 -usr/share/dbus-1/services/* 1049 1050 === modified file 'debian/rules' (properties changed: +x to -x) 1051 --- debian/rules 2016-09-26 04:27:03 +0000 1052 +++ debian/rules 2017-01-03 04:38:36 +0000 1053 @@ -1,9 +1,10 @@ 1054 #!/usr/bin/make -f 1055 # -*- makefile -*- 1056 1057 -export DPKG_GENSYMBOLS_CHECK_LEVEL=4 1058 - 1059 -include /usr/share/dpkg/default.mk 1060 +export QT_SELECT=qt5 1061 1062 %: 1063 - dh $@ --fail-missing 1064 + dh$@ --parallel --fail-missing 1065 + 1066 +override_dh_auto_test: 1067 + dh_auto_test --max-parallel=1 -- ARGS="--verbose" 1068 1069 === added directory 'debian/source' 1070 === added file 'debian/source/format' 1071 --- debian/source/format 1970-01-01 00:00:00 +0000 1072 +++ debian/source/format 2017-01-03 04:38:36 +0000 1073 @@ -0,0 +1,1 @@ 1074 +1.0 1075 1076 === removed directory 'doc' 1077 === removed file 'doc/CMakeLists.txt' 1078 --- doc/CMakeLists.txt 2016-09-26 04:27:03 +0000 1079 +++ doc/CMakeLists.txt 1970-01-01 00:00:00 +0000 1080 @@ -1,23 +0,0 @@ 1081 -option( 1082 - ONEDRIVE_LIB_ENABLE_DOC_GENERATION 1083 - "Generate package documentation with doxygen" 1084 - ON 1085 -) 1086 - 1087 -if (ONEDRIVE_LIB_ENABLE_DOC_GENERATION) 1088 - find_package(Doxygen) 1089 - 1090 - if (DOXYGEN_FOUND) 1091 - configure_file( 1092 - ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in 1093 -${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY) 1094 - add_custom_target(doc ALL 1095 - ${DOXYGEN_EXECUTABLE}${CMAKE_CURRENT_BINARY_DIR}/Doxyfile 1096 - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} 1097 - COMMENT "Generating API documentation with Doxygen" VERBATIM) 1098 - install( 1099 - DIRECTORY${CMAKE_CURRENT_BINARY_DIR}/html 1100 - DESTINATION ${CMAKE_INSTALL_DOCDIR}) 1101 - 1102 - endif (DOXYGEN_FOUND) 1103 -endif (ONEDRIVE_LIB_ENABLE_DOC_GENERATION) 1104 1105 === removed file 'doc/Doxyfile.in' 1106 --- doc/Doxyfile.in 2016-09-26 04:27:03 +0000 1107 +++ doc/Doxyfile.in 1970-01-01 00:00:00 +0000 1108 @@ -1,1869 +0,0 @@ 1109 -# Doxyfile 1.8.3.1 1110 - 1111 -# This file describes the settings to be used by the documentation system 1112 -# doxygen (www.doxygen.org) for a project. 1113 -# 1114 -# All text after a hash (#) is considered a comment and will be ignored. 1115 -# The format is: 1116 -# TAG = value [value, ...] 1117 -# For lists items can also be appended using: 1118 -# TAG += value [value, ...] 1119 -# Values that contain spaces should be placed between quotes (" "). 1120 - 1121 -#--------------------------------------------------------------------------- 1122 -# Project related configuration options 1123 -#--------------------------------------------------------------------------- 1124 - 1125 -# This tag specifies the encoding used for all characters in the config file 1126 -# that follow. The default is UTF-8 which is also the encoding used for all 1127 -# text before the first occurrence of this tag. Doxygen uses libiconv (or the 1128 -# iconv built into libc) for the transcoding. See 1129 -# http://www.gnu.org/software/libiconv for the list of possible encodings. 1130 - 1131 -DOXYFILE_ENCODING = UTF-8 1132 - 1133 -# The PROJECT_NAME tag is a single word (or sequence of words) that should 1134 -# identify the project. Note that if you do not use Doxywizard you need 1135 -# to put quotes around the project name if it contains spaces. 1136 - 1137 -PROJECT_NAME = @CMAKE_PROJECT_NAME@ 1138 - 1139 -# The PROJECT_NUMBER tag can be used to enter a project or revision number. 1140 -# This could be handy for archiving the generated documentation or 1141 -# if some version control system is used. 1142 - 1143 -PROJECT_NUMBER = @ONEDIRVE_LIB_VERSION_MAJOR@.@ONEDIRVE_LIB_VERSION_MINOR@.@ONEDIRVE_LIB_VERSION_PATCH@ 1144 - 1145 -# Using the PROJECT_BRIEF tag one can provide an optional one line description 1146 -# for a project that appears at the top of each page and should give viewer 1147 -# a quick idea about the purpose of the project. Keep the description short. 1148 - 1149 -PROJECT_BRIEF = "Onedrive API library For Microsoft OneDrive Service" 1150 - 1151 -# With the PROJECT_LOGO tag one can specify an logo or icon that is 1152 -# included in the documentation. The maximum height of the logo should not 1153 -# exceed 55 pixels and the maximum width should not exceed 200 pixels. 1154 -# Doxygen will copy the logo to the output directory. 1155 - 1156 -PROJECT_LOGO = 1157 - 1158 -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 1159 -# base path where the generated documentation will be put. 1160 -# If a relative path is entered, it will be relative to the location 1161 -# where doxygen was started. If left blank the current directory will be used. 1162 - 1163 -OUTPUT_DIRECTORY = 1164 - 1165 -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 1166 -# 4096 sub-directories (in 2 levels) under the output directory of each output 1167 -# format and will distribute the generated files over these directories. 1168 -# Enabling this option can be useful when feeding doxygen a huge amount of 1169 -# source files, where putting all generated files in the same directory would 1170 -# otherwise cause performance problems for the file system. 1171 - 1172 -CREATE_SUBDIRS = NO 1173 - 1174 -# The OUTPUT_LANGUAGE tag is used to specify the language in which all 1175 -# documentation generated by doxygen is written. Doxygen will use this 1176 -# information to generate all constant output in the proper language. 1177 -# The default language is English, other supported languages are: 1178 -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 1179 -# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, 1180 -# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English 1181 -# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, 1182 -# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, 1183 -# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. 1184 - 1185 -OUTPUT_LANGUAGE = English 1186 - 1187 -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 1188 -# include brief member descriptions after the members that are listed in 1189 -# the file and class documentation (similar to JavaDoc). 1190 -# Set to NO to disable this. 1191 - 1192 -BRIEF_MEMBER_DESC = YES 1193 - 1194 -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 1195 -# the brief description of a member or function before the detailed description. 1196 -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 1197 -# brief descriptions will be completely suppressed. 1198 - 1199 -REPEAT_BRIEF = YES 1200 - 1201 -# This tag implements a quasi-intelligent brief description abbreviator 1202 -# that is used to form the text in various listings. Each string 1203 -# in this list, if found as the leading text of the brief description, will be 1204 -# stripped from the text and the result after processing the whole list, is 1205 -# used as the annotated text. Otherwise, the brief description is used as-is. 1206 -# If left blank, the following values are used ("$name" is automatically 1207 -# replaced with the name of the entity): "The $name class" "The$name widget" 1208 -# "The $name file" "is" "provides" "specifies" "contains" 1209 -# "represents" "a" "an" "the" 1210 - 1211 -ABBREVIATE_BRIEF = 1212 - 1213 -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 1214 -# Doxygen will generate a detailed section even if there is only a brief 1215 -# description. 1216 - 1217 -ALWAYS_DETAILED_SEC = NO 1218 - 1219 -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 1220 -# inherited members of a class in the documentation of that class as if those 1221 -# members were ordinary class members. Constructors, destructors and assignment 1222 -# operators of the base classes will not be shown. 1223 - 1224 -INLINE_INHERITED_MEMB = NO 1225 - 1226 -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 1227 -# path before files name in the file list and in the header files. If set 1228 -# to NO the shortest path that makes the file name unique will be used. 1229 - 1230 -FULL_PATH_NAMES = YES 1231 - 1232 -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 1233 -# can be used to strip a user-defined part of the path. Stripping is 1234 -# only done if one of the specified strings matches the left-hand part of 1235 -# the path. The tag can be used to show relative paths in the file list. 1236 -# If left blank the directory from which doxygen is run is used as the 1237 -# path to strip. Note that you specify absolute paths here, but also 1238 -# relative paths, which will be relative from the directory where doxygen is 1239 -# started. 1240 - 1241 -STRIP_FROM_PATH = 1242 - 1243 -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 1244 -# the path mentioned in the documentation of a class, which tells 1245 -# the reader which header file to include in order to use a class. 1246 -# If left blank only the name of the header file containing the class 1247 -# definition is used. Otherwise one should specify the include paths that 1248 -# are normally passed to the compiler using the -I flag. 1249 - 1250 -STRIP_FROM_INC_PATH = 1251 - 1252 -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 1253 -# (but less readable) file names. This can be useful if your file system 1254 -# doesn't support long names like on DOS, Mac, or CD-ROM. 1255 - 1256 -SHORT_NAMES = NO 1257 - 1258 -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 1259 -# will interpret the first line (until the first dot) of a JavaDoc-style 1260 -# comment as the brief description. If set to NO, the JavaDoc 1261 -# comments will behave just like regular Qt-style comments 1262 -# (thus requiring an explicit @brief command for a brief description.) 1263 - 1264 -JAVADOC_AUTOBRIEF = NO 1265 - 1266 -# If the QT_AUTOBRIEF tag is set to YES then Doxygen will 1267 -# interpret the first line (until the first dot) of a Qt-style 1268 -# comment as the brief description. If set to NO, the comments 1269 -# will behave just like regular Qt-style comments (thus requiring 1270 -# an explicit \brief command for a brief description.) 1271 - 1272 -QT_AUTOBRIEF = NO 1273 - 1274 -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 1275 -# treat a multi-line C++ special comment block (i.e. a block of //! or /// 1276 -# comments) as a brief description. This used to be the default behaviour. 1277 -# The new default is to treat a multi-line C++ comment block as a detailed 1278 -# description. Set this tag to YES if you prefer the old behaviour instead. 1279 - 1280 -MULTILINE_CPP_IS_BRIEF = NO 1281 - 1282 -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 1283 -# member inherits the documentation from any documented member that it 1284 -# re-implements. 1285 - 1286 -INHERIT_DOCS = YES 1287 - 1288 -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 1289 -# a new page for each member. If set to NO, the documentation of a member will 1290 -# be part of the file/class/namespace that contains it. 1291 - 1292 -SEPARATE_MEMBER_PAGES = NO 1293 - 1294 -# The TAB_SIZE tag can be used to set the number of spaces in a tab. 1295 -# Doxygen uses this value to replace tabs by spaces in code fragments. 1296 - 1297 -TAB_SIZE = 4 1298 - 1299 -# This tag can be used to specify a number of aliases that acts 1300 -# as commands in the documentation. An alias has the form "name=value". 1301 -# For example adding "sideeffect=\par Side Effects:\n" will allow you to 1302 -# put the command \sideeffect (or @sideeffect) in the documentation, which 1303 -# will result in a user-defined paragraph with heading "Side Effects:". 1304 -# You can put \n's in the value part of an alias to insert newlines. 1305 - 1306 -ALIASES = 1307 - 1308 -# This tag can be used to specify a number of word-keyword mappings (TCL only). 1309 -# A mapping has the form "name=value". For example adding 1310 -# "class=itcl::class" will allow you to use the command class in the 1311 -# itcl::class meaning. 1312 - 1313 -TCL_SUBST = 1314 - 1315 -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 1316 -# sources only. Doxygen will then generate output that is more tailored for C. 1317 -# For instance, some of the names that are used will be different. The list 1318 -# of all members will be omitted, etc. 1319 - 1320 -OPTIMIZE_OUTPUT_FOR_C = NO 1321 - 1322 -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 1323 -# sources only. Doxygen will then generate output that is more tailored for 1324 -# Java. For instance, namespaces will be presented as packages, qualified 1325 -# scopes will look different, etc. 1326 - 1327 -OPTIMIZE_OUTPUT_JAVA = NO 1328 - 1329 -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran 1330 -# sources only. Doxygen will then generate output that is more tailored for 1331 -# Fortran. 1332 - 1333 -OPTIMIZE_FOR_FORTRAN = NO 1334 - 1335 -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL 1336 -# sources. Doxygen will then generate output that is tailored for 1337 -# VHDL. 1338 - 1339 -OPTIMIZE_OUTPUT_VHDL = NO 1340 - 1341 -# Doxygen selects the parser to use depending on the extension of the files it 1342 -# parses. With this tag you can assign which parser to use for a given 1343 -# extension. Doxygen has a built-in mapping, but you can override or extend it 1344 -# using this tag. The format is ext=language, where ext is a file extension, 1345 -# and language is one of the parsers supported by doxygen: IDL, Java, 1346 -# Javascript, CSharp, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, 1347 -# C++. For instance to make doxygen treat .inc files as Fortran files (default 1348 -# is PHP), and .f files as C (default is Fortran), use: inc=Fortran f=C. Note 1349 -# that for custom extensions you also need to set FILE_PATTERNS otherwise the 1350 -# files are not read by doxygen. 1351 - 1352 -EXTENSION_MAPPING = 1353 - 1354 -# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all 1355 -# comments according to the Markdown format, which allows for more readable 1356 -# documentation. See http://daringfireball.net/projects/markdown/ for details. 1357 -# The output of markdown processing is further processed by doxygen, so you 1358 -# can mix doxygen, HTML, and XML commands with Markdown formatting. 1359 -# Disable only in case of backward compatibilities issues. 1360 - 1361 -MARKDOWN_SUPPORT = YES 1362 - 1363 -# When enabled doxygen tries to link words that correspond to documented classes, 1364 -# or namespaces to their corresponding documentation. Such a link can be 1365 -# prevented in individual cases by by putting a % sign in front of the word or 1366 -# globally by setting AUTOLINK_SUPPORT to NO. 1367 - 1368 -AUTOLINK_SUPPORT = YES 1369 - 1370 -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want 1371 -# to include (a tag file for) the STL sources as input, then you should 1372 -# set this tag to YES in order to let doxygen match functions declarations and 1373 -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 1374 -# func(std::string) {}). This also makes the inheritance and collaboration 1375 -# diagrams that involve STL classes more complete and accurate. 1376 - 1377 -BUILTIN_STL_SUPPORT = YES 1378 - 1379 -# If you use Microsoft's C++/CLI language, you should set this option to YES to 1380 -# enable parsing support. 1381 - 1382 -CPP_CLI_SUPPORT = NO 1383 - 1384 -# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. 1385 -# Doxygen will parse them like normal C++ but will assume all classes use public 1386 -# instead of private inheritance when no explicit protection keyword is present. 1387 - 1388 -SIP_SUPPORT = NO 1389 - 1390 -# For Microsoft's IDL there are propget and propput attributes to indicate 1391 -# getter and setter methods for a property. Setting this option to YES (the 1392 -# default) will make doxygen replace the get and set methods by a property in 1393 -# the documentation. This will only work if the methods are indeed getting or 1394 -# setting a simple type. If this is not the case, or you want to show the 1395 -# methods anyway, you should set this option to NO. 1396 - 1397 -IDL_PROPERTY_SUPPORT = YES 1398 - 1399 -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 1400 -# tag is set to YES, then doxygen will reuse the documentation of the first 1401 -# member in the group (if any) for the other members of the group. By default 1402 -# all members of a group must be documented explicitly. 1403 - 1404 -DISTRIBUTE_GROUP_DOC = NO 1405 - 1406 -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 1407 -# the same type (for instance a group of public functions) to be put as a 1408 -# subgroup of that type (e.g. under the Public Functions section). Set it to 1409 -# NO to prevent subgrouping. Alternatively, this can be done per class using 1410 -# the \nosubgrouping command. 1411 - 1412 -SUBGROUPING = YES 1413 - 1414 -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and 1415 -# unions are shown inside the group in which they are included (e.g. using 1416 -# @ingroup) instead of on a separate page (for HTML and Man pages) or 1417 -# section (for LaTeX and RTF). 1418 - 1419 -INLINE_GROUPED_CLASSES = NO 1420 - 1421 -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and 1422 -# unions with only public data fields will be shown inline in the documentation 1423 -# of the scope in which they are defined (i.e. file, namespace, or group 1424 -# documentation), provided this scope is documented. If set to NO (the default), 1425 -# structs, classes, and unions are shown on a separate page (for HTML and Man 1426 -# pages) or section (for LaTeX and RTF). 1427 - 1428 -INLINE_SIMPLE_STRUCTS = NO 1429 - 1430 -# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum 1431 -# is documented as struct, union, or enum with the name of the typedef. So 1432 -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct 1433 -# with name TypeT. When disabled the typedef will appear as a member of a file, 1434 -# namespace, or class. And the struct will be named TypeS. This can typically 1435 -# be useful for C code in case the coding convention dictates that all compound 1436 -# types are typedef'ed and only the typedef is referenced, never the tag name. 1437 - 1438 -TYPEDEF_HIDES_STRUCT = NO 1439 - 1440 -# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to 1441 -# determine which symbols to keep in memory and which to flush to disk. 1442 -# When the cache is full, less often used symbols will be written to disk. 1443 -# For small to medium size projects (<1000 input files) the default value is 1444 -# probably good enough. For larger projects a too small cache size can cause 1445 -# doxygen to be busy swapping symbols to and from disk most of the time 1446 -# causing a significant performance penalty. 1447 -# If the system has enough physical memory increasing the cache will improve the 1448 -# performance by keeping more symbols in memory. Note that the value works on 1449 -# a logarithmic scale so increasing the size by one will roughly double the 1450 -# memory usage. The cache size is given by this formula: 1451 -# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, 1452 -# corresponding to a cache size of 2^16 = 65536 symbols. 1453 - 1454 -SYMBOL_CACHE_SIZE = 0 1455 - 1456 -# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be 1457 -# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given 1458 -# their name and scope. Since this can be an expensive process and often the 1459 -# same symbol appear multiple times in the code, doxygen keeps a cache of 1460 -# pre-resolved symbols. If the cache is too small doxygen will become slower. 1461 -# If the cache is too large, memory is wasted. The cache size is given by this 1462 -# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0, 1463 -# corresponding to a cache size of 2^16 = 65536 symbols. 1464 - 1465 -LOOKUP_CACHE_SIZE = 0 1466 - 1467 -#--------------------------------------------------------------------------- 1468 -# Build related configuration options 1469 -#--------------------------------------------------------------------------- 1470 - 1471 -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 1472 -# documentation are documented, even if no documentation was available. 1473 -# Private class members and static file members will be hidden unless 1474 -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES 1475 - 1476 -EXTRACT_ALL = YES 1477 - 1478 -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 1479 -# will be included in the documentation. 1480 - 1481 -EXTRACT_PRIVATE = NO 1482 - 1483 -# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal 1484 -# scope will be included in the documentation. 1485 - 1486 -EXTRACT_PACKAGE = NO 1487 - 1488 -# If the EXTRACT_STATIC tag is set to YES all static members of a file 1489 -# will be included in the documentation. 1490 - 1491 -EXTRACT_STATIC = NO 1492 - 1493 -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 1494 -# defined locally in source files will be included in the documentation. 1495 -# If set to NO only classes defined in header files are included. 1496 - 1497 -EXTRACT_LOCAL_CLASSES = YES 1498 - 1499 -# This flag is only useful for Objective-C code. When set to YES local 1500 -# methods, which are defined in the implementation section but not in 1501 -# the interface are included in the documentation. 1502 -# If set to NO (the default) only methods in the interface are included. 1503 - 1504 -EXTRACT_LOCAL_METHODS = NO 1505 - 1506 -# If this flag is set to YES, the members of anonymous namespaces will be 1507 -# extracted and appear in the documentation as a namespace called 1508 -# 'anonymous_namespace{file}', where file will be replaced with the base 1509 -# name of the file that contains the anonymous namespace. By default 1510 -# anonymous namespaces are hidden. 1511 - 1512 -EXTRACT_ANON_NSPACES = NO 1513 - 1514 -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 1515 -# undocumented members of documented classes, files or namespaces. 1516 -# If set to NO (the default) these members will be included in the 1517 -# various overviews, but no documentation section is generated. 1518 -# This option has no effect if EXTRACT_ALL is enabled. 1519 - 1520 -HIDE_UNDOC_MEMBERS = NO 1521 - 1522 -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 1523 -# undocumented classes that are normally visible in the class hierarchy. 1524 -# If set to NO (the default) these classes will be included in the various 1525 -# overviews. This option has no effect if EXTRACT_ALL is enabled. 1526 - 1527 -HIDE_UNDOC_CLASSES = NO 1528 - 1529 -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 1530 -# friend (class|struct|union) declarations. 1531 -# If set to NO (the default) these declarations will be included in the 1532 -# documentation. 1533 - 1534 -HIDE_FRIEND_COMPOUNDS = NO 1535 - 1536 -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 1537 -# documentation blocks found inside the body of a function. 1538 -# If set to NO (the default) these blocks will be appended to the 1539 -# function's detailed documentation block. 1540 - 1541 -HIDE_IN_BODY_DOCS = NO 1542 - 1543 -# The INTERNAL_DOCS tag determines if documentation 1544 -# that is typed after a \internal command is included. If the tag is set 1545 -# to NO (the default) then the documentation will be excluded. 1546 -# Set it to YES to include the internal documentation. 1547 - 1548 -INTERNAL_DOCS = NO 1549 - 1550 -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 1551 -# file names in lower-case letters. If set to YES upper-case letters are also 1552 -# allowed. This is useful if you have classes or files whose names only differ 1553 -# in case and if your file system supports case sensitive file names. Windows 1554 -# and Mac users are advised to set this option to NO. 1555 - 1556 -CASE_SENSE_NAMES = YES 1557 - 1558 -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 1559 -# will show members with their full class and namespace scopes in the 1560 -# documentation. If set to YES the scope will be hidden. 1561 - 1562 -HIDE_SCOPE_NAMES = NO 1563 - 1564 -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 1565 -# will put a list of the files that are included by a file in the documentation 1566 -# of that file. 1567 - 1568 -SHOW_INCLUDE_FILES = YES 1569 - 1570 -# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen 1571 -# will list include files with double quotes in the documentation 1572 -# rather than with sharp brackets. 1573 - 1574 -FORCE_LOCAL_INCLUDES = NO 1575 - 1576 -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 1577 -# is inserted in the documentation for inline members. 1578 - 1579 -INLINE_INFO = YES 1580 - 1581 -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 1582 -# will sort the (detailed) documentation of file and class members 1583 -# alphabetically by member name. If set to NO the members will appear in 1584 -# declaration order. 1585 - 1586 -SORT_MEMBER_DOCS = YES 1587 - 1588 -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 1589 -# brief documentation of file, namespace and class members alphabetically 1590 -# by member name. If set to NO (the default) the members will appear in 1591 -# declaration order. 1592 - 1593 -SORT_BRIEF_DOCS = NO 1594 - 1595 -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen 1596 -# will sort the (brief and detailed) documentation of class members so that 1597 -# constructors and destructors are listed first. If set to NO (the default) 1598 -# the constructors will appear in the respective orders defined by 1599 -# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. 1600 -# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO 1601 -# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. 1602 - 1603 -SORT_MEMBERS_CTORS_1ST = NO 1604 - 1605 -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the 1606 -# hierarchy of group names into alphabetical order. If set to NO (the default) 1607 -# the group names will appear in their defined order. 1608 - 1609 -SORT_GROUP_NAMES = NO 1610 - 1611 -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 1612 -# sorted by fully-qualified names, including namespaces. If set to 1613 -# NO (the default), the class list will be sorted only by class name, 1614 -# not including the namespace part. 1615 -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. 1616 -# Note: This option applies only to the class list, not to the 1617 -# alphabetical list. 1618 - 1619 -SORT_BY_SCOPE_NAME = NO 1620 - 1621 -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to 1622 -# do proper type resolution of all parameters of a function it will reject a 1623 -# match between the prototype and the implementation of a member function even 1624 -# if there is only one candidate or it is obvious which candidate to choose 1625 -# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen 1626 -# will still accept a match between prototype and implementation in such cases. 1627 - 1628 -STRICT_PROTO_MATCHING = NO 1629 - 1630 -# The GENERATE_TODOLIST tag can be used to enable (YES) or 1631 -# disable (NO) the todo list. This list is created by putting \todo 1632 -# commands in the documentation. 1633 - 1634 -GENERATE_TODOLIST = YES 1635 - 1636 -# The GENERATE_TESTLIST tag can be used to enable (YES) or 1637 -# disable (NO) the test list. This list is created by putting \test 1638 -# commands in the documentation. 1639 - 1640 -GENERATE_TESTLIST = YES 1641 - 1642 -# The GENERATE_BUGLIST tag can be used to enable (YES) or 1643 -# disable (NO) the bug list. This list is created by putting \bug 1644 -# commands in the documentation. 1645 - 1646 -GENERATE_BUGLIST = YES 1647 - 1648 -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 1649 -# disable (NO) the deprecated list. This list is created by putting 1650 -# \deprecated commands in the documentation. 1651 - 1652 -GENERATE_DEPRECATEDLIST= YES 1653 - 1654 -# The ENABLED_SECTIONS tag can be used to enable conditional 1655 -# documentation sections, marked by \if section-label ... \endif 1656 -# and \cond section-label ... \endcond blocks. 1657 - 1658 -ENABLED_SECTIONS = 1659 - 1660 -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 1661 -# the initial value of a variable or macro consists of for it to appear in 1662 -# the documentation. If the initializer consists of more lines than specified 1663 -# here it will be hidden. Use a value of 0 to hide initializers completely. 1664 -# The appearance of the initializer of individual variables and macros in the 1665 -# documentation can be controlled using \showinitializer or \hideinitializer 1666 -# command in the documentation regardless of this setting. 1667 - 1668 -MAX_INITIALIZER_LINES = 30 1669 - 1670 -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 1671 -# at the bottom of the documentation of classes and structs. If set to YES the 1672 -# list will mention the files that were used to generate the documentation. 1673 - 1674 -SHOW_USED_FILES = YES 1675 - 1676 -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. 1677 -# This will remove the Files entry from the Quick Index and from the 1678 -# Folder Tree View (if specified). The default is YES. 1679 - 1680 -SHOW_FILES = YES 1681 - 1682 -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the 1683 -# Namespaces page. 1684 -# This will remove the Namespaces entry from the Quick Index 1685 -# and from the Folder Tree View (if specified). The default is YES. 1686 - 1687 -SHOW_NAMESPACES = YES 1688 - 1689 -# The FILE_VERSION_FILTER tag can be used to specify a program or script that 1690 -# doxygen should invoke to get the current version for each file (typically from 1691 -# the version control system). Doxygen will invoke the program by executing (via 1692 -# popen()) the command , where is the value of 1693 -# the FILE_VERSION_FILTER tag, and is the name of an input file 1694 -# provided by doxygen. Whatever the program writes to standard output 1695 -# is used as the file version. See the manual for examples. 1696 - 1697 -FILE_VERSION_FILTER = 1698 - 1699 -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed 1700 -# by doxygen. The layout file controls the global structure of the generated 1701 -# output files in an output format independent way. To create the layout file 1702 -# that represents doxygen's defaults, run doxygen with the -l option. 1703 -# You can optionally specify a file name after the option, if omitted 1704 -# DoxygenLayout.xml will be used as the name of the layout file. 1705 - 1706 -LAYOUT_FILE = 1707 - 1708 -# The CITE_BIB_FILES tag can be used to specify one or more bib files 1709 -# containing the references data. This must be a list of .bib files. The 1710 -# .bib extension is automatically appended if omitted. Using this command 1711 -# requires the bibtex tool to be installed. See also 1712 -# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style 1713 -# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this 1714 -# feature you need bibtex and perl available in the search path. Do not use 1715 -# file names with spaces, bibtex cannot handle them. 1716 - 1717 -CITE_BIB_FILES = 1718 - 1719 -#--------------------------------------------------------------------------- 1720 -# configuration options related to warning and progress messages 1721 -#--------------------------------------------------------------------------- 1722 - 1723 -# The QUIET tag can be used to turn on/off the messages that are generated 1724 -# by doxygen. Possible values are YES and NO. If left blank NO is used. 1725 - 1726 -QUIET = NO 1727 - 1728 -# The WARNINGS tag can be used to turn on/off the warning messages that are 1729 -# generated by doxygen. Possible values are YES and NO. If left blank 1730 -# NO is used. 1731 - 1732 -WARNINGS = YES 1733 - 1734 -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 1735 -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 1736 -# automatically be disabled. 1737 - 1738 -WARN_IF_UNDOCUMENTED = YES 1739 - 1740 -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 1741 -# potential errors in the documentation, such as not documenting some 1742 -# parameters in a documented function, or documenting parameters that 1743 -# don't exist or using markup commands wrongly. 1744 - 1745 -WARN_IF_DOC_ERROR = YES 1746 - 1747 -# The WARN_NO_PARAMDOC option can be enabled to get warnings for 1748 -# functions that are documented, but have no documentation for their parameters 1749 -# or return value. If set to NO (the default) doxygen will only warn about 1750 -# wrong or incomplete parameter documentation, but not about the absence of 1751 -# documentation. 1752 - 1753 -WARN_NO_PARAMDOC = NO 1754 - 1755 -# The WARN_FORMAT tag determines the format of the warning messages that 1756 -# doxygen can produce. The string should contain the$file, $line, and$text 1757 -# tags, which will be replaced by the file and line number from which the 1758 -# warning originated and the warning text. Optionally the format may contain 1759 -# $version, which will be replaced by the version of the file (if it could 1760 -# be obtained via FILE_VERSION_FILTER) 1761 - 1762 -WARN_FORMAT = "$file:$line:$text" 1763 - 1764 -# The WARN_LOGFILE tag can be used to specify a file to which warning 1765 -# and error messages should be written. If left blank the output is written 1766 -# to stderr. 1767 - 1768 -WARN_LOGFILE = 1769 - 1770 -#--------------------------------------------------------------------------- 1771 -# configuration options related to the input files 1772 -#--------------------------------------------------------------------------- 1773 - 1774 -# The INPUT tag can be used to specify the files and/or directories that contain 1775 -# documented source files. You may enter file names like "myfile.cpp" or 1776 -# directories like "/usr/src/myproject". Separate the files or directories 1777 -# with spaces. 1778 - 1779 -INPUT = @CMAKE_SOURCE_DIR@/include @CMAKE_CURRENT_SOURCE_DIR@ 1780 - 1781 -# This tag can be used to specify the character encoding of the source files 1782 -# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is 1783 -# also the default input encoding. Doxygen uses libiconv (or the iconv built 1784 -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for 1785 -# the list of possible encodings. 1786 - 1787 -INPUT_ENCODING = UTF-8 1788 - 1789 -# If the value of the INPUT tag contains directories, you can use the 1790 -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 1791 -# and *.h) to filter out the source-files in the directories. If left 1792 -# blank the following patterns are tested: 1793 -# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh 1794 -# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py 1795 -# *.f90 *.f *.for *.vhd *.vhdl 1796 - 1797 -FILE_PATTERNS = 1798 - 1799 -# The RECURSIVE tag can be used to turn specify whether or not subdirectories 1800 -# should be searched for input files as well. Possible values are YES and NO. 1801 -# If left blank NO is used. 1802 - 1803 -RECURSIVE = YES 1804 - 1805 -# The EXCLUDE tag can be used to specify files and/or directories that should be 1806 -# excluded from the INPUT source files. This way you can easily exclude a 1807 -# subdirectory from a directory tree whose root is specified with the INPUT tag. 1808 -# Note that relative paths are relative to the directory from which doxygen is 1809 -# run. 1810 - 1811 -EXCLUDE = 1812 - 1813 -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or 1814 -# directories that are symbolic links (a Unix file system feature) are excluded 1815 -# from the input. 1816 - 1817 -EXCLUDE_SYMLINKS = NO 1818 - 1819 -# If the value of the INPUT tag contains directories, you can use the 1820 -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 1821 -# certain files from those directories. Note that the wildcards are matched 1822 -# against the file with absolute path, so to exclude all test directories 1823 -# for example use the pattern */test/* 1824 - 1825 -EXCLUDE_PATTERNS = 1826 - 1827 -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 1828 -# (namespaces, classes, functions, etc.) that should be excluded from the 1829 -# output. The symbol name can be a fully qualified name, a word, or if the 1830 -# wildcard * is used, a substring. Examples: ANamespace, AClass, 1831 -# AClass::ANamespace, ANamespace::*Test 1832 - 1833 -EXCLUDE_SYMBOLS = 1834 - 1835 -# The EXAMPLE_PATH tag can be used to specify one or more files or 1836 -# directories that contain example code fragments that are included (see 1837 -# the \include command). 1838 - 1839 -EXAMPLE_PATH = @CMAKE_CURRENT_SOURCE_DIR@/../tests 1840 - 1841 -# If the value of the EXAMPLE_PATH tag contains directories, you can use the 1842 -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 1843 -# and *.h) to filter out the source-files in the directories. If left 1844 -# blank all files are included. 1845 - 1846 -EXAMPLE_PATTERNS = 1847 - 1848 -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 1849 -# searched for input files to be used with the \include or \dontinclude 1850 -# commands irrespective of the value of the RECURSIVE tag. 1851 -# Possible values are YES and NO. If left blank NO is used. 1852 - 1853 -EXAMPLE_RECURSIVE = YES 1854 - 1855 -# The IMAGE_PATH tag can be used to specify one or more files or 1856 -# directories that contain image that are included in the documentation (see 1857 -# the \image command). 1858 - 1859 -IMAGE_PATH = 1860 - 1861 -# The INPUT_FILTER tag can be used to specify a program that doxygen should 1862 -# invoke to filter for each input file. Doxygen will invoke the filter program 1863 -# by executing (via popen()) the command , where 1864 -# is the value of the INPUT_FILTER tag, and is the name of an 1865 -# input file. Doxygen will then use the output that the filter program writes 1866 -# to standard output. 1867 -# If FILTER_PATTERNS is specified, this tag will be 1868 -# ignored. 1869 - 1870 -INPUT_FILTER = 1871 - 1872 -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 1873 -# basis. 1874 -# Doxygen will compare the file name with each pattern and apply the 1875 -# filter if there is a match. 1876 -# The filters are a list of the form: 1877 -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 1878 -# info on how filters are used. If FILTER_PATTERNS is empty or if 1879 -# non of the patterns match the file name, INPUT_FILTER is applied. 1880 - 1881 -FILTER_PATTERNS = 1882 - 1883 -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 1884 -# INPUT_FILTER) will be used to filter the input files when producing source 1885 -# files to browse (i.e. when SOURCE_BROWSER is set to YES). 1886 - 1887 -FILTER_SOURCE_FILES = NO 1888 - 1889 -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file 1890 -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) 1891 -# and it is also possible to disable source filtering for a specific pattern 1892 -# using *.ext= (so without naming a filter). This option only has effect when 1893 -# FILTER_SOURCE_FILES is enabled. 1894 - 1895 -FILTER_SOURCE_PATTERNS = 1896 - 1897 -# If the USE_MD_FILE_AS_MAINPAGE tag refers to the name of a markdown file that 1898 -# is part of the input, its contents will be placed on the main page (index.html). 1899 -# This can be useful if you have a project on for instance GitHub and want reuse 1900 -# the introduction page also for the doxygen output. 1901 - 1902 -USE_MDFILE_AS_MAINPAGE = @CMAKE_SOURCE_DIR@/README.md 1903 - 1904 -#--------------------------------------------------------------------------- 1905 -# configuration options related to source browsing 1906 -#--------------------------------------------------------------------------- 1907 - 1908 -# If the SOURCE_BROWSER tag is set to YES then a list of source files will 1909 -# be generated. Documented entities will be cross-referenced with these sources. 1910 -# Note: To get rid of all source code in the generated output, make sure also 1911 -# VERBATIM_HEADERS is set to NO. 1912 - 1913 -SOURCE_BROWSER = YES 1914 - 1915 -# Setting the INLINE_SOURCES tag to YES will include the body 1916 -# of functions and classes directly in the documentation. 1917 - 1918 -INLINE_SOURCES = NO 1919 - 1920 -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 1921 -# doxygen to hide any special comment blocks from generated source code 1922 -# fragments. Normal C, C++ and Fortran comments will always remain visible. 1923 - 1924 -STRIP_CODE_COMMENTS = YES 1925 - 1926 -# If the REFERENCED_BY_RELATION tag is set to YES 1927 -# then for each documented function all documented 1928 -# functions referencing it will be listed. 1929 - 1930 -REFERENCED_BY_RELATION = YES 1931 - 1932 -# If the REFERENCES_RELATION tag is set to YES 1933 -# then for each documented function all documented entities 1934 -# called/used by that function will be listed. 1935 - 1936 -REFERENCES_RELATION = YES 1937 - 1938 -# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) 1939 -# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from 1940 -# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will 1941 -# link to the source code. 1942 -# Otherwise they will link to the documentation. 1943 - 1944 -REFERENCES_LINK_SOURCE = YES 1945 - 1946 -# If the USE_HTAGS tag is set to YES then the references to source code 1947 -# will point to the HTML generated by the htags(1) tool instead of doxygen 1948 -# built-in source browser. The htags tool is part of GNU's global source 1949 -# tagging system (see http://www.gnu.org/software/global/global.html). You 1950 -# will need version 4.8.6 or higher. 1951 - 1952 -USE_HTAGS = NO 1953 - 1954 -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 1955 -# will generate a verbatim copy of the header file for each class for 1956 -# which an include is specified. Set to NO to disable this. 1957 - 1958 -VERBATIM_HEADERS = YES 1959 - 1960 -#--------------------------------------------------------------------------- 1961 -# configuration options related to the alphabetical class index 1962 -#--------------------------------------------------------------------------- 1963 - 1964 -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 1965 -# of all compounds will be generated. Enable this if the project 1966 -# contains a lot of classes, structs, unions or interfaces. 1967 - 1968 -ALPHABETICAL_INDEX = YES 1969 - 1970 -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 1971 -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 1972 -# in which this list will be split (can be a number in the range [1..20]) 1973 - 1974 -COLS_IN_ALPHA_INDEX = 5 1975 - 1976 -# In case all classes in a project start with a common prefix, all 1977 -# classes will be put under the same header in the alphabetical index. 1978 -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 1979 -# should be ignored while generating the index headers. 1980 - 1981 -IGNORE_PREFIX = 1982 - 1983 -#--------------------------------------------------------------------------- 1984 -# configuration options related to the HTML output 1985 -#--------------------------------------------------------------------------- 1986 - 1987 -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 1988 -# generate HTML output. 1989 - 1990 -GENERATE_HTML = YES 1991 - 1992 -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 1993 -# If a relative path is entered the value of OUTPUT_DIRECTORY will be 1994 -# put in front of it. If left blank html' will be used as the default path. 1995 - 1996 -HTML_OUTPUT = html 1997 - 1998 -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 1999 -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 2000 -# doxygen will generate files with .html extension. 2001 - 2002 -HTML_FILE_EXTENSION = .html 2003 - 2004 -# The HTML_HEADER tag can be used to specify a personal HTML header for 2005 -# each generated HTML page. If it is left blank doxygen will generate a 2006 -# standard header. Note that when using a custom header you are responsible 2007 -# for the proper inclusion of any scripts and style sheets that doxygen 2008 -# needs, which is dependent on the configuration options used. 2009 -# It is advised to generate a default header using "doxygen -w html 2010 -# header.html footer.html stylesheet.css YourConfigFile" and then modify 2011 -# that header. Note that the header is subject to change so you typically 2012 -# have to redo this when upgrading to a newer version of doxygen or when 2013 -# changing the value of configuration settings such as GENERATE_TREEVIEW! 2014 - 2015 -HTML_HEADER = 2016 - 2017 -# The HTML_FOOTER tag can be used to specify a personal HTML footer for 2018 -# each generated HTML page. If it is left blank doxygen will generate a 2019 -# standard footer. 2020 - 2021 -HTML_FOOTER = 2022 - 2023 -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 2024 -# style sheet that is used by each HTML page. It can be used to 2025 -# fine-tune the look of the HTML output. If left blank doxygen will 2026 -# generate a default style sheet. Note that it is recommended to use 2027 -# HTML_EXTRA_STYLESHEET instead of this one, as it is more robust and this 2028 -# tag will in the future become obsolete. 2029 - 2030 -HTML_STYLESHEET = 2031 - 2032 -# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional 2033 -# user-defined cascading style sheet that is included after the standard 2034 -# style sheets created by doxygen. Using this option one can overrule 2035 -# certain style aspects. This is preferred over using HTML_STYLESHEET 2036 -# since it does not replace the standard style sheet and is therefor more 2037 -# robust against future updates. Doxygen will copy the style sheet file to 2038 -# the output directory. 2039 - 2040 -HTML_EXTRA_STYLESHEET = @CMAKE_CURRENT_SOURCE_DIR@/extra.css 2041 - 2042 -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or 2043 -# other source files which should be copied to the HTML output directory. Note 2044 -# that these files will be copied to the base HTML output directory. Use the 2045 -# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these 2046 -# files. In the HTML_STYLESHEET file, use the file name only. Also note that 2047 -# the files will be copied as-is; there are no commands or markers available. 2048 - 2049 -HTML_EXTRA_FILES = 2050 - 2051 -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. 2052 -# Doxygen will adjust the colors in the style sheet and background images 2053 -# according to this color. Hue is specified as an angle on a colorwheel, 2054 -# see http://en.wikipedia.org/wiki/Hue for more information. 2055 -# For instance the value 0 represents red, 60 is yellow, 120 is green, 2056 -# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. 2057 -# The allowed range is 0 to 359. 2058 - 2059 -HTML_COLORSTYLE_HUE = 220 2060 - 2061 -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of 2062 -# the colors in the HTML output. For a value of 0 the output will use 2063 -# grayscales only. A value of 255 will produce the most vivid colors. 2064 - 2065 -HTML_COLORSTYLE_SAT = 100 2066 - 2067 -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to 2068 -# the luminance component of the colors in the HTML output. Values below 2069 -# 100 gradually make the output lighter, whereas values above 100 make 2070 -# the output darker. The value divided by 100 is the actual gamma applied, 2071 -# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, 2072 -# and 100 does not change the gamma. 2073 - 2074 -HTML_COLORSTYLE_GAMMA = 80 2075 - 2076 -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML 2077 -# page will contain the date and time when the page was generated. Setting 2078 -# this to NO can help when comparing the output of multiple runs. 2079 - 2080 -HTML_TIMESTAMP = YES 2081 - 2082 -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 2083 -# documentation will contain sections that can be hidden and shown after the 2084 -# page has loaded. 2085 - 2086 -HTML_DYNAMIC_SECTIONS = YES 2087 - 2088 -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of 2089 -# entries shown in the various tree structured indices initially; the user 2090 -# can expand and collapse entries dynamically later on. Doxygen will expand 2091 -# the tree to such a level that at most the specified number of entries are 2092 -# visible (unless a fully collapsed tree already exceeds this amount). 2093 -# So setting the number of entries 1 will produce a full collapsed tree by 2094 -# default. 0 is a special value representing an infinite number of entries 2095 -# and will result in a full expanded tree by default. 2096 - 2097 -HTML_INDEX_NUM_ENTRIES = 100 2098 - 2099 -# If the GENERATE_DOCSET tag is set to YES, additional index files 2100 -# will be generated that can be used as input for Apple's Xcode 3 2101 -# integrated development environment, introduced with OSX 10.5 (Leopard). 2102 -# To create a documentation set, doxygen will generate a Makefile in the 2103 -# HTML output directory. Running make will produce the docset in that 2104 -# directory and running "make install" will install the docset in 2105 -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find 2106 -# it at startup. 2107 -# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html 2108 -# for more information. 2109 - 2110 -GENERATE_DOCSET = NO 2111 - 2112 -# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the 2113 -# feed. A documentation feed provides an umbrella under which multiple 2114 -# documentation sets from a single provider (such as a company or product suite) 2115 -# can be grouped. 2116 - 2117 -DOCSET_FEEDNAME = "Doxygen generated docs" 2118 - 2119 -# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that 2120 -# should uniquely identify the documentation set bundle. This should be a 2121 -# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen 2122 -# will append .docset to the name. 2123 - 2124 -DOCSET_BUNDLE_ID = org.doxygen.Project 2125 - 2126 -# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely 2127 -# identify the documentation publisher. This should be a reverse domain-name 2128 -# style string, e.g. com.mycompany.MyDocSet.documentation. 2129 - 2130 -DOCSET_PUBLISHER_ID = org.doxygen.Publisher 2131 - 2132 -# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. 2133 - 2134 -DOCSET_PUBLISHER_NAME = Publisher 2135 - 2136 -# If the GENERATE_HTMLHELP tag is set to YES, additional index files 2137 -# will be generated that can be used as input for tools like the 2138 -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) 2139 -# of the generated HTML documentation. 2140 - 2141 -GENERATE_HTMLHELP = NO 2142 - 2143 -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 2144 -# be used to specify the file name of the resulting .chm file. You 2145 -# can add a path in front of the file if the result should not be 2146 -# written to the html output directory. 2147 - 2148 -CHM_FILE = 2149 - 2150 -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 2151 -# be used to specify the location (absolute path including file name) of 2152 -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 2153 -# the HTML help compiler on the generated index.hhp. 2154 - 2155 -HHC_LOCATION = 2156 - 2157 -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 2158 -# controls if a separate .chi index file is generated (YES) or that 2159 -# it should be included in the master .chm file (NO). 2160 - 2161 -GENERATE_CHI = NO 2162 - 2163 -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING 2164 -# is used to encode HtmlHelp index (hhk), content (hhc) and project file 2165 -# content. 2166 - 2167 -CHM_INDEX_ENCODING = 2168 - 2169 -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 2170 -# controls whether a binary table of contents is generated (YES) or a 2171 -# normal table of contents (NO) in the .chm file. 2172 - 2173 -BINARY_TOC = NO 2174 - 2175 -# The TOC_EXPAND flag can be set to YES to add extra items for group members 2176 -# to the contents of the HTML help documentation and to the tree view. 2177 - 2178 -TOC_EXPAND = NO 2179 - 2180 -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and 2181 -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated 2182 -# that can be used as input for Qt's qhelpgenerator to generate a 2183 -# Qt Compressed Help (.qch) of the generated HTML documentation. 2184 - 2185 -GENERATE_QHP = NO 2186 - 2187 -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can 2188 -# be used to specify the file name of the resulting .qch file. 2189 -# The path specified is relative to the HTML output folder. 2190 - 2191 -QCH_FILE = 2192 - 2193 -# The QHP_NAMESPACE tag specifies the namespace to use when generating 2194 -# Qt Help Project output. For more information please see 2195 -# http://doc.trolltech.com/qthelpproject.html#namespace 2196 - 2197 -QHP_NAMESPACE = org.doxygen.Project 2198 - 2199 -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating 2200 -# Qt Help Project output. For more information please see 2201 -# http://doc.trolltech.com/qthelpproject.html#virtual-folders 2202 - 2203 -QHP_VIRTUAL_FOLDER = doc 2204 - 2205 -# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to 2206 -# add. For more information please see 2207 -# http://doc.trolltech.com/qthelpproject.html#custom-filters 2208 - 2209 -QHP_CUST_FILTER_NAME = 2210 - 2211 -# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the 2212 -# custom filter to add. For more information please see 2213 -# 2214 -# Qt Help Project / Custom Filters. 2215 - 2216 -QHP_CUST_FILTER_ATTRS = 2217 - 2218 -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this 2219 -# project's 2220 -# filter section matches. 2221 -# 2222 -# Qt Help Project / Filter Attributes. 2223 - 2224 -QHP_SECT_FILTER_ATTRS = 2225 - 2226 -# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can 2227 -# be used to specify the location of Qt's qhelpgenerator. 2228 -# If non-empty doxygen will try to run qhelpgenerator on the generated 2229 -# .qhp file. 2230 - 2231 -QHG_LOCATION = 2232 - 2233 -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files 2234 -# will be generated, which together with the HTML files, form an Eclipse help 2235 -# plugin. To install this plugin and make it available under the help contents 2236 -# menu in Eclipse, the contents of the directory containing the HTML and XML 2237 -# files needs to be copied into the plugins directory of eclipse. The name of 2238 -# the directory within the plugins directory should be the same as 2239 -# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before 2240 -# the help appears. 2241 - 2242 -GENERATE_ECLIPSEHELP = NO 2243 - 2244 -# A unique identifier for the eclipse help plugin. When installing the plugin 2245 -# the directory name containing the HTML and XML files should also have 2246 -# this name. 2247 - 2248 -ECLIPSE_DOC_ID = org.doxygen.Project 2249 - 2250 -# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) 2251 -# at top of each HTML page. The value NO (the default) enables the index and 2252 -# the value YES disables it. Since the tabs have the same information as the 2253 -# navigation tree you can set this option to NO if you already set 2254 -# GENERATE_TREEVIEW to YES. 2255 - 2256 -DISABLE_INDEX = YES 2257 - 2258 -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index 2259 -# structure should be generated to display hierarchical information. 2260 -# If the tag value is set to YES, a side panel will be generated 2261 -# containing a tree-like index structure (just like the one that 2262 -# is generated for HTML Help). For this to work a browser that supports 2263 -# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). 2264 -# Windows users are probably better off using the HTML help feature. 2265 -# Since the tree basically has the same information as the tab index you 2266 -# could consider to set DISABLE_INDEX to NO when enabling this option. 2267 - 2268 -GENERATE_TREEVIEW = YES 2269 - 2270 -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values 2271 -# (range [0,1..20]) that doxygen will group on one line in the generated HTML 2272 -# documentation. Note that a value of 0 will completely suppress the enum 2273 -# values from appearing in the overview section. 2274 - 2275 -ENUM_VALUES_PER_LINE = 1 2276 - 2277 -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 2278 -# used to set the initial width (in pixels) of the frame in which the tree 2279 -# is shown. 2280 - 2281 -TREEVIEW_WIDTH = 250 2282 - 2283 -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open 2284 -# links to external symbols imported via tag files in a separate window. 2285 - 2286 -EXT_LINKS_IN_WINDOW = NO 2287 - 2288 -# Use this tag to change the font size of Latex formulas included 2289 -# as images in the HTML documentation. The default is 10. Note that 2290 -# when you change the font size after a successful doxygen run you need 2291 -# to manually remove any form_*.png images from the HTML output directory 2292 -# to force them to be regenerated. 2293 - 2294 -FORMULA_FONTSIZE = 10 2295 - 2296 -# Use the FORMULA_TRANPARENT tag to determine whether or not the images 2297 -# generated for formulas are transparent PNGs. Transparent PNGs are 2298 -# not supported properly for IE 6.0, but are supported on all modern browsers. 2299 -# Note that when changing this option you need to delete any form_*.png files 2300 -# in the HTML output before the changes have effect. 2301 - 2302 -FORMULA_TRANSPARENT = YES 2303 - 2304 -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax 2305 -# (see http://www.mathjax.org) which uses client side Javascript for the 2306 -# rendering instead of using prerendered bitmaps. Use this if you do not 2307 -# have LaTeX installed or if you want to formulas look prettier in the HTML 2308 -# output. When enabled you may also need to install MathJax separately and 2309 -# configure the path to it using the MATHJAX_RELPATH option. 2310 - 2311 -USE_MATHJAX = NO 2312 - 2313 -# When MathJax is enabled you can set the default output format to be used for 2314 -# thA MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and 2315 -# SVG. The default value is HTML-CSS, which is slower, but has the best 2316 -# compatibility. 2317 - 2318 -MATHJAX_FORMAT = HTML-CSS 2319 - 2320 -# When MathJax is enabled you need to specify the location relative to the 2321 -# HTML output directory using the MATHJAX_RELPATH option. The destination 2322 -# directory should contain the MathJax.js script. For instance, if the mathjax 2323 -# directory is located at the same level as the HTML output directory, then 2324 -# MATHJAX_RELPATH should be ../mathjax. The default value points to 2325 -# the MathJax Content Delivery Network so you can quickly see the result without 2326 -# installing MathJax. 2327 -# However, it is strongly recommended to install a local 2328 -# copy of MathJax from http://www.mathjax.org before deployment. 2329 - 2330 -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest 2331 - 2332 -# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension 2333 -# names that should be enabled during MathJax rendering. 2334 - 2335 -MATHJAX_EXTENSIONS = 2336 - 2337 -# When the SEARCHENGINE tag is enabled doxygen will generate a search box 2338 -# for the HTML output. The underlying search engine uses javascript 2339 -# and DHTML and should work on any modern browser. Note that when using 2340 -# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets 2341 -# (GENERATE_DOCSET) there is already a search function so this one should 2342 -# typically be disabled. For large projects the javascript based search engine 2343 -# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. 2344 - 2345 -SEARCHENGINE = NO 2346 - 2347 -# When the SERVER_BASED_SEARCH tag is enabled the search engine will be 2348 -# implemented using a web server instead of a web client using Javascript. 2349 -# There are two flavours of web server based search depending on the 2350 -# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for 2351 -# searching and an index file used by the script. When EXTERNAL_SEARCH is 2352 -# enabled the indexing and searching needs to be provided by external tools. 2353 -# See the manual for details. 2354 - 2355 -SERVER_BASED_SEARCH = NO 2356 - 2357 -# When EXTERNAL_SEARCH is enabled doxygen will no longer generate the PHP 2358 -# script for searching. Instead the search results are written to an XML file 2359 -# which needs to be processed by an external indexer. Doxygen will invoke an 2360 -# external search engine pointed to by the SEARCHENGINE_URL option to obtain 2361 -# the search results. Doxygen ships with an example indexer (doxyindexer) and 2362 -# search engine (doxysearch.cgi) which are based on the open source search engine 2363 -# library Xapian. See the manual for configuration details. 2364 - 2365 -EXTERNAL_SEARCH = NO 2366 - 2367 -# The SEARCHENGINE_URL should point to a search engine hosted by a web server 2368 -# which will returned the search results when EXTERNAL_SEARCH is enabled. 2369 -# Doxygen ships with an example search engine (doxysearch) which is based on 2370 -# the open source search engine library Xapian. See the manual for configuration 2371 -# details. 2372 - 2373 -SEARCHENGINE_URL = 2374 - 2375 -# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed 2376 -# search data is written to a file for indexing by an external tool. With the 2377 -# SEARCHDATA_FILE tag the name of this file can be specified. 2378 - 2379 -SEARCHDATA_FILE = searchdata.xml 2380 - 2381 -# When SERVER_BASED_SEARCH AND EXTERNAL_SEARCH are both enabled the 2382 -# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is 2383 -# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple 2384 -# projects and redirect the results back to the right project. 2385 - 2386 -EXTERNAL_SEARCH_ID = 2387 - 2388 -# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen 2389 -# projects other than the one defined by this configuration file, but that are 2390 -# all added to the same external search index. Each project needs to have a 2391 -# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id 2392 -# of to a relative location where the documentation can be found. 2393 -# The format is: EXTRA_SEARCH_MAPPINGS = id1=loc1 id2=loc2 ... 2394 - 2395 -EXTRA_SEARCH_MAPPINGS = 2396 - 2397 -#--------------------------------------------------------------------------- 2398 -# configuration options related to the LaTeX output 2399 -#--------------------------------------------------------------------------- 2400 - 2401 -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 2402 -# generate Latex output. 2403 - 2404 -GENERATE_LATEX = YES 2405 - 2406 -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 2407 -# If a relative path is entered the value of OUTPUT_DIRECTORY will be 2408 -# put in front of it. If left blank latex' will be used as the default path. 2409 - 2410 -LATEX_OUTPUT = latex 2411 - 2412 -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 2413 -# invoked. If left blank latex' will be used as the default command name. 2414 -# Note that when enabling USE_PDFLATEX this option is only used for 2415 -# generating bitmaps for formulas in the HTML output, but not in the 2416 -# Makefile that is written to the output directory. 2417 - 2418 -LATEX_CMD_NAME = latex 2419 - 2420 -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 2421 -# generate index for LaTeX. If left blank makeindex' will be used as the 2422 -# default command name. 2423 - 2424 -MAKEINDEX_CMD_NAME = makeindex 2425 - 2426 -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 2427 -# LaTeX documents. This may be useful for small projects and may help to 2428 -# save some trees in general. 2429 - 2430 -COMPACT_LATEX = YES 2431 - 2432 -# The PAPER_TYPE tag can be used to set the paper type that is used 2433 -# by the printer. Possible values are: a4, letter, legal and 2434 -# executive. If left blank a4wide will be used. 2435 - 2436 -PAPER_TYPE = a4 2437 - 2438 -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 2439 -# packages that should be included in the LaTeX output. 2440 - 2441 -EXTRA_PACKAGES = 2442 - 2443 -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 2444 -# the generated latex document. The header should contain everything until 2445 -# the first chapter. If it is left blank doxygen will generate a 2446 -# standard header. Notice: only use this tag if you know what you are doing! 2447 - 2448 -LATEX_HEADER = 2449 - 2450 -# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for 2451 -# the generated latex document. The footer should contain everything after 2452 -# the last chapter. If it is left blank doxygen will generate a 2453 -# standard footer. Notice: only use this tag if you know what you are doing! 2454 - 2455 -LATEX_FOOTER = 2456 - 2457 -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 2458 -# is prepared for conversion to pdf (using ps2pdf). The pdf file will 2459 -# contain links (just like the HTML output) instead of page references 2460 -# This makes the output suitable for online browsing using a pdf viewer. 2461 - 2462 -PDF_HYPERLINKS = YES 2463 - 2464 -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 2465 -# plain latex in the generated Makefile. Set this option to YES to get a 2466 -# higher quality PDF documentation. 2467 - 2468 -USE_PDFLATEX = YES 2469 - 2470 -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 2471 -# command to the generated LaTeX files. This will instruct LaTeX to keep 2472 -# running if errors occur, instead of asking the user for help. 2473 -# This option is also used when generating formulas in HTML. 2474 - 2475 -LATEX_BATCHMODE = NO 2476 - 2477 -# If LATEX_HIDE_INDICES is set to YES then doxygen will not 2478 -# include the index chapters (such as File Index, Compound Index, etc.) 2479 -# in the output. 2480 - 2481 -LATEX_HIDE_INDICES = NO 2482 - 2483 -# If LATEX_SOURCE_CODE is set to YES then doxygen will include 2484 -# source code with syntax highlighting in the LaTeX output. 2485 -# Note that which sources are shown also depends on other settings 2486 -# such as SOURCE_BROWSER. 2487 - 2488 -LATEX_SOURCE_CODE = NO 2489 - 2490 -# The LATEX_BIB_STYLE tag can be used to specify the style to use for the 2491 -# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See 2492 -# http://en.wikipedia.org/wiki/BibTeX for more info. 2493 - 2494 -LATEX_BIB_STYLE = plain 2495 - 2496 -#--------------------------------------------------------------------------- 2497 -# configuration options related to the RTF output 2498 -#--------------------------------------------------------------------------- 2499 - 2500 -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 2501 -# The RTF output is optimized for Word 97 and may not look very pretty with 2502 -# other RTF readers or editors. 2503 - 2504 -GENERATE_RTF = NO 2505 - 2506 -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 2507 -# If a relative path is entered the value of OUTPUT_DIRECTORY will be 2508 -# put in front of it. If left blank rtf' will be used as the default path. 2509 - 2510 -RTF_OUTPUT = rtf 2511 - 2512 -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 2513 -# RTF documents. This may be useful for small projects and may help to 2514 -# save some trees in general. 2515 - 2516 -COMPACT_RTF = NO 2517 - 2518 -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 2519 -# will contain hyperlink fields. The RTF file will 2520 -# contain links (just like the HTML output) instead of page references. 2521 -# This makes the output suitable for online browsing using WORD or other 2522 -# programs which support those fields. 2523 -# Note: wordpad (write) and others do not support links. 2524 - 2525 -RTF_HYPERLINKS = NO 2526 - 2527 -# Load style sheet definitions from file. Syntax is similar to doxygen's 2528 -# config file, i.e. a series of assignments. You only have to provide 2529 -# replacements, missing definitions are set to their default value. 2530 - 2531 -RTF_STYLESHEET_FILE = 2532 - 2533 -# Set optional variables used in the generation of an rtf document. 2534 -# Syntax is similar to doxygen's config file. 2535 - 2536 -RTF_EXTENSIONS_FILE = 2537 - 2538 -#--------------------------------------------------------------------------- 2539 -# configuration options related to the man page output 2540 -#--------------------------------------------------------------------------- 2541 - 2542 -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 2543 -# generate man pages 2544 - 2545 -GENERATE_MAN = YES 2546 - 2547 -# The MAN_OUTPUT tag is used to specify where the man pages will be put. 2548 -# If a relative path is entered the value of OUTPUT_DIRECTORY will be 2549 -# put in front of it. If left blank man' will be used as the default path. 2550 - 2551 -MAN_OUTPUT = man 2552 - 2553 -# The MAN_EXTENSION tag determines the extension that is added to 2554 -# the generated man pages (default is the subroutine's section .3) 2555 - 2556 -MAN_EXTENSION = .3 2557 - 2558 -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 2559 -# then it will generate one additional man file for each entity 2560 -# documented in the real man page(s). These additional files 2561 -# only source the real man page, but without them the man command 2562 -# would be unable to find the correct page. The default is NO. 2563 - 2564 -MAN_LINKS = NO 2565 - 2566 -#--------------------------------------------------------------------------- 2567 -# configuration options related to the XML output 2568 -#--------------------------------------------------------------------------- 2569 - 2570 -# If the GENERATE_XML tag is set to YES Doxygen will 2571 -# generate an XML file that captures the structure of 2572 -# the code including all documentation. 2573 - 2574 -GENERATE_XML = NO 2575 - 2576 -# The XML_OUTPUT tag is used to specify where the XML pages will be put. 2577 -# If a relative path is entered the value of OUTPUT_DIRECTORY will be 2578 -# put in front of it. If left blank xml' will be used as the default path. 2579 - 2580 -XML_OUTPUT = xml 2581 - 2582 -# The XML_SCHEMA tag can be used to specify an XML schema, 2583 -# which can be used by a validating XML parser to check the 2584 -# syntax of the XML files. 2585 - 2586 -XML_SCHEMA = 2587 - 2588 -# The XML_DTD tag can be used to specify an XML DTD, 2589 -# which can be used by a validating XML parser to check the 2590 -# syntax of the XML files. 2591 - 2592 -XML_DTD = 2593 - 2594 -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 2595 -# dump the program listings (including syntax highlighting 2596 -# and cross-referencing information) to the XML output. Note that 2597 -# enabling this will significantly increase the size of the XML output. 2598 - 2599 -XML_PROGRAMLISTING = YES 2600 - 2601 -#--------------------------------------------------------------------------- 2602 -# configuration options for the AutoGen Definitions output 2603 -#--------------------------------------------------------------------------- 2604 - 2605 -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 2606 -# generate an AutoGen Definitions (see autogen.sf.net) file 2607 -# that captures the structure of the code including all 2608 -# documentation. Note that this feature is still experimental 2609 -# and incomplete at the moment. 2610 - 2611 -GENERATE_AUTOGEN_DEF = NO 2612 - 2613 -#--------------------------------------------------------------------------- 2614 -# configuration options related to the Perl module output 2615 -#--------------------------------------------------------------------------- 2616 - 2617 -# If the GENERATE_PERLMOD tag is set to YES Doxygen will 2618 -# generate a Perl module file that captures the structure of 2619 -# the code including all documentation. Note that this 2620 -# feature is still experimental and incomplete at the 2621 -# moment. 2622 - 2623 -GENERATE_PERLMOD = NO 2624 - 2625 -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 2626 -# the necessary Makefile rules, Perl scripts and LaTeX code to be able 2627 -# to generate PDF and DVI output from the Perl module output. 2628 - 2629 -PERLMOD_LATEX = NO 2630 - 2631 -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 2632 -# nicely formatted so it can be parsed by a human reader. 2633 -# This is useful 2634 -# if you want to understand what is going on. 2635 -# On the other hand, if this 2636 -# tag is set to NO the size of the Perl module output will be much smaller 2637 -# and Perl will parse it just the same. 2638 - 2639 -PERLMOD_PRETTY = YES 2640 - 2641 -# The names of the make variables in the generated doxyrules.make file 2642 -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 2643 -# This is useful so different doxyrules.make files included by the same 2644 -# Makefile don't overwrite each other's variables. 2645 - 2646 -PERLMOD_MAKEVAR_PREFIX = 2647 - 2648 -#--------------------------------------------------------------------------- 2649 -# Configuration options related to the preprocessor 2650 -#--------------------------------------------------------------------------- 2651 - 2652 -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 2653 -# evaluate all C-preprocessor directives found in the sources and include 2654 -# files. 2655 - 2656 -ENABLE_PREPROCESSING = YES 2657 - 2658 -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 2659 -# names in the source code. If set to NO (the default) only conditional 2660 -# compilation will be performed. Macro expansion can be done in a controlled 2661 -# way by setting EXPAND_ONLY_PREDEF to YES. 2662 - 2663 -MACRO_EXPANSION = NO 2664 - 2665 -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 2666 -# then the macro expansion is limited to the macros specified with the 2667 -# PREDEFINED and EXPAND_AS_DEFINED tags. 2668 - 2669 -EXPAND_ONLY_PREDEF = NO 2670 - 2671 -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 2672 -# pointed to by INCLUDE_PATH will be searched when a #include is found. 2673 - 2674 -SEARCH_INCLUDES = YES 2675 - 2676 -# The INCLUDE_PATH tag can be used to specify one or more directories that 2677 -# contain include files that are not input files but should be processed by 2678 -# the preprocessor. 2679 - 2680 -INCLUDE_PATH = 2681 - 2682 -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 2683 -# patterns (like *.h and *.hpp) to filter out the header-files in the 2684 -# directories. If left blank, the patterns specified with FILE_PATTERNS will 2685 -# be used. 2686 - 2687 -INCLUDE_FILE_PATTERNS = 2688 - 2689 -# The PREDEFINED tag can be used to specify one or more macro names that 2690 -# are defined before the preprocessor is started (similar to the -D option of 2691 -# gcc). The argument of the tag is a list of macros of the form: name 2692 -# or name=definition (no spaces). If the definition and the = are 2693 -# omitted =1 is assumed. To prevent a macro definition from being 2694 -# undefined via #undef or recursively expanded use the := operator 2695 -# instead of the = operator. 2696 - 2697 -PREDEFINED = 2698 - 2699 -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 2700 -# this tag can be used to specify a list of macro names that should be expanded. 2701 -# The macro definition that is found in the sources will be used. 2702 -# Use the PREDEFINED tag if you want to use a different macro definition that 2703 -# overrules the definition found in the source code. 2704 - 2705 -EXPAND_AS_DEFINED = 2706 - 2707 -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 2708 -# doxygen's preprocessor will remove all references to function-like macros 2709 -# that are alone on a line, have an all uppercase name, and do not end with a 2710 -# semicolon, because these will confuse the parser if not removed. 2711 - 2712 -SKIP_FUNCTION_MACROS = YES 2713 - 2714 -#--------------------------------------------------------------------------- 2715 -# Configuration::additions related to external references 2716 -#--------------------------------------------------------------------------- 2717 - 2718 -# The TAGFILES option can be used to specify one or more tagfiles. For each 2719 -# tag file the location of the external documentation should be added. The 2720 -# format of a tag file without this location is as follows: 2721 -# 2722 -# TAGFILES = file1 file2 ... 2723 -# Adding location for the tag files is done as follows: 2724 -# 2725 -# TAGFILES = file1=loc1 "file2 = loc2" ... 2726 -# where "loc1" and "loc2" can be relative or absolute paths 2727 -# or URLs. Note that each tag file must have a unique name (where the name does 2728 -# NOT include the path). If a tag file is not located in the directory in which 2729 -# doxygen is run, you must also specify the path to the tagfile here. 2730 - 2731 -TAGFILES = 2732 - 2733 -# When a file name is specified after GENERATE_TAGFILE, doxygen will create 2734 -# a tag file that is based on the input files it reads. 2735 - 2736 -GENERATE_TAGFILE = 2737 - 2738 -# If the ALLEXTERNALS tag is set to YES all external classes will be listed 2739 -# in the class index. If set to NO only the inherited external classes 2740 -# will be listed. 2741 - 2742 -ALLEXTERNALS = NO 2743 - 2744 -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 2745 -# in the modules index. If set to NO, only the current project's groups will 2746 -# be listed. 2747 - 2748 -EXTERNAL_GROUPS = YES 2749 - 2750 -# The PERL_PATH should be the absolute path and name of the perl script 2751 -# interpreter (i.e. the result of which perl'). 2752 - 2753 -PERL_PATH = /usr/bin/perl 2754 - 2755 -#--------------------------------------------------------------------------- 2756 -# Configuration options related to the dot tool 2757 -#--------------------------------------------------------------------------- 2758 - 2759 -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 2760 -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 2761 -# or super classes. Setting the tag to NO turns the diagrams off. Note that 2762 -# this option also works with HAVE_DOT disabled, but it is recommended to 2763 -# install and use dot, since it yields more powerful graphs. 2764 - 2765 -CLASS_DIAGRAMS = YES 2766 - 2767 -# You can define message sequence charts within doxygen comments using the \msc 2768 -# command. Doxygen will then run the mscgen tool (see 2769 -# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the 2770 -# documentation. The MSCGEN_PATH tag allows you to specify the directory where 2771 -# the mscgen tool resides. If left empty the tool is assumed to be found in the 2772 -# default search path. 2773 - 2774 -MSCGEN_PATH = 2775 - 2776 -# If set to YES, the inheritance and collaboration graphs will hide 2777 -# inheritance and usage relations if the target is undocumented 2778 -# or is not a class. 2779 - 2780 -HIDE_UNDOC_RELATIONS = NO 2781 - 2782 -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 2783 -# available from the path. This tool is part of Graphviz, a graph visualization 2784 -# toolkit from AT&T and Lucent Bell Labs. The other options in this section 2785 -# have no effect if this option is set to NO (the default) 2786 - 2787 -HAVE_DOT = YES 2788 - 2789 -# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is 2790 -# allowed to run in parallel. When set to 0 (the default) doxygen will 2791 -# base this on the number of processors available in the system. You can set it 2792 -# explicitly to a value larger than 0 to get control over the balance 2793 -# between CPU load and processing speed. 2794 - 2795 -DOT_NUM_THREADS = 1 2796 - 2797 -# By default doxygen will use the Helvetica font for all dot files that 2798 -# doxygen generates. When you want a differently looking font you can specify 2799 -# the font name using DOT_FONTNAME. You need to make sure dot is able to find 2800 -# the font, which can be done by putting it in a standard location or by setting 2801 -# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the 2802 -# directory containing the font. 2803 - 2804 -DOT_FONTNAME = Helvetica 2805 - 2806 -# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. 2807 -# The default size is 10pt. 2808 - 2809 -DOT_FONTSIZE = 10 2810 - 2811 -# By default doxygen will tell dot to use the Helvetica font. 2812 -# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to 2813 -# set the path where dot can find it. 2814 - 2815 -DOT_FONTPATH = 2816 - 2817 -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 2818 -# will generate a graph for each documented class showing the direct and 2819 -# indirect inheritance relations. Setting this tag to YES will force the 2820 -# CLASS_DIAGRAMS tag to NO. 2821 - 2822 -CLASS_GRAPH = YES 2823 - 2824 -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 2825 -# will generate a graph for each documented class showing the direct and 2826 -# indirect implementation dependencies (inheritance, containment, and 2827 -# class references variables) of the class with other documented classes. 2828 - 2829 -COLLABORATION_GRAPH = YES 2830 - 2831 -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 2832 -# will generate a graph for groups, showing the direct groups dependencies 2833 - 2834 -GROUP_GRAPHS = YES 2835 - 2836 -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 2837 -# collaboration diagrams in a style similar to the OMG's Unified Modeling 2838 -# Language. 2839 - 2840 -UML_LOOK = YES 2841 - 2842 -# If the UML_LOOK tag is enabled, the fields and methods are shown inside 2843 -# the class node. If there are many fields or methods and many nodes the 2844 -# graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS 2845 -# threshold limits the number of items for each type to make the size more 2846 -# managable. Set this to 0 for no limit. Note that the threshold may be 2847 -# exceeded by 50% before the limit is enforced. 2848 - 2849 -UML_LIMIT_NUM_FIELDS = 10 2850 - 2851 -# If set to YES, the inheritance and collaboration graphs will show the 2852 -# relations between templates and their instances. 2853 - 2854 -TEMPLATE_RELATIONS = NO 2855 - 2856 -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 2857 -# tags are set to YES then doxygen will generate a graph for each documented 2858 -# file showing the direct and indirect include dependencies of the file with 2859 -# other documented files. 2860 - 2861 -INCLUDE_GRAPH = YES 2862 - 2863 -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 2864 -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 2865 -# documented header file showing the documented files that directly or 2866 -# indirectly include this file. 2867 - 2868 -INCLUDED_BY_GRAPH = YES 2869 - 2870 -# If the CALL_GRAPH and HAVE_DOT options are set to YES then 2871 -# doxygen will generate a call dependency graph for every global function 2872 -# or class method. Note that enabling this option will significantly increase 2873 -# the time of a run. So in most cases it will be better to enable call graphs 2874 -# for selected functions only using the \callgraph command. 2875 - 2876 -CALL_GRAPH = YES 2877 - 2878 -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then 2879 -# doxygen will generate a caller dependency graph for every global function 2880 -# or class method. Note that enabling this option will significantly increase 2881 -# the time of a run. So in most cases it will be better to enable caller 2882 -# graphs for selected functions only using the \callergraph command. 2883 - 2884 -CALLER_GRAPH = NO 2885 - 2886 -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 2887 -# will generate a graphical hierarchy of all classes instead of a textual one. 2888 - 2889 -GRAPHICAL_HIERARCHY = YES 2890 - 2891 -# If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES 2892 -# then doxygen will show the dependencies a directory has on other directories 2893 -# in a graphical way. The dependency relations are determined by the #include 2894 -# relations between the files in the directories. 2895 - 2896 -DIRECTORY_GRAPH = YES 2897 - 2898 -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 2899 -# generated by dot. Possible values are svg, png, jpg, or gif. 2900 -# If left blank png will be used. If you choose svg you need to set 2901 -# HTML_FILE_EXTENSION to xhtml in order to make the SVG files 2902 -# visible in IE 9+ (other browsers do not have this requirement). 2903 - 2904 -DOT_IMAGE_FORMAT = png 2905 - 2906 -# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to 2907 -# enable generation of interactive SVG images that allow zooming and panning. 2908 -# Note that this requires a modern browser other than Internet Explorer. 2909 -# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you 2910 -# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files 2911 -# visible. Older versions of IE do not have SVG support. 2912 - 2913 -INTERACTIVE_SVG = YES 2914 - 2915 -# The tag DOT_PATH can be used to specify the path where the dot tool can be 2916 -# found. If left blank, it is assumed the dot tool can be found in the path. 2917 - 2918 -DOT_PATH = 2919 - 2920 -# The DOTFILE_DIRS tag can be used to specify one or more directories that 2921 -# contain dot files that are included in the documentation (see the 2922 -# \dotfile command). 2923 - 2924 -DOTFILE_DIRS = 2925 - 2926 -# The MSCFILE_DIRS tag can be used to specify one or more directories that 2927 -# contain msc files that are included in the documentation (see the 2928 -# \mscfile command). 2929 - 2930 -MSCFILE_DIRS = 2931 - 2932 -# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 2933 -# nodes that will be shown in the graph. If the number of nodes in a graph 2934 -# becomes larger than this value, doxygen will truncate the graph, which is 2935 -# visualized by representing a node as a red box. Note that doxygen if the 2936 -# number of direct children of the root node in a graph is already larger than 2937 -# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note 2938 -# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. 2939 - 2940 -DOT_GRAPH_MAX_NODES = 50 2941 - 2942 -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 2943 -# graphs generated by dot. A depth value of 3 means that only nodes reachable 2944 -# from the root by following a path via at most 3 edges will be shown. Nodes 2945 -# that lay further from the root node will be omitted. Note that setting this 2946 -# option to 1 or 2 may greatly reduce the computation time needed for large 2947 -# code bases. Also note that the size of a graph can be further restricted by 2948 -# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. 2949 - 2950 -MAX_DOT_GRAPH_DEPTH = 0 2951 - 2952 -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 2953 -# background. This is disabled by default, because dot on Windows does not 2954 -# seem to support this out of the box. Warning: Depending on the platform used, 2955 -# enabling this option may lead to badly anti-aliased labels on the edges of 2956 -# a graph (i.e. they become hard to read). 2957 - 2958 -DOT_TRANSPARENT = YES 2959 - 2960 -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 2961 -# files in one run (i.e. multiple -o and -T options on the command line). This 2962 -# makes dot run faster, but since only newer versions of dot (>1.8.10) 2963 -# support this, this feature is disabled by default. 2964 - 2965 -DOT_MULTI_TARGETS = YES 2966 - 2967 -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 2968 -# generate a legend page explaining the meaning of the various boxes and 2969 -# arrows in the dot generated graphs. 2970 - 2971 -GENERATE_LEGEND = YES 2972 - 2973 -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 2974 -# remove the intermediate dot files that are used to generate 2975 -# the various graphs. 2976 - 2977 -DOT_CLEANUP = YES 2978 2979 === removed file 'include/CMakeLists.txt' 2980 --- include/CMakeLists.txt 2016-09-26 04:27:03 +0000 2981 +++ include/CMakeLists.txt 1970-01-01 00:00:00 +0000 2982 @@ -1,5 +0,0 @@ 2983 -install( 2984 - DIRECTORY onedrive 2985 - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ 2986 -) 2987 - 2988 2989 === added file 'include/onedrive/api/client.h' 2990 --- include/onedrive/api/client.h 1970-01-01 00:00:00 +0000 2991 +++ include/onedrive/api/client.h 2017-01-03 04:38:36 +0000 2992 @@ -0,0 +1,194 @@ 2993 +/* 2994 + * Copyright © 2016 Canonical Ltd. 2995 + * 2996 + * This program is free software: you can redistribute it and/or modify 2997 + * it under the terms of the GNU General Public License version 3 as 2998 + * published by the Free Software Foundation. 2999 + * 3000 + * This program is distributed in the hope that it will be useful, 3001 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 3002 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3003 + * GNU General Public License for more details. 3004 + * 3005 + * You should have received a copy of the GNU General Public License 3006 + * along with this program. If not, see . 3007 + * 3008 + * Authored by: Gary Wang 3009 + */ 3010 + 3011 +#ifndef ONEDRIVE_API_CLIENT_H_ 3012 +#define ONEDRIVE_API_CLIENT_H_ 3013 + 3014 +#include 3015 +#include 3016 +#include 3017 +#include 3018 +#include 3019 +#include 3020 +#include 3021 +#include 3022 +#include 3023 + 3024 +#include 3025 +#include 3026 + 3027 +namespace onedrive { 3028 +namespace api { 3029 + 3030 +class ClientPriv; 3031 + 3032 +/*! 3033 + \class Client 3034 + \brief Onedrive API provides developer to easily access login user's cloud contents stored on microsoft onedrive service, 3035 + such as musics, movie, docs, images, and so on. 3036 + 3037 + The API enable developers to 3038 + 3039 + retrieve authorized user cloud content list. 3040 + create, delete, move and update cloud resources. 3041 + query content infomation. 3042 + create an extranet link to share. 3043 + upload a local content to onedrive. 3044 + download a content from onedrive. 3045 + 3046 + 3047 + Also sync up manager will be running on the background when client is constructed. It handles over 3048 + local content upload and cloud item download. \sa syncmanager. 3049 + 3050 + \note Onedrive API covers cloud resourece access and content sync-up between local and cloud. It does not take 3051 + responsibility of account authentication. So before using onedrive APIs, developers need to call \sa set_access_token to 3052 + manually set a valid access_token or \sa refresh_token to fetch access token, 3053 + which is used to call onedrive APIs internally to pass through authentication. 3054 + */ 3055 + 3056 +class ONEDRIVE_API_DLL_PUBLIC Client { 3057 + 3058 + public: 3059 + typedef std::shared_ptr Ptr; 3060 + 3061 + typedef std::deque ResourceList; 3062 + 3063 + /*! 3064 + * \brief Constructs a onedrive Client object with \a request_timeout seconds. 3065 + * Meanwhile client launches sync-up manager to deal with task download and upload by default. 3066 + */ 3067 + Client(int request_timeout = 10); 3068 + 3069 + Client(const Client &) = delete; 3070 + 3071 + Client &operator=(const Client &) = delete; 3072 + 3073 + virtual ~Client(); 3074 + 3075 + /*! 3076 + * \brief Set \a access_token to authenticate all onedrive API calls with the bearer HTTP authorization scheme. 3077 + * The access token can be fetched through ubuntu sso services. 3078 + */ 3079 + void set_access_token(const std::string &access_token); 3080 + 3081 + /*! 3082 + * \brief Returns the login user's onedrive cloud storage information. 3083 + * \throw Onedrive specific exceptions or std::runtime_error if error occurs. 3084 + */ 3085 + StorageInfo::Ptr storage_info(); 3086 + 3087 + /*! 3088 + * \brief Returns the root folder object on onedrive. 3089 + * \throw Onedrive specific exceptions or std::runtime_error if error occurs. 3090 + * \sa cloud_content_list(), storage_info() 3091 + */ 3092 + CloudFolder::Ptr root_folder(); 3093 + 3094 + /*! 3095 + * \brief Returns the file list and next page token when listing all files from one specific folder \a folder_id. 3096 + * if the \a folder_id is empty, returns item list under root directory of onedrive. 3097 + * if the \a page_token is empty, queries contents from the first page. 3098 + * The fetched content count is 200 at most per call. 3099 + * \a page_token indicates the specific page index on the onedrive. 3100 + * \throw Onedrive specific exceptions or std::runtime_error if error occurs. 3101 + * \sa root_folder(), metadata(), search() 3102 + */ 3103 + std::tuple cloud_content_list(const std::string &folder_id = std::string(), 3104 + const std::string &page_token = std::string()); 3105 + 3106 + /*! 3107 + * \brief Returns the resouce item object if the content with a given \a content_id can be found on onedrive. 3108 + * otherwise return nullptr. 3109 + * \throw Onedrive specific exceptions or std::runtime_error if error occurs. 3110 + * \sa cloud_content_list() 3111 + */ 3112 + CloudResource::Ptr metadata(const std::string &content_id); 3113 + 3114 + /*! 3115 + * \brief Returns the folder item object if the folder with a given \a folder_name is created under a given \a folder_id folder, 3116 + * otherwise return nullptr. 3117 + * if the \a folder_id is empty, creates a folder item under root folder of onedrive. 3118 + * \throw Onedrive specific exceptions or std::runtime_error if error occurs. 3119 + * \sa delete_item(), move_item(), copy_item() 3120 + */ 3121 + CloudFolder::Ptr create_folder(const std::string &folder_name, 3122 + const std::string &folder_id = std::string()); 3123 + 3124 + /*! 3125 + * \brief Returns the cloud item list if there are available items that matches with the \a name under a given \a folder_id folder. 3126 + * if the \a folder_id is empty, searches items under root folder of onedrive. 3127 + * \throw Onedrive specific exceptions or std::runtime_error if error occurs. 3128 + * \sa metadata() 3129 + */ 3130 + Client::ResourceList search(const std::string &name, 3131 + const std::string &folder_id = std::string()); 3132 + 3133 + /*! 3134 + * \brief Returns true if content \a content_id is deleted, otherwise return false. 3135 + * \throw Onedrive specific exceptions or std::runtime_error if error occurs. 3136 + * \sa move_item(), rename_item(), copy_item() 3137 + */ 3138 + bool delete_item(const std::string &content_id); 3139 + 3140 + /*! 3141 + * \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. 3142 + * otherwise return nullptr. 3143 + * if \a name is empty, the same name will be used as the original. 3144 + * \throw Onedrive specific exceptions or std::runtime_error if error occurs. 3145 + * \sa rename_item(), delete_item(), copy_item() 3146 + */ 3147 + CloudResource::Ptr move_item(const std::string &item_id, 3148 + const std::string &folder_id, 3149 + const std::string &name = std::string()); 3150 + 3151 + /*! 3152 + * \brief Returns the resource item object if the item \a item_id is updated with a new \a name, otherwise return false. 3153 + * otherwise return nullptr. 3154 + * \throw Onedrive specific exceptions or std::runtime_error if error occurs. 3155 + * \sa delete_item(), copy_item(), move_item() 3156 + */ 3157 + CloudResource::Ptr rename_item(const std::string &folder_id, 3158 + const std::string &new_folder_name); 3159 + 3160 + /*! 3161 + * \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. 3162 + * if \a name is empty, the same name will be used as the original. 3163 + * \throw std::runtime_error if error occurs. 3164 + * \throw Onedrive specific exceptions or std::runtime_error if error occurs. 3165 + * \note we returns future object as onedrive returns an AsyncJobStatus resource that defines the current status of the copy job. 3166 + * see https://graph.microsoft.io/en-us/docs/api-reference/v1.0/api/item_copy for details. 3167 + */ 3168 + std::future copy_item(const std::string &item_id, 3169 + const std::string &folder_id, 3170 + const std::string &name); 3171 + 3172 + /*! 3173 + * \brief Returns the sync-up manager running on the background. 3174 + * sync-up manager scheduled tasks \sa start, pause, cancel for content upload and download. 3175 + */ 3176 + SyncManager::Ptr syncmanager() const; 3177 + 3178 + private: 3179 + std::unique_ptr p; 3180 + 3181 +}; 3182 + 3183 +} 3184 +} 3185 + 3186 +#endif // ONEDRIVE_API_CLIENT_H_ 3187 3188 === added file 'include/onedrive/api/cloudfolder.h' 3189 --- include/onedrive/api/cloudfolder.h 1970-01-01 00:00:00 +0000 3190 +++ include/onedrive/api/cloudfolder.h 2017-01-03 04:38:36 +0000 3191 @@ -0,0 +1,111 @@ 3192 +/* 3193 + * Copyright © 2016 Canonical Ltd. 3194 + * 3195 + * This program is free software: you can redistribute it and/or modify 3196 + * it under the terms of the GNU General Public License version 3 as 3197 + * published by the Free Software Foundation. 3198 + * 3199 + * This program is distributed in the hope that it will be useful, 3200 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 3201 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3202 + * GNU General Public License for more details. 3203 + * 3204 + * You should have received a copy of the GNU General Public License 3205 + * along with this program. If not, see . 3206 + * 3207 + * Authored by: Gary Wang 3208 + */ 3209 + 3210 +#ifndef ONEDRIVE_API_CLOUDFOLDER_H_ 3211 +#define ONEDRIVE_API_CLOUDFOLDER_H_ 3212 + 3213 +#include 3214 +#include 3215 + 3216 +namespace Json { 3217 + class Value; 3218 +} 3219 + 3220 +namespace onedrive { 3221 +namespace api { 3222 + 3223 +/*! 3224 + \class CloudFolder 3225 + \brief CloudFolder represents a folder object on onedrive. 3226 + */ 3227 + 3228 +class ONEDRIVE_API_DLL_PUBLIC CloudFolder : public CloudResource { 3229 + public: 3230 + typedef std::shared_ptr Ptr; 3231 + 3232 + ~CloudFolder(); 3233 + 3234 + /*! 3235 + * \brief Returns the unique id of cloud folder object. 3236 + */ 3237 + const std::string &id() const override; 3238 + 3239 + /*! 3240 + * \brief Returns the name of cloud folder object. 3241 + */ 3242 + const std::string &name() const override; 3243 + 3244 + /*! 3245 + * \brief Returns the datetime when folder was created. 3246 + */ 3247 + const std::string &created_date() const override; 3248 + 3249 + /*! 3250 + * \brief Returns the datetime when folder was updated. 3251 + */ 3252 + const std::string &updated_date() const override; 3253 + 3254 + /*! 3255 + * \brief Returns the download link on onedriver for a folder. 3256 + */ 3257 + const std::string &download_url() const override; 3258 + 3259 + /*! 3260 + * \brief Returns the unique id of the parent folder. 3261 + */ 3262 + const std::string &parent_folder_id() const override; 3263 + 3264 + /*! 3265 + * \brief Returns the etag of a folder object. 3266 + */ 3267 + const std::string &etag() const override; 3268 + 3269 + /*! 3270 + * \brief Returns the owner id of a folder object. 3271 + */ 3272 + const std::string &owner() const override; 3273 + 3274 + /*! 3275 + * \brief Returns resource property of an object. 3276 + * \sa CloudResource::Property 3277 + */ 3278 + CloudResource::Property property() const override; 3279 + 3280 + /*! 3281 + * \brief Returns the number of children items under this folder. 3282 + */ 3283 + int children_count() const; 3284 + 3285 + /*! 3286 + * \brief Returns the folder's thumbnails set. 3287 + */ 3288 + const thumbnail_set &thumbnails() const; 3289 + 3290 + private: 3291 + CloudFolder(const Json::Value &root); 3292 + 3293 + friend class ClientPriv; 3294 + 3295 + class Priv; 3296 + std::unique_ptr p; 3297 +}; 3298 + 3299 +} 3300 +} 3301 + 3302 +#endif // ONEDRIVE_API_CLOUDFOLDER_H_ 3303 3304 === added file 'include/onedrive/api/clouditem.h' 3305 --- include/onedrive/api/clouditem.h 1970-01-01 00:00:00 +0000 3306 +++ include/onedrive/api/clouditem.h 2017-01-03 04:38:36 +0000 3307 @@ -0,0 +1,127 @@ 3308 +/* 3309 + * Copyright © 2016 Canonical Ltd. 3310 + * 3311 + * This program is free software: you can redistribute it and/or modify 3312 + * it under the terms of the GNU General Public License version 3 as 3313 + * published by the Free Software Foundation. 3314 + * 3315 + * This program is distributed in the hope that it will be useful, 3316 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 3317 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3318 + * GNU General Public License for more details. 3319 + * 3320 + * You should have received a copy of the GNU General Public License 3321 + * along with this program. If not, see . 3322 + * 3323 + * Authored by: Gary Wang 3324 + */ 3325 + 3326 +#ifndef ONEDRIVE_API_CLOUDITEM_H_ 3327 +#define ONEDRIVE_API_CLOUDITEM_H_ 3328 + 3329 +#include 3330 +#include 3331 + 3332 +namespace Json { 3333 + class Value; 3334 +} 3335 + 3336 +namespace onedrive { 3337 +namespace api { 3338 + 3339 +/*! 3340 + \class CloudItem 3341 + \brief CloudItem represents a item object on onedrive. 3342 + */ 3343 + 3344 +class ONEDRIVE_API_DLL_PUBLIC CloudItem: public CloudResource { 3345 + public: 3346 + typedef std::shared_ptr Ptr; 3347 + 3348 + ~CloudItem(); 3349 + 3350 + /*! 3351 + * \brief Returns the unique id of cloud item object. 3352 + */ 3353 + const std::string &id() const override; 3354 + 3355 + /*! 3356 + * \brief Returns the name of cloud item object. 3357 + */ 3358 + const std::string &name() const override; 3359 + 3360 + /*! 3361 + * \brief Returns the datetime when item was created. 3362 + */ 3363 + const std::string &created_date() const override; 3364 + 3365 + /*! 3366 + * \brief Returns the datetime when item was updated. 3367 + */ 3368 + const std::string &updated_date() const override; 3369 + 3370 + /*! 3371 + * \brief Returns the item's download link. 3372 + */ 3373 + const std::string &download_url() const override; 3374 + 3375 + /*! 3376 + * \brief Returns the item' parent folder id. 3377 + */ 3378 + const std::string &parent_folder_id() const override; 3379 + 3380 + /*! 3381 + * \brief Returns the item' etag. 3382 + */ 3383 + const std::string &etag() const override; 3384 + 3385 + /*! 3386 + * \brief Returns the item' owner id. 3387 + */ 3388 + const std::string &owner() const override; 3389 + 3390 + /*! 3391 + * \brief Returns the item' resource type. 3392 + * \sa CloudResource::Property 3393 + */ 3394 + CloudResource::Property property() const override; 3395 + 3396 + /*! 3397 + * \brief Returns content size of the item in bytes. 3398 + */ 3399 + int64_t size() const; 3400 + 3401 + /*! 3402 + * \brief Returns the item's mimetype. 3403 + */ 3404 + const std::string &mimetype() const; 3405 + 3406 + /*! 3407 + * \brief Returns the item's file hash. 3408 + */ 3409 + const std::string &hash() const; 3410 + 3411 + /*! 3412 + * \brief Returns the item's file description. 3413 + */ 3414 + const std::string &description() const; 3415 + 3416 + /*! 3417 + * \brief Returns the item's thumbnails set. 3418 + */ 3419 + const thumbnail_set &thumbnails() const; 3420 + 3421 + private: 3422 + CloudItem(const Json::Value &root); 3423 + 3424 + friend class UploadTaskPriv; 3425 + friend class ClientPriv; 3426 + 3427 + class Priv; 3428 + std::unique_ptr p; 3429 +}; 3430 + 3431 +} 3432 +} 3433 + 3434 +#endif // ONEDRIVE_API_CLOUDITEM_H_ 3435 3436 === added file 'include/onedrive/api/cloudresource.h' 3437 --- include/onedrive/api/cloudresource.h 1970-01-01 00:00:00 +0000 3438 +++ include/onedrive/api/cloudresource.h 2017-01-03 04:38:36 +0000 3439 @@ -0,0 +1,75 @@ 3440 +/* 3441 + * Copyright © 2016 Canonical Ltd. 3442 + * 3443 + * This program is free software: you can redistribute it and/or modify 3444 + * it under the terms of the GNU General Public License version 3 as 3445 + * published by the Free Software Foundation. 3446 + * 3447 + * This program is distributed in the hope that it will be useful, 3448 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 3449 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3450 + * GNU General Public License for more details. 3451 + * 3452 + * You should have received a copy of the GNU General Public License 3453 + * along with this program. If not, see . 3454 + * 3455 + * Authored by: Gary Wang 3456 + */ 3457 + 3458 +#ifndef ONEDRIVE_API_CLOUDRESOURCE_H_ 3459 +#define ONEDRIVE_API_CLOUDRESOURCE_H_ 3460 + 3461 +#include 3462 +#include 3463 +#include 3464 + 3465 +namespace onedrive { 3466 +namespace api { 3467 + 3468 +/*! 3469 + \class CloudResource 3470 + \brief CloudResource is an abstract object that provides common interfaces for CloudItem and CloudFolder. 3471 + */ 3472 + 3473 +class CloudResource { 3474 + public: 3475 + typedef std::shared_ptr Ptr; 3476 + 3477 + typedef struct { 3478 + std::string large_url; 3479 + std::string medium_url; 3480 + std::string small_url; 3481 + } thumbnail_set; 3482 + 3483 + enum class Property { 3484 + Content, ///< content resource 3485 + Folder ///< folder resource 3486 + }; 3487 + 3488 + virtual ~CloudResource() = default; 3489 + 3490 + virtual const std::string& id() const = 0; 3491 + 3492 + virtual const std::string& name() const = 0; 3493 + 3494 + virtual const std::string& created_date() const = 0; 3495 + 3496 + virtual const std::string& updated_date() const = 0; 3497 + 3498 + virtual const std::string& download_url() const = 0; 3499 + 3500 + virtual const std::string& parent_folder_id() const = 0; 3501 + 3502 + virtual const std::string& etag() const = 0; 3503 + 3504 + virtual const std::string& owner() const = 0; 3505 + 3506 + virtual const thumbnail_set& thumbnails() const =0; 3507 + 3508 + virtual Property property() const = 0; 3509 +}; 3510 + 3511 +} 3512 +} 3513 + 3514 +#endif // ONEDRIVE_API_CLOUDRESOURCE_H_ 3515 3516 === added file 'include/onedrive/api/downloadtask.h' 3517 --- include/onedrive/api/downloadtask.h 1970-01-01 00:00:00 +0000 3518 +++ include/onedrive/api/downloadtask.h 2017-01-03 04:38:36 +0000 3519 @@ -0,0 +1,127 @@ 3520 +/* 3521 + * Copyright © 2016 Canonical Ltd. 3522 + * 3523 + * This program is free software: you can redistribute it and/or modify 3524 + * it under the terms of the GNU General Public License version 3 as 3525 + * published by the Free Software Foundation. 3526 + * 3527 + * This program is distributed in the hope that it will be useful, 3528 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 3529 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3530 + * GNU General Public License for more details. 3531 + * 3532 + * You should have received a copy of the GNU General Public License 3533 + * along with this program. If not, see . 3534 + * 3535 + * Authored by: Gary Wang 3536 + */ 3537 + 3538 +#ifndef ONEDRIVE_API_DOWNLOADTASK_H_ 3539 +#define ONEDRIVE_API_DOWNLOADTASK_H_ 3540 + 3541 +#include 3542 +#include 3543 +#include 3544 + 3545 +#include 3546 + 3547 +namespace onedrive { 3548 +namespace api { 3549 + 3550 +class TaskHandler; 3551 + 3552 +/*! 3553 + \struct DownloadRequest 3554 + \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. 3555 + \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. 3556 + \sa Task::Buffer_Callback 3557 + */ 3558 + 3559 +struct ONEDRIVE_API_DLL_PUBLIC DownloadRequest { 3560 + DownloadRequest(const std::string &id, 3561 + Task::Buffer_Callback write_callback = nullptr) 3562 + : item_id(id), 3563 + write_cb(write_callback) { 3564 + 3565 + } 3566 + std::string item_id; 3567 + Task::Buffer_Callback write_cb; 3568 +}; 3569 +typedef std::vector DownloadRequestList; 3570 + 3571 +class DownloadTaskPriv; 3572 +class SyncManagerPriv; 3573 + 3574 +/*! 3575 + \class DownloadTask 3576 + \brief DownloadTask is a task item that can be accessed from application layer to fetch 3577 + basic download item information, also it's used for content download by sync manager. 3578 + */ 3579 +class ONEDRIVE_API_DLL_PUBLIC DownloadTask : public Task { 3580 + public: 3581 + typedef std::shared_ptr Ptr; 3582 + 3583 + DownloadTask &operator=(const DownloadTask &) = delete; 3584 + 3585 + /*! 3586 + * \brief Returns the display name of cloud content on onedrive. 3587 + */ 3588 + const std::string &content_name() const override; 3589 + 3590 + /*! 3591 + * \brief Returns the cloud content local storage file path. 3592 + */ 3593 + const std::string &file_path() const override; 3594 + 3595 + /*! 3596 + * \brief Returns download url assigned by onedrive for this task. 3597 + * \note this url will be expried after a period of time. 3598 + */ 3599 + const std::string &task_url() const override; 3600 + 3601 + /*! 3602 + * \brief Returns the error code if an error occurs during content download. 3603 + */ 3604 + const std::string &error_code() const override; 3605 + 3606 + /*! 3607 + * \brief Returns the error string if an error occurs during content download. 3608 + */ 3609 + const std::string &error_message() const override; 3610 + 3611 + /*! 3612 + * \brief Returns current sync-up status for this task. 3613 + * \sa Task::TaskStatus 3614 + */ 3615 + Task::Status status() const override; 3616 + 3617 + /*! 3618 + * \brief Handler for download progress of a task. 3619 + * \sa Task::ProgressHandler 3620 + */ 3621 + Task::ProgressHandler &progress_changed() override; 3622 + 3623 + /*! 3624 + * \brief Handler for download status of a task. 3625 + * \sa Task::StatusHandler 3626 + */ 3627 + Task::StatusHandler &status_changed() override; 3628 + 3629 + /*! 3630 + * \brief cancel the task. 3631 + * \sa Task::StatusHandler 3632 + */ 3633 + void cancel() override; 3634 + 3635 + private: 3636 + DownloadTask(const std::shared_ptr &p); 3637 + 3638 + friend class SyncManagerPriv; 3639 + 3640 + std::shared_ptr p_; 3641 +}; 3642 + 3643 +} 3644 +} 3645 + 3646 +#endif // ONEDRIVE_API_DOWNLOADTASK_H_ 3647 3648 === added file 'include/onedrive/api/exceptions.h' 3649 --- include/onedrive/api/exceptions.h 1970-01-01 00:00:00 +0000 3650 +++ include/onedrive/api/exceptions.h 2017-01-03 04:38:36 +0000 3651 @@ -0,0 +1,97 @@ 3652 +/* 3653 + * Copyright © 2016 Canonical Ltd. 3654 + * 3655 + * This program is free software: you can redistribute it and/or modify 3656 + * it under the terms of the GNU General Public License version 3 as 3657 + * published by the Free Software Foundation. 3658 + * 3659 + * This program is distributed in the hope that it will be useful, 3660 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 3661 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3662 + * GNU General Public License for more details. 3663 + * 3664 + * You should have received a copy of the GNU General Public License 3665 + * along with this program. If not, see . 3666 + * 3667 + * Authored by: Gary Wang 3668 + */ 3669 + 3670 +#ifndef ONEDRIVE_API_EXCEPTIONS_H_ 3671 +#define ONEDRIVE_API_EXCEPTIONS_H_ 3672 + 3673 +#include 3674 + 3675 +#include 3676 + 3677 +namespace onedrive { 3678 +namespace api { 3679 + 3680 + /** 3681 + * \brief Indicates a content or a folder can not be found on onedrive. 3682 + */ 3683 + class ONEDRIVE_API_DLL_PUBLIC NonExistentException : public std::runtime_error { 3684 + public: 3685 + using runtime_error::runtime_error; 3686 + }; 3687 + 3688 + /** 3689 + * \brief Indicates a content or a folder already exists on one certain folder. 3690 + */ 3691 + class ONEDRIVE_API_DLL_PUBLIC ItemExistentException : public std::runtime_error { 3692 + public: 3693 + using runtime_error::runtime_error; 3694 + }; 3695 + 3696 + /** 3697 + * \brief User ran out of space on onedrive storage. 3698 + */ 3699 + class ONEDRIVE_API_DLL_PUBLIC OutofSpaceException : public std::runtime_error { 3700 + public: 3701 + using runtime_error::runtime_error; 3702 + }; 3703 + 3704 + /** 3705 + * \brief Indicates a timeout on HTTP requests. 3706 + */ 3707 + class ONEDRIVE_API_DLL_PUBLIC HttpTimeoutException : public std::runtime_error { 3708 + public: 3709 + using runtime_error::runtime_error; 3710 + }; 3711 + 3712 + /** 3713 + * \brief Indicates one or more http request parameters are invalid. 3714 + */ 3715 + class ONEDRIVE_API_DLL_PUBLIC ParameterInvalidException : public std::runtime_error { 3716 + public: 3717 + using runtime_error::runtime_error; 3718 + }; 3719 + 3720 + /** 3721 + * \brief Indicates access token is invalid or expired. 3722 + */ 3723 + class ONEDRIVE_API_DLL_PUBLIC CredentialException : public std::runtime_error { 3724 + public: 3725 + using runtime_error::runtime_error; 3726 + }; 3727 + 3728 + /** 3729 + * \brief Indicates The service is not available. Try the request again after a delay. 3730 + */ 3731 + class ONEDRIVE_API_DLL_PUBLIC ServiceNotAvailableException : public std::runtime_error { 3732 + public: 3733 + using runtime_error::runtime_error; 3734 + }; 3735 + 3736 + /** 3737 + * \brief Unknown exception. 3738 + */ 3739 + class ONEDRIVE_API_DLL_PUBLIC UnknownException : public std::runtime_error { 3740 + public: 3741 + using runtime_error::runtime_error; 3742 + }; 3743 + 3744 + 3745 +} 3746 +} 3747 + 3748 +#endif // ONEDRIVE_API_EXCEPTIONS_H_ 3749 3750 === added file 'include/onedrive/api/storageinfo.h' 3751 --- include/onedrive/api/storageinfo.h 1970-01-01 00:00:00 +0000 3752 +++ include/onedrive/api/storageinfo.h 2017-01-03 04:38:36 +0000 3753 @@ -0,0 +1,76 @@ 3754 +/* 3755 + * Copyright © 2016 Canonical Ltd. 3756 + * 3757 + * This program is free software: you can redistribute it and/or modify 3758 + * it under the terms of the GNU General Public License version 3 as 3759 + * published by the Free Software Foundation. 3760 + * 3761 + * This program is distributed in the hope that it will be useful, 3762 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 3763 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3764 + * GNU General Public License for more details. 3765 + * 3766 + * You should have received a copy of the GNU General Public License 3767 + * along with this program. If not, see . 3768 + * 3769 + * Authored by: Gary Wang 3770 + */ 3771 + 3772 +#ifndef ONEDRIVE_API_STORAGEINFO_H_ 3773 +#define ONEDRIVE_API_STORAGEINFO_H_ 3774 + 3775 +#include 3776 + 3777 +#include 3778 +#include 3779 + 3780 +namespace Json { 3781 +class Value; 3782 +} 3783 + 3784 +namespace onedrive { 3785 +namespace api { 3786 + 3787 +/*! 3788 + \class StorageInfo 3789 + \brief StorageInfo is a class that provides basic user's account and storage usage information on onedrive. 3790 + */ 3791 + 3792 +class ONEDRIVE_API_DLL_PUBLIC StorageInfo { 3793 + public: 3794 + typedef std::shared_ptr Ptr; 3795 + 3796 + ~StorageInfo(); 3797 + 3798 + /*! 3799 + * \brief Returns the authorized user's id. 3800 + */ 3801 + const std::string& id() const; 3802 + 3803 + /*! 3804 + * \brief Returns the authorized user's name. 3805 + */ 3806 + const std::string& name() const; 3807 + 3808 + /*! 3809 + * \brief Returns the used disk size of user cloud storage in bytes. 3810 + */ 3811 + int64_t used_disk_size() const; 3812 + 3813 + /*! 3814 + * \brief Returns the total disk size assigned by onedrive in bytes. 3815 + */ 3816 + int64_t total_disk_size() const; 3817 + private: 3818 + StorageInfo(const Json::Value& root); 3819 + 3820 + friend class ClientPriv; 3821 + class Priv; 3822 + 3823 + std::unique_ptr p; 3824 +}; 3825 + 3826 +} 3827 +} 3828 + 3829 +#endif // ONEDRIVE_API_STORAGEINFO_H_ 3830 3831 === added file 'include/onedrive/api/syncmanager.h' 3832 --- include/onedrive/api/syncmanager.h 1970-01-01 00:00:00 +0000 3833 +++ include/onedrive/api/syncmanager.h 2017-01-03 04:38:36 +0000 3834 @@ -0,0 +1,168 @@ 3835 +/* 3836 + * Copyright © 2016 Canonical Ltd. 3837 + * 3838 + * This program is free software: you can redistribute it and/or modify 3839 + * it under the terms of the GNU General Public License version 3 as 3840 + * published by the Free Software Foundation. 3841 + * 3842 + * This program is distributed in the hope that it will be useful, 3843 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 3844 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 3845 + * GNU General Public License for more details. 3846 + * 3847 + * You should have received a copy of the GNU General Public License 3848 + * along with this program. If not, see . 3849 + * 3850 + * Authored by: Gary Wang 3851 + */ 3852 + 3853 +#ifndef ONEDRIVE_API_SYNCMANAGER_H_ 3854 +#define ONEDRIVE_API_SYNCMANAGER_H_ 3855 + 3856 +#include 3857 +#include 3858 +#include 3859 +#include 3860 + 3861 +#include 3862 +#include 3863 + 3864 +namespace onedrive { 3865 +namespace api { 3866 + 3867 +class ClientPriv; 3868 +class SyncManagerPriv; 3869 + 3870 +/*! 3871 + \class SyncManager 3872 + \brief SyncManager handles all the requests to upload and download. 3873 + It's constructed around two threads for content synchronization. One for content upload to cloud, another for cloud item download to local. 3874 + Both thread are running asynchronously. 3875 + Calls \sa add_download_task() by passing a \a DownloadRequest for cloud content download, 3876 + Calls \sa add_upload_tasks() by passing a \a UploadRequest or \a UploadBufferCb for local content upload. 3877 + */ 3878 + 3879 +class ONEDRIVE_API_DLL_PUBLIC SyncManager { 3880 + public: 3881 + typedef std::shared_ptr Ptr; 3882 + 3883 + typedef TaskQueue DownloadList; 3884 + 3885 + typedef TaskQueue UploadList; 3886 + 3887 + typedef std::vector Stringlist; 3888 + 3889 + virtual ~SyncManager() = default; 3890 + 3891 + SyncManager(const SyncManager &) = delete; 3892 + 3893 + SyncManager &operator=(const SyncManager &) = delete; 3894 + 3895 + /*! 3896 + * \brief Starts to run download and upload tasks from sync-up thread. 3897 + * The tasks can be resumed by sync-up thread if sync manager is in paused or cancelled state. 3898 + * \sa pause(), cancel() 3899 + */ 3900 + void start(); 3901 + 3902 + /*! 3903 + * \brief Cancels all download andupload tasks from sync-up thread if sync manager is running. 3904 + * \note The cancelled download or upload tasks can not be resumed by sync-up thread. 3905 + * \sa start(), pause() 3906 + */ 3907 + void cancel(); 3908 + 3909 + /*! 3910 + * \brief Pauses download and upload task from sync-up thread if sync manager is running. 3911 + * Sync-up thread can resume previous paused tasks by calling \sa start(). 3912 + * \sa start(), cancel() 3913 + */ 3914 + void pause(); 3915 + 3916 + /*! 3917 + * \brief Pushes the download request item \a buffer_cb_item into download queue and add the download task into download queue. 3918 + * Each download buffer consists of the following fields 3919 + * - content_id (string) 3920 + * The id of content on onedrive. 3921 + * - write_cb (std::function) 3922 + * buffer writing callback function. 3923 + * The buffer area pointed at by the pointer \a dest should be filled up with at most \a buf_size number of bytes. 3924 + * \return a download task item that is pushed in sync-up manager. 3925 + * \throw onedrive specific exceptions or std::runtime_error if error occurs. 3926 + * \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. 3927 + * \sa add_download_tasks(), DownloadTask 3928 + */ 3929 + DownloadTask::Ptr add_download_task(const DownloadRequest &request_item); 3930 + 3931 + /*! 3932 + * \brief Pushes the upload request item \a reqeust_item to sync manager and add the upload task into upload queue. 3933 + * A upload request consists of the following fields 3934 + * - file_path (string) 3935 + * local file path. 3936 + * - folder_id (string) 3937 + * onedrive folder id which stores content in uploads folder. 3938 + * - content_name (string) 3939 + * uploaded content name. 3940 + * - conflict_behavior (enum) 3941 + * name conflict behavior 3942 + * If content_name is empty, local file name will be used as a content name displayed on onedrive. 3943 + * If folder_id is empty, content will be uploaded into root folder. 3944 + * \return a upload task item that is pushed in sync-up manager. 3945 + * \throw onedrive specific exceptions or std::runtime_error if error occurs. 3946 + * \note A file name can not contain any of following characters: 3947 + * '\', '/', ':', '*', '?', '"', '<', '>', '|' 3948 + * \note Sync manager will detect if the uploading file is already existing on cloud, 3949 + * if so, it simply sets the status of upload task completed to avoid duplicate upload. 3950 + * \sa add_download_tasks(), UploadRequest, UploadTask, 3951 + */ 3952 + UploadTask::Ptr add_upload_task(const UploadRequest &reqeust_item); 3953 + 3954 + /*! 3955 + * \brief Pushes the upload callback item \a buffer_cb to sync manager and add the upload task into upload queue. 3956 + * A upload buffer consists of the following fields 3957 + * - read_cb (std::function) 3958 + * buffer reading callback function. 3959 + * The buffer area pointed at by the pointer \a dest should be filled up with at most \a buf_size number of bytes. 3960 + * - total_size (size_t) 3961 + * total size of data buffers. 3962 + * - folder_id (string) 3963 + * onedrive folder id which stores content in uploads folder. 3964 + * - content_name (string) 3965 + * uploaded content name, should not be empty. 3966 + * - conflict_behavior (enum) 3967 + * name conflict behavior 3968 + * If folder_id is empty, content will be uploaded into root folder. 3969 + * \return a upload task item that are pushed in sync-up manager. 3970 + * \throw onedrive specific exception or std::runtime_error if error occurs. 3971 + * \note A file name can not contain any of following characters: 3972 + * '\', '/', ':', '*', '?', '"', '<', '>', '|' 3973 + * \sa add_download_tasks(), UploadRequest, UploadTask, 3974 + */ 3975 + UploadTask::Ptr add_upload_task(const UploadBufferCb &buffer_cb); 3976 + 3977 + /*! 3978 + * \brief Returns the download task list hold by sync up manager. 3979 + * Each item in the list contains basic information of associated task. 3980 + * \sa upload_queue(), DownloadTask 3981 + */ 3982 + DownloadList download_queue(); 3983 + 3984 + /*! 3985 + * \brief Returns the upload task list hold by sync up manager. 3986 + * Each item in the list contains basic information of associated task. 3987 + * \sa download_queue(), UploadTask 3988 + */ 3989 + UploadList upload_queue(); 3990 + 3991 + private: 3992 + SyncManager(ClientPriv *client_priv); 3993 + 3994 + friend class ClientPriv; 3995 + 3996 + std::unique_ptr p_; 3997 +}; 3998 + 3999 +} 4000 +} 4001 + 4002 +#endif // ONEDRIVE_API_SYNCMANAGER_H_ 4003 4004 === added file 'include/onedrive/api/task.h' 4005 --- include/onedrive/api/task.h 1970-01-01 00:00:00 +0000 4006 +++ include/onedrive/api/task.h 2017-01-03 04:38:36 +0000 4007 @@ -0,0 +1,127 @@ 4008 +/* 4009 + * Copyright © 2016 Canonical Ltd. 4010 + * 4011 + * This program is free software: you can redistribute it and/or modify 4012 + * it under the terms of the GNU General Public License version 3 as 4013 + * published by the Free Software Foundation. 4014 + * 4015 + * This program is distributed in the hope that it will be useful, 4016 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 4017 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 4018 + * GNU General Public License for more details. 4019 + * 4020 + * You should have received a copy of the GNU General Public License 4021 + * along with this program. If not, see . 4022 + * 4023 + * Authored by: Gary Wang 4024 + */ 4025 + 4026 +#ifndef ONEDRIVE_API_TASK_H_ 4027 +#define ONEDRIVE_API_TASK_H_ 4028 + 4029 +#include 4030 +#include 4031 +#include 4032 + 4033 +namespace onedrive { 4034 +namespace api { 4035 + 4036 +/*! 4037 + \class Task 4038 + \brief Task is an abstract class that defines common interfaces for upload and download task. 4039 + */ 4040 + 4041 +class ONEDRIVE_API_DLL_PUBLIC Task { 4042 + public: 4043 + 4044 + /*! 4045 + * \brief job chunk size. 4046 + */ 4047 + enum { 4048 + CHUNK_SIZE = 1024 * 1024 * 10 4049 + }; 4050 + 4051 + /*! 4052 + * \brief The Status enum indicates current status of this task. 4053 + */ 4054 + enum class Status { 4055 + Unstart, ///< Task is in queue and sync manager does not run this task yet. 4056 + Running, ///< Task is being processed by sync manager. 4057 + Cancelled, ///< Task is in cancelled status, \sa Client::cancel_sync(). 4058 + Paused, ///< Task is in paused status, \sa Client::pause_sync(). 4059 + Broken, ///< Task is broken when sync manager failed to download/upload a task after several times trying. 4060 + Complete, ///< Task is completed. 4061 + }; 4062 + 4063 + /*! 4064 + * \brief The name conflict enum which can be specified to decide the file name conflict behavior when uploading a content on onedrive. 4065 + * The default name conflict behavior is NameConflictBehavior::Replace. 4066 + */ 4067 + enum class NameConflictBehavior { 4068 + Fail, /// ProgressHandler; 4074 + 4075 + typedef std::function StatusHandler; 4076 + 4077 + typedef std::function Buffer_Callback; 4078 + 4079 + virtual ~Task() = default; 4080 + 4081 + /*! 4082 + * \brief Returns the display name of cloud content on onedrive. 4083 + */ 4084 + virtual const std::string& content_name() const = 0; 4085 + 4086 + /*! 4087 + * \brief Returns the cloud content local storage file path. 4088 + */ 4089 + virtual const std::string& file_path() const = 0; 4090 + 4091 + /*! 4092 + * \brief Returns the error code if an error occurs during task running. 4093 + */ 4094 + virtual const std::string& error_code() const = 0; 4095 + 4096 + /*! 4097 + * \brief Returns the error string if an error occurs during task running. 4098 + */ 4099 + virtual const std::string& error_message() const = 0; 4100 + 4101 + /*! 4102 + * \brief Returns the task url. 4103 + * \note the url will be expried after a period of time. 4104 + */ 4105 + virtual const std::string& task_url() const = 0; 4106 + 4107 + /*! 4108 + * \brief Returns current download or upload item sync-up status. 4109 + */ 4110 + virtual Task::Status status() const = 0; 4111 + 4112 + /*! 4113 + * \brief Handler for download or upload progress of a task. 4114 + * \sa Task::ProgressHandler 4115 + */ 4116 + virtual Task::ProgressHandler& progress_changed() = 0; 4117 + 4118 + /*! 4119 + * \brief Handler for download or upload progress of a task. 4120 + * \sa Task::StatusHandler 4121 + */ 4122 + virtual Task::StatusHandler& status_changed() = 0; 4123 + 4124 + /*! 4125 + * \brief Cancel the task. 4126 + * \sa Task::StatusHandler 4127 + */ 4128 + virtual void cancel() = 0; 4129 +}; 4130 + 4131 +} 4132 +} 4133 + 4134 +#endif // ONEDRIVE_API_TASK_H_ 4135 4136 === added file 'include/onedrive/api/taskqueue.h' 4137 --- include/onedrive/api/taskqueue.h 1970-01-01 00:00:00 +0000 4138 +++ include/onedrive/api/taskqueue.h 2017-01-03 04:38:36 +0000 4139 @@ -0,0 +1,132 @@ 4140 +/* 4141 + * Copyright © 2016 Canonical Ltd. 4142 + * 4143 + * This program is free software: you can redistribute it and/or modify 4144 + * it under the terms of the GNU General Public License version 3 as 4145 + * published by the Free Software Foundation. 4146 + * 4147 + * This program is distributed in the hope that it will be useful, 4148 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 4149 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 4150 + * GNU General Public License for more details. 4151 + * 4152 + * You should have received a copy of the GNU General Public License 4153 + * along with this program. If not, see . 4154 + * 4155 + * Authored by: Gary Wang 4156 + */ 4157 + 4158 +#ifndef ONEDRIVE_API_TASKQUEUE_H_ 4159 +#define ONEDRIVE_API_TASKQUEUE_H_ 4160 + 4161 +#include 4162 +#include 4163 +#include 4164 + 4165 +namespace onedrive { 4166 +namespace api { 4167 + 4168 +/*! 4169 + \class TaskQueue 4170 + \brief A thread-safe deque template. 4171 + */ 4172 +template> 4173 +class TaskQueue { 4174 + public: 4175 + typedef std::shared_ptr Ptr; 4176 + typedef typename Container::size_type size_type; 4177 + typedef typename Container::const_iterator const_iterator; 4178 + 4179 + TaskQueue() = default; 4180 + 4181 + virtual ~TaskQueue() = default; 4182 + 4183 + TaskQueue(TaskQueue&& queue) { 4184 + std::lock_guard lock(mutex_); 4185 + tasks_ = std::move(queue.tasks_); 4186 + } 4187 + 4188 + TaskQueue(const TaskQueue& queue) { 4189 + std::lock_guard lock(mutex_); 4190 + tasks_ = queue.tasks_; 4191 + } 4192 + 4193 + TaskQueue& operator= (const TaskQueue& queue) { 4194 + if (this != &queue) { 4195 + std::lock_guard lock1(mutex_); 4196 + std::lock_guard lock2(queue.mutex_); 4197 + tasks_ = queue.tasks_; 4198 + } 4199 + 4200 + return *this; 4201 + } 4202 + 4203 + typename Container::iterator begin() { 4204 + std::lock_guard lock(mutex_); 4205 + return tasks_.begin(); 4206 + } 4207 + 4208 + typename Container::iterator end() { 4209 + std::lock_guard lock(mutex_); 4210 + return tasks_.end(); 4211 + } 4212 + 4213 + typename Container::iterator cbegin() const { 4214 + std::lock_guard lock(mutex_); 4215 + return tasks_.cbegin(); 4216 + } 4217 + 4218 + typename Container::iterator cend() const { 4219 + std::lock_guard lock(mutex_); 4220 + return tasks_.cend(); 4221 + } 4222 + 4223 + size_type size() const { 4224 + std::lock_guard lock(mutex_); 4225 + return tasks_.size(); 4226 + } 4227 + 4228 + bool empty() const { 4229 + std::lock_guard lock(mutex_); 4230 + return tasks_.empty(); 4231 + } 4232 + 4233 + void push(const T& task) { 4234 + std::lock_guard lock(mutex_); 4235 + tasks_.push_back(task); 4236 + } 4237 + 4238 + void push(const TaskQueue& queue) { 4239 + std::lock_guard lock(mutex_); 4240 + for (const T& task : queue.tasks_) { 4241 + tasks_.push_back(task); 4242 + } 4243 + } 4244 + 4245 + bool try_pop(T& task) { 4246 + std::lock_guard lock(mutex_); 4247 + 4248 + if (tasks_.empty()) { 4249 + return false; 4250 + } 4251 + 4252 + task = tasks_.front(); 4253 + tasks_.pop_front(); 4254 + return true; 4255 + } 4256 + 4257 + const T& operator[](int index) const { 4258 + std::lock_guard lock(mutex_); 4259 + return tasks_[index]; 4260 + } 4261 + 4262 + private: 4263 + Container tasks_; 4264 + 4265 + mutable std::mutex mutex_; 4266 +}; 4267 + 4268 +} 4269 +} 4270 + 4271 +#endif // ONEDRIVE_API_TASKQUEUE_H_ 4272 4273 === added file 'include/onedrive/api/uploadtask.h' 4274 --- include/onedrive/api/uploadtask.h 1970-01-01 00:00:00 +0000 4275 +++ include/onedrive/api/uploadtask.h 2017-01-03 04:38:36 +0000 4276 @@ -0,0 +1,171 @@ 4277 +/* 4278 + * Copyright © 2016 Canonical Ltd. 4279 + * 4280 + * This program is free software: you can redistribute it and/or modify 4281 + * it under the terms of the GNU General Public License version 3 as 4282 + * published by the Free Software Foundation. 4283 + * 4284 + * This program is distributed in the hope that it will be useful, 4285 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 4286 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 4287 + * GNU General Public License for more details. 4288 + * 4289 + * You should have received a copy of the GNU General Public License 4290 + * along with this program. If not, see . 4291 + * 4292 + * Authored by: Gary Wang 4293 + */ 4294 + 4295 +#ifndef ONEDRIVE_API_UPLOADTASK_H_ 4296 +#define ONEDRIVE_API_UPLOADTASK_H_ 4297 + 4298 +#include 4299 +#include 4300 + 4301 +#include 4302 +#include 4303 + 4304 +namespace Json { 4305 +class Value; 4306 +} 4307 + 4308 +namespace onedrive { 4309 +namespace api { 4310 + 4311 +class TaskHandler; 4312 + 4313 +/*! 4314 + \struct UploadRequest 4315 + \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. 4316 + \sa Task::NameConflictBehavior 4317 + */ 4318 +struct ONEDRIVE_API_DLL_PUBLIC UploadRequest { 4319 + UploadRequest(const std::string &path, 4320 + const std::string &parent_folder_id, 4321 + const std::string &upload_file_name, 4322 + Task::NameConflictBehavior conflict_name_behavior = Task::NameConflictBehavior::Replace) 4323 + : file_path(path), 4324 + folder_id(parent_folder_id), 4325 + content_name(upload_file_name), 4326 + conflict_behavior(conflict_name_behavior) { 4327 + } 4328 + 4329 + std::string file_path; 4330 + std::string folder_id; 4331 + std::string content_name; 4332 + Task::NameConflictBehavior conflict_behavior; 4333 +}; 4334 +typedef std::vector UploadRequestList; 4335 + 4336 +/*! 4337 + \struct UploadBufferCb 4338 + \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. 4339 + \sa Task::NameConflictBehavior, Task::Buffer_Callback 4340 +*/ 4341 +struct ONEDRIVE_API_DLL_PUBLIC UploadBufferCb { 4342 + UploadBufferCb(const Task::Buffer_Callback read_callback, 4343 + size_t total_buffer_size, 4344 + const std::string &parent_folder_id, 4345 + const std::string &upload_file_name, 4346 + Task::NameConflictBehavior behavior = Task::NameConflictBehavior::Replace) 4347 + : read_cb(read_callback), 4348 + total_size(total_buffer_size), 4349 + folder_id(parent_folder_id), 4350 + content_name(upload_file_name), 4351 + conflict_behavior(behavior) { 4352 + } 4353 + 4354 + Task::Buffer_Callback read_cb; 4355 + size_t total_size; 4356 + std::string folder_id; 4357 + std::string content_name; 4358 + Task::NameConflictBehavior conflict_behavior = Task::NameConflictBehavior::Replace; 4359 +}; 4360 +typedef std::vector UploadBufferCbList; 4361 + 4362 +class UploadTaskPriv; 4363 +class CloudItem; 4364 + 4365 +/*! 4366 + \class UploadTask 4367 + \brief UploadTask is a task item that can be accessed from application layer to fetch 4368 + basic upload item information, also it's used for content upload by sync manager. 4369 + */ 4370 +class ONEDRIVE_API_DLL_PUBLIC UploadTask : public Task { 4371 + public: 4372 + typedef std::shared_ptr Ptr; 4373 + 4374 + UploadTask &operator=(const UploadTask &) = delete; 4375 + 4376 + /*! 4377 + * \brief Returns the display name of local content. 4378 + */ 4379 + const std::string &content_name() const override; 4380 + 4381 + /*! 4382 + * \brief Returns the uploaded local content file path. 4383 + */ 4384 + const std::string &file_path() const override; 4385 + 4386 + /*! 4387 + * \brief Returns the upload session url for this task. 4388 + * \note this url will be expried after a period of time. 4389 + */ 4390 + const std::string &task_url() const override; 4391 + 4392 + /*! 4393 + * \brief Returns the error code if an error occurs during content uploading. 4394 + */ 4395 + const std::string &error_code() const override; 4396 + 4397 + /*! 4398 + * \brief Returns the error string if an error occurs during content uploading. 4399 + */ 4400 + const std::string &error_message() const override; 4401 + 4402 + /*! 4403 + * \brief Returns current sync-up status for this task. 4404 + */ 4405 + Task::Status status() const override; 4406 + 4407 + /*! 4408 + * \brief Handler for upload progress of a task. 4409 + * \sa Task::ProgressHandler 4410 + */ 4411 + Task::ProgressHandler &progress_changed() override; 4412 + 4413 + /*! 4414 + * \brief Handler for upload status of a task. 4415 + * \sa Task::StatusHandler 4416 + */ 4417 + Task::StatusHandler &status_changed() override; 4418 + 4419 + /*! 4420 + * \brief Returns the cloud item object on ondrive associated with the uploaded content. 4421 + * \note Returns nullptr if task failed to upload regarding content on onedrive. 4422 + */ 4423 + std::shared_ptr upload_item() const; 4424 + 4425 + /*! 4426 + * \brief cancel the task. 4427 + * \sa Task::StatusHandler 4428 + */ 4429 + void cancel() override; 4430 + 4431 + /*! 4432 + * \brief Returns file size of upload content. 4433 + */ 4434 + size_t file_size() const; 4435 + 4436 + private: 4437 + UploadTask(std::shared_ptr p); 4438 + 4439 + friend class SyncManagerPriv; 4440 + 4441 + std::shared_ptr p_; 4442 +}; 4443 + 4444 +} 4445 +} 4446 + 4447 +#endif // ONEDRIVE_API_UPLOADTASK_H_ 4448 4449 === added file 'include/onedrive/api/visibility.h' 4450 --- include/onedrive/api/visibility.h 1970-01-01 00:00:00 +0000 4451 +++ include/onedrive/api/visibility.h 2017-01-03 04:38:36 +0000 4452 @@ -0,0 +1,30 @@ 4453 +/* 4454 + * Copyright (C) 2016 Canonical, Ltd. 4455 + * 4456 + * This program is free software: you can redistribute it and/or modify 4457 + * it under the terms of the GNU General Public License version 3 as 4458 + * published by the Free Software Foundation. 4459 + * 4460 + * This program is distributed in the hope that it will be useful, 4461 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 4462 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 4463 + * GNU General Public License for more details. 4464 + * 4465 + * You should have received a copy of the GNU General Public License 4466 + * along with this program. If not, see . 4467 + * 4468 + * Author: Gary Wang 4469 + */ 4470 + 4471 +#ifndef ONEDRIVE_API_VISIBILITY_H_ 4472 +#define ONEDRIVE_API_VISIBILITY_H_ 4473 + 4474 +#if __GNUC__ >= 4 4475 +#define ONEDRIVE_API_DLL_PUBLIC __attribute__ ((visibility ("default"))) 4476 +#define ONEDRIVE_API_DLL_LOCAL __attribute__ ((visibility ("hidden"))) 4477 +#else 4478 +#define ONEDRIVE_API_DLL_PUBLIC 4479 +#define ONEDRIVE_API_DLL_LOCAL 4480 +#endif 4481 + 4482 +#endif // ONEDRIVE_API_VISIBILITY_H_ 4483 4484 === modified file 'provider/CMakeLists.txt' 4485 --- provider/CMakeLists.txt 2016-09-26 04:27:03 +0000 4486 +++ provider/CMakeLists.txt 2017-01-03 04:38:36 +0000 4487 @@ -0,0 +1,56 @@ 4488 +install( 4489 + FILES storage-provider-onedrive.service 4490 + DESTINATION${CMAKE_INSTALL_DATADIR}/accounts/services 4491 +) 4492 + 4493 +install( 4494 + FILES storage-provider-onedrive.application 4495 + DESTINATION ${CMAKE_INSTALL_DATADIR}/accounts/applications 4496 +) 4497 + 4498 +install( 4499 + FILES storage-provider-onedrive.desktop 4500 + DESTINATION${CMAKE_INSTALL_DATADIR}/applications 4501 +) 4502 + 4503 +find_package(PkgConfig REQUIRED) 4504 +find_package(Boost COMPONENTS filesystem system thread REQUIRED) 4505 + 4506 +pkg_check_modules(STORAGE_FRAMEWORK_PROVIDER storage-framework-provider-1>=0.2 REQUIRED) 4507 + 4508 +include_directories(${CMAKE_CURRENT_BINARY_DIR}${STORAGE_FRAMEWORK_PROVIDER_INCLUDE_DIRS}) 4509 + 4510 +add_definitions(-DBOOST_THREAD_VERSION=4) 4511 + 4512 +add_library(onedrive-provider-static STATIC onedriveprovider.cpp) 4513 + 4514 +add_executable(onedrive-provider-bin main.cpp onedriveprovider.cpp) 4515 + 4516 +target_link_libraries( 4517 + onedrive-provider-bin 4518 + 4519 + onedrive-provider-static 4520 + onedrive-provider-lib 4521 + 4522 + ${Boost_LIBRARIES} 4523 +${STORAGE_FRAMEWORK_PROVIDER_LDFLAGS} 4524 +) 4525 + 4526 +SET_TARGET_PROPERTIES(onedrive-provider-bin 4527 + PROPERTIES OUTPUT_NAME onedrive-provider 4528 +) 4529 + 4530 +install( 4531 + TARGETS onedrive-provider-bin 4532 + RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME} 4533 +) 4534 + 4535 +configure_file( 4536 + com.canonical.StorageFramework.Provider.OnedriveProvider.service.in 4537 + com.canonical.StorageFramework.Provider.OnedriveProvider.service 4538 +) 4539 + 4540 +install( 4541 + FILES ${CMAKE_CURRENT_BINARY_DIR}/com.canonical.StorageFramework.Provider.OnedriveProvider.service 4542 + DESTINATION${CMAKE_INSTALL_DATADIR}/dbus-1/services 4543 +) 4544 4545 === added file 'provider/com.canonical.StorageFramework.Provider.OnedriveProvider.service.in' 4546 --- provider/com.canonical.StorageFramework.Provider.OnedriveProvider.service.in 1970-01-01 00:00:00 +0000 4547 +++ provider/com.canonical.StorageFramework.Provider.OnedriveProvider.service.in 2017-01-03 04:38:36 +0000 4548 @@ -0,0 +1,3 @@ 4549 +[D-BUS Service] 4550 +Name=com.canonical.StorageFramework.Provider.OnedriveProvider 4551 +Exec=@CMAKE_INSTALL_FULL_LIBDIR@/@PROJECT_NAME@/onedrive-provider 4552 4553 === added file 'provider/main.cpp' 4554 --- provider/main.cpp 1970-01-01 00:00:00 +0000 4555 +++ provider/main.cpp 2017-01-03 04:38:36 +0000 4556 @@ -0,0 +1,23 @@ 4557 +#include "onedriveprovider.h" 4558 +#include 4559 +#include 4560 + 4561 +using namespace std; 4562 +using namespace unity::storage::provider; 4563 + 4564 +int main(int argc, char **argv) 4565 +{ 4566 + signal(SIGPIPE, SIG_IGN); 4567 + 4568 + const string bus_name = "com.canonical.StorageFramework.Provider.OnedriveProvider"; 4569 + string account_service_id = "storage-provider-onedrive"; 4570 + if (argc > 1) 4571 + { 4572 + account_service_id = argv[1]; 4573 + } 4574 + 4575 + Server server(bus_name, account_service_id); 4576 + server.init(argc, argv); 4577 + server.run(); 4578 +} 4579 + 4580 4581 === added file 'provider/onedriveprovider.cpp' 4582 --- provider/onedriveprovider.cpp 1970-01-01 00:00:00 +0000 4583 +++ provider/onedriveprovider.cpp 2017-01-03 04:38:36 +0000 4584 @@ -0,0 +1,677 @@ 4585 +/* 4586 + * Copyright (C) 2016 Canonical Ltd 4587 + * 4588 + * This program is free software: you can redistribute it and/or modify 4589 + * it under the terms of the GNU General Public License version 3 as 4590 + * published by the Free Software Foundation. 4591 + * 4592 + * This program is distributed in the hope that it will be useful, 4593 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 4594 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 4595 + * GNU General Public License for more details. 4596 + * 4597 + * You should have received a copy of the GNU General Public License 4598 + * along with this program. If not, see . 4599 + * 4600 + * Authors: Gary Wang 4601 + */ 4602 + 4603 +#include "onedriveprovider.h" 4604 +#include 4605 +#include 4606 +#include 4607 +#include 4608 +#include 4609 +#include 4610 + 4611 +#include 4612 +#include 4613 +#include 4614 +#include 4615 +#include 4616 +#include 4617 +#include 4618 + 4619 +#include 4620 +#include 4621 +#include 4622 +#include 4623 +#include 4624 +#include 4625 + 4626 +#include 4627 +#include 4628 +#include 4629 +#include 4630 +#include 4631 +#include 4632 +#include 4633 + 4634 +using namespace std; 4635 +using namespace unity::storage; 4636 +using namespace unity::storage::provider; 4637 +using namespace onedrive::api; 4638 +using namespace boost::uuids; 4639 + 4640 +using boost::make_ready_future; 4641 +using boost::make_exceptional_future; 4642 +using boost::format; 4643 + 4644 +namespace { 4645 + static constexpr const int TIME_OUT = 10; 4646 + static constexpr const int CLIENT_COUNT = 3; 4647 + 4648 + static const char *STATUS[] = {"unstart", "running", "cancelled", "paused", "broken", "complete"}; 4649 + 4650 + string make_job_id() { 4651 + auto uuid = random_generator()(); 4652 + return to_string(uuid); 4653 + } 4654 + 4655 + string status_to_string(Task::Status status) { 4656 + return STATUS[int(status)]; 4657 + } 4658 + 4659 + int pending_jobs_count(Client::Ptr client, OnedriveProvider::JobMode mode) { 4660 + int count = 0; 4661 + auto syncmanager = client->syncmanager(); 4662 + if (mode == OnedriveProvider::JobMode::Download) { 4663 + auto download_task_queue = syncmanager->download_queue(); 4664 + for (auto& item_ptr : download_task_queue) { 4665 + if (item_ptr->status() == Task::Status::Running 4666 + || item_ptr->status() == Task::Status::Paused 4667 + || item_ptr->status() == Task::Status::Unstart) { 4668 + count++; 4669 + } 4670 + } 4671 + } else if (mode == OnedriveProvider::JobMode::Upload) { 4672 + auto upload_task_queue = syncmanager->upload_queue(); 4673 + for (auto& item_ptr : upload_task_queue) { 4674 + if (item_ptr->status() == Task::Status::Running 4675 + || item_ptr->status() == Task::Status::Paused 4676 + || item_ptr->status() == Task::Status::Unstart) { 4677 + count++; 4678 + } 4679 + } 4680 + } 4681 + 4682 + return count; 4683 + } 4684 + 4685 + Item content_to_item(CloudResource::Ptr resource, vector const& keys) { 4686 + Item item; 4687 + item.item_id = resource->id(); 4688 + item.parent_ids = {resource->parent_folder_id()}; 4689 + item.name = resource->name(); 4690 + item.etag = resource->etag(); 4691 + item.metadata[metadata::LAST_MODIFIED_TIME] = resource->updated_date(); 4692 + if (resource->property() == CloudResource::Property::Folder) { 4693 + item.type = ItemType::folder; 4694 + } else if (resource->property() == CloudResource::Property::Content) { 4695 + item.type = ItemType::file; 4696 + auto file = std::static_pointer_cast(resource); 4697 + item.metadata[metadata::SIZE_IN_BYTES] = file->size(); 4698 + } 4699 + 4700 + if (!keys.empty()) { 4701 + if (keys[0] == metadata::ALL) { 4702 + item.metadata[metadata::CREATION_TIME] = resource->created_date(); 4703 + item.metadata["onedrive:owner"] = resource->owner(); 4704 + item.metadata["onedrive:large_thumbnail"] = resource->thumbnails().large_url; 4705 + item.metadata["onedrive:medium_thumbnail"] = resource->thumbnails().medium_url; 4706 + item.metadata["onedrive:small_thumbnail"] = resource->thumbnails().small_url; 4707 + if (resource->property() == CloudResource::Property::Folder) { 4708 + auto folder = std::static_pointer_cast(resource); 4709 + item.metadata[metadata::CHILD_COUNT] = folder->children_count(); 4710 + } else if (resource->property() == CloudResource::Property::Content) { 4711 + auto file = std::static_pointer_cast(resource); 4712 + item.metadata[metadata::DOWNLOAD_URL] = file->download_url(); 4713 + item.metadata[metadata::DESCRIPTION] = file->description(); 4714 + item.metadata[metadata::CONTENT_TYPE] = file->mimetype(); 4715 + item.metadata["onedrive:hash"] = file->hash(); 4716 + } 4717 + } else { 4718 + auto metadata = [&]() { 4719 + std::map metadata; 4720 + auto type = resource->property(); 4721 + for (const auto& key: keys) { 4722 + if (key == "onedrive:owner") { 4723 + metadata["onedrive:owner"] = resource->owner(); 4724 + } else if (key == "onedrive:large_thumbnail") { 4725 + metadata["onedrive:large_thumbnail"] = resource->thumbnails().large_url; 4726 + } else if (key == "onedrive:medium_thumbnail") { 4727 + metadata["onedrive:medium_thumbnail"] = resource->thumbnails().medium_url; 4728 + } else if (key == "onedrive:small_thumbnail") { 4729 + metadata["onedrive:small_thumbnail"] = resource->thumbnails().small_url; 4730 + } else if (key == metadata::CREATION_TIME) { 4731 + metadata[metadata::CREATION_TIME] = resource->created_date(); 4732 + } else if (type == CloudResource::Property::Folder && key == metadata::CHILD_COUNT) { 4733 + auto folder = std::static_pointer_cast(resource); 4734 + metadata[metadata::CHILD_COUNT] = folder->children_count(); 4735 + } else if (type == CloudResource::Property::Content && key == "onedrive:hash") { 4736 + auto file = std::static_pointer_cast(resource); 4737 + item.metadata["onedrive:hash"] = file->hash(); 4738 + } else if (type == CloudResource::Property::Content && key == metadata::CONTENT_TYPE) { 4739 + auto file = std::static_pointer_cast(resource); 4740 + metadata[metadata::CONTENT_TYPE] = file->mimetype(); 4741 + } else if (type == CloudResource::Property::Content && key == metadata::DOWNLOAD_URL) { 4742 + auto file = std::static_pointer_cast(resource); 4743 + metadata[metadata::DOWNLOAD_URL] = file->download_url(); 4744 + } else if (type == CloudResource::Property::Content && key == metadata::SIZE_IN_BYTES){ 4745 + auto file = std::static_pointer_cast(resource); 4746 + metadata[metadata::SIZE_IN_BYTES] = file->size(); 4747 + } else if (type == CloudResource::Property::Content && key == metadata::DESCRIPTION) { 4748 + auto file = std::static_pointer_cast(resource); 4749 + metadata[metadata::DESCRIPTION] = file->description(); 4750 + } 4751 + } 4752 + 4753 + return metadata; 4754 + }(); 4755 + 4756 + item.metadata.insert(metadata.begin(), metadata.end()); 4757 + } 4758 + } 4759 + 4760 + return item; 4761 + } 4762 +} 4763 + 4764 +class OnedriveUploadJob : public UploadJob { 4765 + public: 4766 + OnedriveUploadJob(string const& upload_id, 4767 + string const& parent_id, 4768 + string const& file_name, 4769 + int64_t size, 4770 + bool allow_overwrite, 4771 + vector const& keys, 4772 + Client::Ptr client); 4773 + 4774 + boost::future cancel() override; 4775 + boost::future finish() override; 4776 + private: 4777 + boost::future> upload_data(); 4778 + void stop_and_cancel(); 4779 + private: 4780 + string parent_id_; 4781 + string file_name_; 4782 + int64_t upload_size_; 4783 + bool allow_overwrite_; 4784 + vector keys_; 4785 + 4786 + std::mutex mutex_; 4787 + UploadTask::Ptr task_; 4788 + Client::Ptr client_; 4789 + boost::future> upload_future_; 4790 +}; 4791 + 4792 +class OnedriveDownloadJob : public DownloadJob { 4793 + public: 4794 + OnedriveDownloadJob(string const& download_id, 4795 + string const& item_id, 4796 + Client::Ptr client); 4797 + 4798 + boost::future cancel() override; 4799 + boost::future finish() override; 4800 + private: 4801 + boost::future> download_data(); 4802 + void send_data(); 4803 + void stop_and_cancel(); 4804 + private: 4805 + string item_id_; 4806 + 4807 + std::mutex mutex_; 4808 + DownloadTask::Ptr task_; 4809 + Client::Ptr client_; 4810 + boost::future> download_future_; 4811 +}; 4812 + 4813 +OnedriveProvider::OnedriveProvider() 4814 + : client_list_(CLIENT_COUNT, std::make_shared(TIME_OUT)) { 4815 +} 4816 + 4817 +boost::future OnedriveProvider::roots(vector const& keys, 4818 + Context const& ctx) { 4819 + return boost::async([=]() { 4820 + try { 4821 + auto client = assign_client(ctx); 4822 + auto root_folder = client->root_folder(); 4823 + auto root = content_to_item(root_folder, keys); 4824 + //manually set item type as root and parent ids to empty. 4825 + root.type = ItemType::root; 4826 + root.parent_ids = {}; 4827 + ItemList roots = {{root}}; 4828 + return roots; 4829 + } catch (runtime_error& e) { 4830 + throw boost::enable_current_exception( 4831 + RemoteCommsException(string("OnedriveProvider::roots() failed: ") + e.what())); 4832 + } 4833 + }); 4834 +} 4835 + 4836 +boost::future> OnedriveProvider::list(string const& item_id, 4837 + string const& page_token, 4838 + vector const& keys, 4839 + Context const& ctx) { 4840 + return boost::async([=]() { 4841 + try { 4842 + auto client = assign_client(ctx); 4843 + 4844 + Client::ResourceList content_list; 4845 + std::string next_page_token; 4846 + std::tie(content_list, next_page_token) = client->cloud_content_list(item_id, page_token); 4847 + 4848 + ItemList items; 4849 + for (const auto& content : content_list) { 4850 + items.push_back(content_to_item(content, keys)); 4851 + } 4852 + 4853 + return make_tuple(items, next_page_token); 4854 + } catch (NonExistentException& e) { 4855 + throw boost::enable_current_exception( 4856 + NotExistsException(string("OnedriveProvider::list() failed: ") + e.what(), item_id)); 4857 + } catch (runtime_error& e) { 4858 + throw boost::enable_current_exception( 4859 + RemoteCommsException(string("OnedriveProvider::list() failed: ") + e.what())); 4860 + } 4861 + }); 4862 +} 4863 + 4864 +boost::future OnedriveProvider::lookup(string const& parent_id, 4865 + string const& name, 4866 + vector const& keys, 4867 + Context const& ctx) { 4868 + return boost::async([=]() { 4869 + try { 4870 + auto client = assign_client(ctx); 4871 + auto content_list = client->search(name, parent_id); 4872 + 4873 + ItemList items; 4874 + for (const auto& content : content_list) { 4875 + items.push_back(content_to_item(content, keys)); 4876 + } 4877 + 4878 + return items; 4879 + } catch (NotExistsException& e) { 4880 + throw boost::enable_current_exception( 4881 + NotExistsException(string("OnedriveProvider::lookup() folder not exists: ") + e.what(), parent_id)); 4882 + } catch (runtime_error& e) { 4883 + throw boost::enable_current_exception( 4884 + RemoteCommsException(string("OnedriveProvider::lookup() failed: ") + e.what())); 4885 + } 4886 + }); 4887 +} 4888 + 4889 +boost::future OnedriveProvider::metadata(string const& item_id, 4890 + vector const& keys, 4891 + Context const& ctx) { 4892 + return boost::async([=]() { 4893 + try { 4894 + auto client = assign_client(ctx); 4895 + auto content = client->metadata(item_id); 4896 + return content_to_item(content, keys); 4897 + } catch (NonExistentException& e) { 4898 + throw boost::enable_current_exception( 4899 + NotExistsException(string("OnedriveProvider::metadata() content not exists: ") + e.what(), item_id)); 4900 + } catch (runtime_error& e) { 4901 + throw boost::enable_current_exception( 4902 + RemoteCommsException(string("OnedriveProvider::metadata() failed: ") + e.what())); 4903 + } 4904 + }); 4905 +} 4906 + 4907 +boost::future OnedriveProvider::create_folder(string const& parent_id, 4908 + string const& name, 4909 + vector const& keys, 4910 + Context const& ctx) { 4911 + return boost::async([=]() { 4912 + try { 4913 + auto client = assign_client(ctx); 4914 + auto content = client->create_folder(name, parent_id); 4915 + return content_to_item(content, keys); 4916 + } catch (NonExistentException& e) { 4917 + throw boost::enable_current_exception( 4918 + NotExistsException(string("OnedriveProvider::create_folder() failed: ") + e.what(), name)); 4919 + } catch (runtime_error& e) { 4920 + throw boost::enable_current_exception( 4921 + RemoteCommsException(string("OnedriveProvider::create_folder() failed: ") + e.what())); 4922 + } 4923 + }); 4924 +} 4925 + 4926 +boost::future> OnedriveProvider::create_file(string const& parent_id, 4927 + string const& name, 4928 + int64_t size, 4929 + string const& /*content_type*/, 4930 + bool allow_overwrite, 4931 + vector const& keys, 4932 + Context const& ctx) { 4933 + auto client = assign_client(ctx, JobMode::Upload); 4934 + return make_ready_future(unique_ptr(new OnedriveUploadJob(make_job_id(), parent_id, name, size, allow_overwrite, keys, client))); 4935 +} 4936 + 4937 +boost::future> OnedriveProvider::update(string const& item_id, 4938 + int64_t size, 4939 + string const& /*old_etag*/, 4940 + vector const& keys, 4941 + Context const& ctx) { 4942 + //1.fetch metadata to get item's name and folder id. 4943 + //2.update the file with Task::NameConflictBehavior::Replace 4944 + 4945 + return boost::async([=]() { 4946 + try { 4947 + auto client = assign_client(ctx); 4948 + auto content = client->metadata(item_id); 4949 + auto parent_id = content->parent_folder_id(); 4950 + auto file_name = content->name(); 4951 + 4952 + return create_file(parent_id, file_name, size, "", true, keys, ctx).get(); 4953 + } catch (NonExistentException& e) { 4954 + throw boost::enable_current_exception( 4955 + NotExistsException(string("OnedriveProvider::update() failed: ") + e.what(), item_id)); 4956 + } catch (runtime_error& e) { 4957 + throw boost::enable_current_exception( 4958 + RemoteCommsException(string("OnedriveProvider::update() failed: ") + e.what())); 4959 + } 4960 + }); 4961 +} 4962 + 4963 +boost::future> OnedriveProvider::download(string const& item_id, 4964 + string const& /*match_etag*/, 4965 + Context const& ctx) { 4966 + auto client = assign_client(ctx, JobMode::Download); 4967 + return make_ready_future(unique_ptr(new OnedriveDownloadJob(make_job_id(), item_id, client))); 4968 +} 4969 + 4970 +boost::future OnedriveProvider::delete_item(string const& item_id, 4971 + Context const& ctx) { 4972 + return boost::async([=]() { 4973 + try { 4974 + auto client = assign_client(ctx); 4975 + client->delete_item(item_id); 4976 + } catch (NonExistentException& e) { 4977 + throw boost::enable_current_exception( 4978 + NotExistsException(string("OnedriveProvider::delete_item() failed: ") + e.what(), item_id)); 4979 + } catch (runtime_error& e) { 4980 + throw boost::enable_current_exception( 4981 + RemoteCommsException(string("OnedriveProvider::delete_item() failed: ") + e.what())); 4982 + } 4983 + }); 4984 +} 4985 + 4986 +boost::future OnedriveProvider::move(string const& item_id, 4987 + string const& new_parent_id, 4988 + string const& new_name, 4989 + vector const& keys, 4990 + Context const& ctx) { 4991 + return boost::async([=]() { 4992 + try { 4993 + auto client = assign_client(ctx); 4994 + auto move_item = client->move_item(item_id, new_parent_id, new_name); 4995 + return content_to_item(move_item, keys); 4996 + } catch (NonExistentException& e) { 4997 + throw boost::enable_current_exception( 4998 + NotExistsException(string("OnedriveProvider::move() content or folder not exist: ") + e.what(), new_parent_id)); 4999 + } catch (ItemExistentException& e) { 5000 + throw boost::enable_current_exception(
The diff has been truncated for viewing.

## Subscribers

People subscribed via source and target branches

to all changes: