| 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_CHROMEOS_GDATA_DRIVE_SERVICE_INTERFACE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_SERVICE_INTERFACE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_SERVICE_INTERFACE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_SERVICE_INTERFACE_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/chromeos/gdata/operations_base.h" | 8 #include "chrome/browser/chromeos/gdata/operations_base.h" |
| 9 // TODO(kochi): Further split gdata_operations.h and include only necessary | 9 // TODO(kochi): Further split gdata_operations.h and include only necessary |
| 10 // headers. http://crbug.com/141469 | 10 // headers. http://crbug.com/141469 |
| 11 // DownloadActionCallback/InitiateUploadParams/ResulmeUploadParams | 11 // DownloadActionCallback/InitiateUploadParams/ResulmeUploadParams |
| 12 #include "chrome/browser/chromeos/gdata/gdata_operations.h" | 12 #include "chrome/browser/chromeos/gdata/gdata_operations.h" |
| 13 | 13 |
| 14 class Profile; | 14 class Profile; |
| 15 | 15 |
| 16 namespace gdata { | 16 namespace gdata { |
| 17 | 17 |
| 18 class GDataOperationRegistry; | 18 class OperationRegistry; |
| 19 | 19 |
| 20 // Document export format. | 20 // Document export format. |
| 21 enum DocumentExportFormat { | 21 enum DocumentExportFormat { |
| 22 PDF, // Portable Document Format. (all documents) | 22 PDF, // Portable Document Format. (all documents) |
| 23 PNG, // Portable Networks Graphic Image Format (all documents) | 23 PNG, // Portable Networks Graphic Image Format (all documents) |
| 24 HTML, // HTML Format (text documents and spreadsheets). | 24 HTML, // HTML Format (text documents and spreadsheets). |
| 25 TXT, // Text file (text documents and presentations). | 25 TXT, // Text file (text documents and presentations). |
| 26 DOC, // Word (text documents only). | 26 DOC, // Word (text documents only). |
| 27 ODT, // Open Document Format (text documents only). | 27 ODT, // Open Document Format (text documents only). |
| 28 RTF, // Rich Text Format (text documents only). | 28 RTF, // Rich Text Format (text documents only). |
| (...skipping 21 matching lines...) Expand all Loading... |
| 50 class DriveServiceInterface { | 50 class DriveServiceInterface { |
| 51 public: | 51 public: |
| 52 virtual ~DriveServiceInterface() {} | 52 virtual ~DriveServiceInterface() {} |
| 53 | 53 |
| 54 // Common service: | 54 // Common service: |
| 55 | 55 |
| 56 // Initializes the documents service tied with |profile|. | 56 // Initializes the documents service tied with |profile|. |
| 57 virtual void Initialize(Profile* profile) = 0; | 57 virtual void Initialize(Profile* profile) = 0; |
| 58 | 58 |
| 59 // Retrieves the operation registry. | 59 // Retrieves the operation registry. |
| 60 virtual GDataOperationRegistry* operation_registry() const = 0; | 60 virtual OperationRegistry* operation_registry() const = 0; |
| 61 | 61 |
| 62 // Cancels all in-flight operations. | 62 // Cancels all in-flight operations. |
| 63 virtual void CancelAll() = 0; | 63 virtual void CancelAll() = 0; |
| 64 | 64 |
| 65 // Authentication service: | 65 // Authentication service: |
| 66 | 66 |
| 67 // Authenticates the user by fetching the auth token as | 67 // Authenticates the user by fetching the auth token as |
| 68 // needed. |callback| will be run with the error code and the auth | 68 // needed. |callback| will be run with the error code and the auth |
| 69 // token, on the thread this function is run. | 69 // token, on the thread this function is run. |
| 70 virtual void Authenticate(const AuthStatusCallback& callback) = 0; | 70 virtual void Authenticate(const AuthStatusCallback& callback) = 0; |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 // Authorizes a Drive app with the id |app_id| to open the given document. | 192 // Authorizes a Drive app with the id |app_id| to open the given document. |
| 193 // Upon completion, invokes |callback| with results on the calling thread. | 193 // Upon completion, invokes |callback| with results on the calling thread. |
| 194 virtual void AuthorizeApp(const GURL& resource_url, | 194 virtual void AuthorizeApp(const GURL& resource_url, |
| 195 const std::string& app_id, | 195 const std::string& app_id, |
| 196 const GetDataCallback& callback) = 0; | 196 const GetDataCallback& callback) = 0; |
| 197 }; | 197 }; |
| 198 | 198 |
| 199 } // namespace gdata | 199 } // namespace gdata |
| 200 | 200 |
| 201 #endif // CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_SERVICE_INTERFACE_H_ | 201 #endif // CHROME_BROWSER_CHROMEOS_GDATA_DRIVE_SERVICE_INTERFACE_H_ |
| OLD | NEW |