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 COMPONENTS_DRIVE_SERVICE_DRIVE_SERVICE_INTERFACE_H_ | 5 #ifndef COMPONENTS_DRIVE_SERVICE_DRIVE_SERVICE_INTERFACE_H_ |
6 #define COMPONENTS_DRIVE_SERVICE_DRIVE_SERVICE_INTERFACE_H_ | 6 #define COMPONENTS_DRIVE_SERVICE_DRIVE_SERVICE_INTERFACE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 19 matching lines...) Expand all Loading... |
30 // Called when the refresh token was found to be invalid. | 30 // Called when the refresh token was found to be invalid. |
31 virtual void OnRefreshTokenInvalid() {} | 31 virtual void OnRefreshTokenInvalid() {} |
32 | 32 |
33 protected: | 33 protected: |
34 virtual ~DriveServiceObserver() {} | 34 virtual ~DriveServiceObserver() {} |
35 }; | 35 }; |
36 | 36 |
37 // Optional parameters for AddNewDirectory(). | 37 // Optional parameters for AddNewDirectory(). |
38 struct AddNewDirectoryOptions { | 38 struct AddNewDirectoryOptions { |
39 AddNewDirectoryOptions(); | 39 AddNewDirectoryOptions(); |
| 40 AddNewDirectoryOptions(const AddNewDirectoryOptions& other); |
40 ~AddNewDirectoryOptions(); | 41 ~AddNewDirectoryOptions(); |
41 | 42 |
42 // visibility of the new directory. | 43 // visibility of the new directory. |
43 google_apis::drive::FileVisibility visibility; | 44 google_apis::drive::FileVisibility visibility; |
44 | 45 |
45 // modified_date of the directory. | 46 // modified_date of the directory. |
46 // Pass the null Time if you are not interested in setting this property. | 47 // Pass the null Time if you are not interested in setting this property. |
47 base::Time modified_date; | 48 base::Time modified_date; |
48 | 49 |
49 // last_viewed_by_me_date of the directory. | 50 // last_viewed_by_me_date of the directory. |
50 // Pass the null Time if you are not interested in setting this property. | 51 // Pass the null Time if you are not interested in setting this property. |
51 base::Time last_viewed_by_me_date; | 52 base::Time last_viewed_by_me_date; |
52 | 53 |
53 // List of properties for a new directory. | 54 // List of properties for a new directory. |
54 google_apis::drive::Properties properties; | 55 google_apis::drive::Properties properties; |
55 }; | 56 }; |
56 | 57 |
57 // Optional parameters for InitiateUploadNewFile() and | 58 // Optional parameters for InitiateUploadNewFile() and |
58 // MultipartUploadNewFile(). | 59 // MultipartUploadNewFile(). |
59 struct UploadNewFileOptions { | 60 struct UploadNewFileOptions { |
60 UploadNewFileOptions(); | 61 UploadNewFileOptions(); |
| 62 UploadNewFileOptions(const UploadNewFileOptions& other); |
61 ~UploadNewFileOptions(); | 63 ~UploadNewFileOptions(); |
62 | 64 |
63 // modified_date of the file. | 65 // modified_date of the file. |
64 // 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. |
65 base::Time modified_date; | 67 base::Time modified_date; |
66 | 68 |
67 // last_viewed_by_me_date of the file. | 69 // last_viewed_by_me_date of the file. |
68 // 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. |
69 base::Time last_viewed_by_me_date; | 71 base::Time last_viewed_by_me_date; |
70 | 72 |
71 // List of properties for a new file. | 73 // List of properties for a new file. |
72 google_apis::drive::Properties properties; | 74 google_apis::drive::Properties properties; |
73 }; | 75 }; |
74 | 76 |
75 // Optional parameters for InitiateUploadExistingFile() and | 77 // Optional parameters for InitiateUploadExistingFile() and |
76 // MultipartUploadExistingFile(). | 78 // MultipartUploadExistingFile(). |
77 struct UploadExistingFileOptions { | 79 struct UploadExistingFileOptions { |
78 UploadExistingFileOptions(); | 80 UploadExistingFileOptions(); |
| 81 UploadExistingFileOptions(const UploadExistingFileOptions& other); |
79 ~UploadExistingFileOptions(); | 82 ~UploadExistingFileOptions(); |
80 | 83 |
81 // Expected ETag of the file. UPLOAD_ERROR_CONFLICT error is generated when | 84 // Expected ETag of the file. UPLOAD_ERROR_CONFLICT error is generated when |
82 // matching fails. | 85 // matching fails. |
83 // Pass the empty string to disable this behavior. | 86 // Pass the empty string to disable this behavior. |
84 std::string etag; | 87 std::string etag; |
85 | 88 |
86 // New parent of the file. | 89 // New parent of the file. |
87 // Pass the empty string to keep the property unchanged. | 90 // Pass the empty string to keep the property unchanged. |
88 std::string parent_resource_id; | 91 std::string parent_resource_id; |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 google_apis::drive::PermissionRole role, | 466 google_apis::drive::PermissionRole role, |
464 const google_apis::EntryActionCallback& callback) = 0; | 467 const google_apis::EntryActionCallback& callback) = 0; |
465 | 468 |
466 // Starts batch request and returns |BatchRequestConfigurator|. | 469 // Starts batch request and returns |BatchRequestConfigurator|. |
467 virtual scoped_ptr<BatchRequestConfiguratorInterface> StartBatchRequest() = 0; | 470 virtual scoped_ptr<BatchRequestConfiguratorInterface> StartBatchRequest() = 0; |
468 }; | 471 }; |
469 | 472 |
470 } // namespace drive | 473 } // namespace drive |
471 | 474 |
472 #endif // COMPONENTS_DRIVE_SERVICE_DRIVE_SERVICE_INTERFACE_H_ | 475 #endif // COMPONENTS_DRIVE_SERVICE_DRIVE_SERVICE_INTERFACE_H_ |
OLD | NEW |