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 CHROME_BROWSER_DRIVE_DRIVE_SERVICE_INTERFACE_H_ | 5 #ifndef CHROME_BROWSER_DRIVE_DRIVE_SERVICE_INTERFACE_H_ |
6 #define CHROME_BROWSER_DRIVE_DRIVE_SERVICE_INTERFACE_H_ | 6 #define CHROME_BROWSER_DRIVE_DRIVE_SERVICE_INTERFACE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 AddNewDirectoryOptions(); | 44 AddNewDirectoryOptions(); |
45 ~AddNewDirectoryOptions(); | 45 ~AddNewDirectoryOptions(); |
46 | 46 |
47 // modified_date of the directory. | 47 // modified_date of the directory. |
48 // Pass the null Time if you are not interested in setting this property. | 48 // Pass the null Time if you are not interested in setting this property. |
49 base::Time modified_date; | 49 base::Time modified_date; |
50 | 50 |
51 // last_viewed_by_me_date of the directory. | 51 // last_viewed_by_me_date of the directory. |
52 // Pass the null Time if you are not interested in setting this property. | 52 // Pass the null Time if you are not interested in setting this property. |
53 base::Time last_viewed_by_me_date; | 53 base::Time last_viewed_by_me_date; |
| 54 |
| 55 // List of properties for a new directory. |
| 56 google_apis::drive::Properties properties; |
54 }; | 57 }; |
55 | 58 |
56 // Optional parameters for InitiateUploadNewFile() and | 59 // Optional parameters for InitiateUploadNewFile() and |
57 // MultipartUploadNewFile(). | 60 // MultipartUploadNewFile(). |
58 struct UploadNewFileOptions { | 61 struct UploadNewFileOptions { |
59 UploadNewFileOptions(); | 62 UploadNewFileOptions(); |
60 ~UploadNewFileOptions(); | 63 ~UploadNewFileOptions(); |
61 | 64 |
62 // modified_date of the file. | 65 // modified_date of the file. |
63 // Pass the null Time if you are not interested in setting this property. | 66 // Pass the null Time if you are not interested in setting this property. |
64 base::Time modified_date; | 67 base::Time modified_date; |
65 | 68 |
66 // last_viewed_by_me_date of the file. | 69 // last_viewed_by_me_date of the file. |
67 // Pass the null Time if you are not interested in setting this property. | 70 // Pass the null Time if you are not interested in setting this property. |
68 base::Time last_viewed_by_me_date; | 71 base::Time last_viewed_by_me_date; |
| 72 |
| 73 // List of properties for a new file. |
| 74 google_apis::drive::Properties properties; |
69 }; | 75 }; |
70 | 76 |
71 // Optional parameters for InitiateUploadExistingFile() and | 77 // Optional parameters for InitiateUploadExistingFile() and |
72 // MultipartUploadExistingFile(). | 78 // MultipartUploadExistingFile(). |
73 struct UploadExistingFileOptions { | 79 struct UploadExistingFileOptions { |
74 UploadExistingFileOptions(); | 80 UploadExistingFileOptions(); |
75 ~UploadExistingFileOptions(); | 81 ~UploadExistingFileOptions(); |
76 | 82 |
77 // Expected ETag of the file. UPLOAD_ERROR_CONFLICT error is generated when | 83 // Expected ETag of the file. UPLOAD_ERROR_CONFLICT error is generated when |
78 // matching fails. | 84 // matching fails. |
79 // Pass the empty string to disable this behavior. | 85 // Pass the empty string to disable this behavior. |
80 std::string etag; | 86 std::string etag; |
81 | 87 |
82 // New parent of the file. | 88 // New parent of the file. |
83 // Pass the empty string to keep the property unchanged. | 89 // Pass the empty string to keep the property unchanged. |
84 std::string parent_resource_id; | 90 std::string parent_resource_id; |
85 | 91 |
86 // New title of the file. | 92 // New title of the file. |
87 // Pass the empty string to keep the property unchanged. | 93 // Pass the empty string to keep the property unchanged. |
88 std::string title; | 94 std::string title; |
89 | 95 |
90 // New modified_date of the file. | 96 // New modified_date of the file. |
91 // Pass the null Time if you are not interested in setting this property. | 97 // Pass the null Time if you are not interested in setting this property. |
92 base::Time modified_date; | 98 base::Time modified_date; |
93 | 99 |
94 // New last_viewed_by_me_date of the file. | 100 // New last_viewed_by_me_date of the file. |
95 // Pass the null Time if you are not interested in setting this property. | 101 // Pass the null Time if you are not interested in setting this property. |
96 base::Time last_viewed_by_me_date; | 102 base::Time last_viewed_by_me_date; |
| 103 |
| 104 // List of new properties for an existing file (it will be merged with |
| 105 // existing properties). |
| 106 google_apis::drive::Properties properties; |
97 }; | 107 }; |
98 | 108 |
99 virtual ~DriveServiceInterface() {} | 109 virtual ~DriveServiceInterface() {} |
100 | 110 |
101 // Common service: | 111 // Common service: |
102 | 112 |
103 // Initializes the documents service with |account_id|. | 113 // Initializes the documents service with |account_id|. |
104 virtual void Initialize(const std::string& account_id) = 0; | 114 virtual void Initialize(const std::string& account_id) = 0; |
105 | 115 |
106 // Adds an observer. | 116 // Adds an observer. |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 virtual google_apis::CancelCallback AddPermission( | 439 virtual google_apis::CancelCallback AddPermission( |
430 const std::string& resource_id, | 440 const std::string& resource_id, |
431 const std::string& email, | 441 const std::string& email, |
432 google_apis::drive::PermissionRole role, | 442 google_apis::drive::PermissionRole role, |
433 const google_apis::EntryActionCallback& callback) = 0; | 443 const google_apis::EntryActionCallback& callback) = 0; |
434 }; | 444 }; |
435 | 445 |
436 } // namespace drive | 446 } // namespace drive |
437 | 447 |
438 #endif // CHROME_BROWSER_DRIVE_DRIVE_SERVICE_INTERFACE_H_ | 448 #endif // CHROME_BROWSER_DRIVE_DRIVE_SERVICE_INTERFACE_H_ |
OLD | NEW |