| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 } | 478 } |
| 479 | 479 |
| 480 // Returns time when the file was shared with the user. | 480 // Returns time when the file was shared with the user. |
| 481 const base::Time& shared_with_me_date() const { | 481 const base::Time& shared_with_me_date() const { |
| 482 return shared_with_me_date_; | 482 return shared_with_me_date_; |
| 483 } | 483 } |
| 484 | 484 |
| 485 // Returns the 'shared' attribute of the file. | 485 // Returns the 'shared' attribute of the file. |
| 486 bool shared() const { return shared_; } | 486 bool shared() const { return shared_; } |
| 487 | 487 |
| 488 // Returns the short-lived download URL for the file. This field exists |
| 489 // only when the file content is stored in Drive. |
| 490 const GURL& download_url() const { return download_url_; } |
| 491 |
| 488 // Returns MD5 checksum of this file. | 492 // Returns MD5 checksum of this file. |
| 489 const std::string& md5_checksum() const { return md5_checksum_; } | 493 const std::string& md5_checksum() const { return md5_checksum_; } |
| 490 | 494 |
| 491 // Returns the size of this file in bytes. | 495 // Returns the size of this file in bytes. |
| 492 int64 file_size() const { return file_size_; } | 496 int64 file_size() const { return file_size_; } |
| 493 | 497 |
| 494 // Return the link to open the file in Google editor or viewer. | 498 // Return the link to open the file in Google editor or viewer. |
| 495 // E.g. Google Document, Google Spreadsheet. | 499 // E.g. Google Document, Google Spreadsheet. |
| 496 const GURL& alternate_link() const { return alternate_link_; } | 500 const GURL& alternate_link() const { return alternate_link_; } |
| 497 | 501 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 } | 533 } |
| 530 void set_last_viewed_by_me_date(const base::Time& last_viewed_by_me_date) { | 534 void set_last_viewed_by_me_date(const base::Time& last_viewed_by_me_date) { |
| 531 last_viewed_by_me_date_ = last_viewed_by_me_date; | 535 last_viewed_by_me_date_ = last_viewed_by_me_date; |
| 532 } | 536 } |
| 533 void set_shared_with_me_date(const base::Time& shared_with_me_date) { | 537 void set_shared_with_me_date(const base::Time& shared_with_me_date) { |
| 534 shared_with_me_date_ = shared_with_me_date; | 538 shared_with_me_date_ = shared_with_me_date; |
| 535 } | 539 } |
| 536 void set_shared(bool shared) { | 540 void set_shared(bool shared) { |
| 537 shared_ = shared; | 541 shared_ = shared; |
| 538 } | 542 } |
| 543 void set_download_url(const GURL& download_url) { |
| 544 download_url_ = download_url; |
| 545 } |
| 539 void set_md5_checksum(const std::string& md5_checksum) { | 546 void set_md5_checksum(const std::string& md5_checksum) { |
| 540 md5_checksum_ = md5_checksum; | 547 md5_checksum_ = md5_checksum; |
| 541 } | 548 } |
| 542 void set_file_size(int64 file_size) { | 549 void set_file_size(int64 file_size) { |
| 543 file_size_ = file_size; | 550 file_size_ = file_size; |
| 544 } | 551 } |
| 545 void set_alternate_link(const GURL& alternate_link) { | 552 void set_alternate_link(const GURL& alternate_link) { |
| 546 alternate_link_ = alternate_link; | 553 alternate_link_ = alternate_link; |
| 547 } | 554 } |
| 548 std::vector<ParentReference>* mutable_parents() { return &parents_; } | 555 std::vector<ParentReference>* mutable_parents() { return &parents_; } |
| (...skipping 14 matching lines...) Expand all Loading... |
| 563 std::string etag_; | 570 std::string etag_; |
| 564 std::string title_; | 571 std::string title_; |
| 565 std::string mime_type_; | 572 std::string mime_type_; |
| 566 FileLabels labels_; | 573 FileLabels labels_; |
| 567 ImageMediaMetadata image_media_metadata_; | 574 ImageMediaMetadata image_media_metadata_; |
| 568 base::Time created_date_; | 575 base::Time created_date_; |
| 569 base::Time modified_date_; | 576 base::Time modified_date_; |
| 570 base::Time last_viewed_by_me_date_; | 577 base::Time last_viewed_by_me_date_; |
| 571 base::Time shared_with_me_date_; | 578 base::Time shared_with_me_date_; |
| 572 bool shared_; | 579 bool shared_; |
| 580 GURL download_url_; |
| 573 std::string md5_checksum_; | 581 std::string md5_checksum_; |
| 574 int64 file_size_; | 582 int64 file_size_; |
| 575 GURL alternate_link_; | 583 GURL alternate_link_; |
| 576 std::vector<ParentReference> parents_; | 584 std::vector<ParentReference> parents_; |
| 577 std::vector<OpenWithLink> open_with_links_; | 585 std::vector<OpenWithLink> open_with_links_; |
| 578 }; | 586 }; |
| 579 | 587 |
| 580 // FileList represents a collection of files and folders. | 588 // FileList represents a collection of files and folders. |
| 581 // https://developers.google.com/drive/v2/reference/files/list | 589 // https://developers.google.com/drive/v2/reference/files/list |
| 582 class FileList { | 590 class FileList { |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 733 GURL next_link_; | 741 GURL next_link_; |
| 734 int64 largest_change_id_; | 742 int64 largest_change_id_; |
| 735 ScopedVector<ChangeResource> items_; | 743 ScopedVector<ChangeResource> items_; |
| 736 | 744 |
| 737 DISALLOW_COPY_AND_ASSIGN(ChangeList); | 745 DISALLOW_COPY_AND_ASSIGN(ChangeList); |
| 738 }; | 746 }; |
| 739 | 747 |
| 740 } // namespace google_apis | 748 } // namespace google_apis |
| 741 | 749 |
| 742 #endif // GOOGLE_APIS_DRIVE_DRIVE_API_PARSER_H_ | 750 #endif // GOOGLE_APIS_DRIVE_DRIVE_API_PARSER_H_ |
| OLD | NEW |