| 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_DRIVE_API_PARSER_H_ | 5 #ifndef GOOGLE_APIS_DRIVE_DRIVE_API_PARSER_H_ |
| 6 #define GOOGLE_APIS_DRIVE_DRIVE_API_PARSER_H_ | 6 #define GOOGLE_APIS_DRIVE_DRIVE_API_PARSER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 // Registers the mapping between JSON field names and the members in this | 358 // Registers the mapping between JSON field names and the members in this |
| 359 // class. | 359 // class. |
| 360 static void RegisterJSONConverter( | 360 static void RegisterJSONConverter( |
| 361 base::JSONValueConverter<FileLabels>* converter); | 361 base::JSONValueConverter<FileLabels>* converter); |
| 362 | 362 |
| 363 // Creates about resource from parsed JSON. | 363 // Creates about resource from parsed JSON. |
| 364 static std::unique_ptr<FileLabels> CreateFrom(const base::Value& value); | 364 static std::unique_ptr<FileLabels> CreateFrom(const base::Value& value); |
| 365 | 365 |
| 366 // Whether this file has been trashed. | 366 // Whether this file has been trashed. |
| 367 bool is_trashed() const { return trashed_; } | 367 bool is_trashed() const { return trashed_; } |
| 368 // Whether this file is starred by the user. |
| 369 bool is_starred() const { return starred_; } |
| 368 | 370 |
| 369 void set_trashed(bool trashed) { trashed_ = trashed; } | 371 void set_trashed(bool trashed) { trashed_ = trashed; } |
| 372 void set_starred(bool starred) { starred_ = starred; } |
| 370 | 373 |
| 371 private: | 374 private: |
| 372 friend class FileResource; | 375 friend class FileResource; |
| 373 | 376 |
| 374 // Parses and initializes data members from content of |value|. | 377 // Parses and initializes data members from content of |value|. |
| 375 // Return false if parsing fails. | 378 // Return false if parsing fails. |
| 376 bool Parse(const base::Value& value); | 379 bool Parse(const base::Value& value); |
| 377 | 380 |
| 378 bool trashed_; | 381 bool trashed_; |
| 382 bool starred_; |
| 379 }; | 383 }; |
| 380 | 384 |
| 381 // ImageMediaMetadata represents image metadata for a file. | 385 // ImageMediaMetadata represents image metadata for a file. |
| 382 // https://developers.google.com/drive/v2/reference/files | 386 // https://developers.google.com/drive/v2/reference/files |
| 383 class ImageMediaMetadata { | 387 class ImageMediaMetadata { |
| 384 public: | 388 public: |
| 385 ImageMediaMetadata(); | 389 ImageMediaMetadata(); |
| 386 ~ImageMediaMetadata(); | 390 ~ImageMediaMetadata(); |
| 387 | 391 |
| 388 // Registers the mapping between JSON field names and the members in this | 392 // Registers the mapping between JSON field names and the members in this |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 GURL next_link_; | 742 GURL next_link_; |
| 739 int64_t largest_change_id_; | 743 int64_t largest_change_id_; |
| 740 ScopedVector<ChangeResource> items_; | 744 ScopedVector<ChangeResource> items_; |
| 741 | 745 |
| 742 DISALLOW_COPY_AND_ASSIGN(ChangeList); | 746 DISALLOW_COPY_AND_ASSIGN(ChangeList); |
| 743 }; | 747 }; |
| 744 | 748 |
| 745 } // namespace google_apis | 749 } // namespace google_apis |
| 746 | 750 |
| 747 #endif // GOOGLE_APIS_DRIVE_DRIVE_API_PARSER_H_ | 751 #endif // GOOGLE_APIS_DRIVE_DRIVE_API_PARSER_H_ |
| OLD | NEW |