OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef GOOGLE_APIS_DRIVE_GDATA_WAPI_PARSER_H_ | 5 #ifndef GOOGLE_APIS_DRIVE_GDATA_WAPI_PARSER_H_ |
6 #define GOOGLE_APIS_DRIVE_GDATA_WAPI_PARSER_H_ | 6 #define GOOGLE_APIS_DRIVE_GDATA_WAPI_PARSER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 // This class represents a resource entry. A resource is a generic term which | 310 // This class represents a resource entry. A resource is a generic term which |
311 // refers to a file and a directory. | 311 // refers to a file and a directory. |
312 class ResourceEntry : public CommonMetadata { | 312 class ResourceEntry : public CommonMetadata { |
313 public: | 313 public: |
314 enum ResourceEntryKind { | 314 enum ResourceEntryKind { |
315 ENTRY_KIND_UNKNOWN, | 315 ENTRY_KIND_UNKNOWN, |
316 ENTRY_KIND_FOLDER, | 316 ENTRY_KIND_FOLDER, |
317 ENTRY_KIND_FILE | 317 ENTRY_KIND_FILE |
318 }; | 318 }; |
319 ResourceEntry(); | 319 ResourceEntry(); |
320 virtual ~ResourceEntry(); | 320 ~ResourceEntry() override; |
321 | 321 |
322 // Extracts "entry" dictionary from the JSON value, and parse the contents, | 322 // Extracts "entry" dictionary from the JSON value, and parse the contents, |
323 // using CreateFrom(). Returns NULL on failure. The input JSON data, coming | 323 // using CreateFrom(). Returns NULL on failure. The input JSON data, coming |
324 // from the gdata server, looks like: | 324 // from the gdata server, looks like: |
325 // | 325 // |
326 // { | 326 // { |
327 // "encoding": "UTF-8", | 327 // "encoding": "UTF-8", |
328 // "entry": { ... }, // This function will extract this and parse. | 328 // "entry": { ... }, // This function will extract this and parse. |
329 // "version": "1.0" | 329 // "version": "1.0" |
330 // } | 330 // } |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 DISALLOW_COPY_AND_ASSIGN(ResourceEntry); | 510 DISALLOW_COPY_AND_ASSIGN(ResourceEntry); |
511 }; | 511 }; |
512 | 512 |
513 // This class represents a list of resource entries with some extra metadata | 513 // This class represents a list of resource entries with some extra metadata |
514 // such as the root upload URL. The feed is paginated and the rest of the | 514 // such as the root upload URL. The feed is paginated and the rest of the |
515 // feed can be fetched by retrieving the remaining parts of the feed from | 515 // feed can be fetched by retrieving the remaining parts of the feed from |
516 // URLs provided by GetNextFeedURL() method. | 516 // URLs provided by GetNextFeedURL() method. |
517 class ResourceList : public CommonMetadata { | 517 class ResourceList : public CommonMetadata { |
518 public: | 518 public: |
519 ResourceList(); | 519 ResourceList(); |
520 virtual ~ResourceList(); | 520 ~ResourceList() override; |
521 | 521 |
522 // Extracts "feed" dictionary from the JSON value, and parse the contents, | 522 // Extracts "feed" dictionary from the JSON value, and parse the contents, |
523 // using CreateFrom(). Returns NULL on failure. The input JSON data, coming | 523 // using CreateFrom(). Returns NULL on failure. The input JSON data, coming |
524 // from the gdata server, looks like: | 524 // from the gdata server, looks like: |
525 // | 525 // |
526 // { | 526 // { |
527 // "encoding": "UTF-8", | 527 // "encoding": "UTF-8", |
528 // "feed": { ... }, // This function will extract this and parse. | 528 // "feed": { ... }, // This function will extract this and parse. |
529 // "version": "1.0" | 529 // "version": "1.0" |
530 // } | 530 // } |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 int items_per_page_; | 593 int items_per_page_; |
594 std::string title_; | 594 std::string title_; |
595 int64 largest_changestamp_; | 595 int64 largest_changestamp_; |
596 | 596 |
597 DISALLOW_COPY_AND_ASSIGN(ResourceList); | 597 DISALLOW_COPY_AND_ASSIGN(ResourceList); |
598 }; | 598 }; |
599 | 599 |
600 } // namespace google_apis | 600 } // namespace google_apis |
601 | 601 |
602 #endif // GOOGLE_APIS_DRIVE_GDATA_WAPI_PARSER_H_ | 602 #endif // GOOGLE_APIS_DRIVE_GDATA_WAPI_PARSER_H_ |
OLD | NEW |