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 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 | 550 |
551 // Return the link to open the file in Google editor or viewer. | 551 // Return the link to open the file in Google editor or viewer. |
552 // E.g. Google Document, Google Spreadsheet. | 552 // E.g. Google Document, Google Spreadsheet. |
553 const GURL& alternate_link() const { return alternate_link_; } | 553 const GURL& alternate_link() const { return alternate_link_; } |
554 | 554 |
555 // Returns the link for embedding the file. | 555 // Returns the link for embedding the file. |
556 const GURL& embed_link() const { return embed_link_; } | 556 const GURL& embed_link() const { return embed_link_; } |
557 | 557 |
558 // Returns parent references (directories) of this file. | 558 // Returns parent references (directories) of this file. |
559 const ScopedVector<ParentReference>& parents() const { return parents_; } | 559 const ScopedVector<ParentReference>& parents() const { return parents_; } |
| 560 ScopedVector<ParentReference>* mutable_parents() { return &parents_; } |
560 | 561 |
561 // Returns the link to the file's thumbnail. | 562 // Returns the link to the file's thumbnail. |
562 const GURL& thumbnail_link() const { return thumbnail_link_; } | 563 const GURL& thumbnail_link() const { return thumbnail_link_; } |
563 | 564 |
564 // Returns the link to open its downloadable content, using cookie based | 565 // Returns the link to open its downloadable content, using cookie based |
565 // authentication. | 566 // authentication. |
566 const GURL& web_content_link() const { return web_content_link_; } | 567 const GURL& web_content_link() const { return web_content_link_; } |
567 | 568 |
568 // Returns the list of links to open the resource with a web app. | 569 // Returns the list of links to open the resource with a web app. |
569 const std::vector<OpenWithLink>& open_with_links() const { | 570 const std::vector<OpenWithLink>& open_with_links() const { |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
754 int64 change_id() const { return change_id_; } | 755 int64 change_id() const { return change_id_; } |
755 | 756 |
756 // Returns a string file ID for corresponding file of the change. | 757 // Returns a string file ID for corresponding file of the change. |
757 const std::string& file_id() const { return file_id_; } | 758 const std::string& file_id() const { return file_id_; } |
758 | 759 |
759 // Returns true if this file is deleted in the change. | 760 // Returns true if this file is deleted in the change. |
760 bool is_deleted() const { return deleted_; } | 761 bool is_deleted() const { return deleted_; } |
761 | 762 |
762 // Returns FileResource of the file which the change refers to. | 763 // Returns FileResource of the file which the change refers to. |
763 const FileResource* file() const { return file_.get(); } | 764 const FileResource* file() const { return file_.get(); } |
| 765 FileResource* mutable_file() { return file_.get(); } |
764 | 766 |
765 void set_change_id(int64 change_id) { | 767 void set_change_id(int64 change_id) { |
766 change_id_ = change_id; | 768 change_id_ = change_id; |
767 } | 769 } |
768 void set_file_id(const std::string& file_id) { | 770 void set_file_id(const std::string& file_id) { |
769 file_id_ = file_id; | 771 file_id_ = file_id; |
770 } | 772 } |
771 void set_deleted(bool deleted) { | 773 void set_deleted(bool deleted) { |
772 deleted_ = deleted; | 774 deleted_ = deleted; |
773 } | 775 } |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 GURL next_link_; | 857 GURL next_link_; |
856 int64 largest_change_id_; | 858 int64 largest_change_id_; |
857 ScopedVector<ChangeResource> items_; | 859 ScopedVector<ChangeResource> items_; |
858 | 860 |
859 DISALLOW_COPY_AND_ASSIGN(ChangeList); | 861 DISALLOW_COPY_AND_ASSIGN(ChangeList); |
860 }; | 862 }; |
861 | 863 |
862 } // namespace google_apis | 864 } // namespace google_apis |
863 | 865 |
864 #endif // GOOGLE_APIS_DRIVE_DRIVE_API_PARSER_H_ | 866 #endif // GOOGLE_APIS_DRIVE_DRIVE_API_PARSER_H_ |
OLD | NEW |