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_GOOGLE_APIS_DRIVE_SERVICE_INTERFACE_H_ | 5 #ifndef CHROME_BROWSER_GOOGLE_APIS_DRIVE_SERVICE_INTERFACE_H_ |
6 #define CHROME_BROWSER_GOOGLE_APIS_DRIVE_SERVICE_INTERFACE_H_ | 6 #define CHROME_BROWSER_GOOGLE_APIS_DRIVE_SERVICE_INTERFACE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 // TODO(kochi): Further split gdata_operations.h and include only necessary | 10 // TODO(kochi): Further split gdata_operations.h and include only necessary |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 | 171 |
172 // Adds a resource (document, file, or collection) identified by its | 172 // Adds a resource (document, file, or collection) identified by its |
173 // 'self' link |resource_url| to a collection with a content link | 173 // 'self' link |resource_url| to a collection with a content link |
174 // |parent_content_url|. Upon completion, invokes |callback| with | 174 // |parent_content_url|. Upon completion, invokes |callback| with |
175 // results on the calling thread. | 175 // results on the calling thread. |
176 virtual void AddResourceToDirectory(const GURL& parent_content_url, | 176 virtual void AddResourceToDirectory(const GURL& parent_content_url, |
177 const GURL& resource_url, | 177 const GURL& resource_url, |
178 const EntryActionCallback& callback) = 0; | 178 const EntryActionCallback& callback) = 0; |
179 | 179 |
180 // Removes a resource (document, file, collection) identified by its | 180 // Removes a resource (document, file, collection) identified by its |
181 // 'self' link |resource_url| from a collection with a content link | 181 // |resource_id| from a collection with a content link |
182 // |parent_content_url|. Upon completion, invokes |callback| with | 182 // |parent_content_url|. Upon completion, invokes |callback| with |
183 // results on the calling thread. | 183 // results on the calling thread. |
184 virtual void RemoveResourceFromDirectory( | 184 virtual void RemoveResourceFromDirectory( |
185 const GURL& parent_content_url, | 185 const GURL& parent_content_url, |
186 const GURL& resource_url, | |
187 const std::string& resource_id, | 186 const std::string& resource_id, |
188 const EntryActionCallback& callback) = 0; | 187 const EntryActionCallback& callback) = 0; |
189 | 188 |
190 // Adds new collection with |directory_name| under parent directory | 189 // Adds new collection with |directory_name| under parent directory |
191 // identified with |parent_content_url|. If |parent_content_url| is empty, | 190 // identified with |parent_content_url|. If |parent_content_url| is empty, |
192 // the new collection will be created in the root. Upon completion, | 191 // the new collection will be created in the root. Upon completion, |
193 // invokes |callback| and passes newly created entry on the calling thread. | 192 // invokes |callback| and passes newly created entry on the calling thread. |
194 // This function cannot be named as "CreateDirectory" as it conflicts with | 193 // This function cannot be named as "CreateDirectory" as it conflicts with |
195 // a macro on Windows. | 194 // a macro on Windows. |
196 virtual void AddNewDirectory(const GURL& parent_content_url, | 195 virtual void AddNewDirectory(const GURL& parent_content_url, |
(...skipping 24 matching lines...) Expand all Loading... |
221 // Authorizes a Drive app with the id |app_id| to open the given document. | 220 // Authorizes a Drive app with the id |app_id| to open the given document. |
222 // Upon completion, invokes |callback| with results on the calling thread. | 221 // Upon completion, invokes |callback| with results on the calling thread. |
223 virtual void AuthorizeApp(const GURL& resource_url, | 222 virtual void AuthorizeApp(const GURL& resource_url, |
224 const std::string& app_id, | 223 const std::string& app_id, |
225 const GetDataCallback& callback) = 0; | 224 const GetDataCallback& callback) = 0; |
226 }; | 225 }; |
227 | 226 |
228 } // namespace google_apis | 227 } // namespace google_apis |
229 | 228 |
230 #endif // CHROME_BROWSER_GOOGLE_APIS_DRIVE_SERVICE_INTERFACE_H_ | 229 #endif // CHROME_BROWSER_GOOGLE_APIS_DRIVE_SERVICE_INTERFACE_H_ |
OLD | NEW |