| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_LOCAL_DISCOVERY_PRIVET_HTTP_H_ | 5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_H_ |
| 6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_H_ | 6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 virtual void OnPrivetPrintingError( | 151 virtual void OnPrivetPrintingError( |
| 152 const PrivetLocalPrintOperation* print_operation, int http_code) = 0; | 152 const PrivetLocalPrintOperation* print_operation, int http_code) = 0; |
| 153 }; | 153 }; |
| 154 | 154 |
| 155 virtual ~PrivetLocalPrintOperation() {} | 155 virtual ~PrivetLocalPrintOperation() {} |
| 156 | 156 |
| 157 virtual void Start() = 0; | 157 virtual void Start() = 0; |
| 158 | 158 |
| 159 | 159 |
| 160 // Required print data. MUST be called before calling |Start()|. | 160 // Required print data. MUST be called before calling |Start()|. |
| 161 virtual void SetData(base::RefCountedBytes* data) = 0; | 161 virtual void SetData(const scoped_refptr<base::RefCountedBytes>& data) = 0; |
| 162 | 162 |
| 163 // Optional attributes for /submitdoc. Call before calling |Start()| | 163 // Optional attributes for /submitdoc. Call before calling |Start()| |
| 164 // |ticket| should be in CJT format. | 164 // |ticket| should be in CJT format. |
| 165 virtual void SetTicket(const std::string& ticket) = 0; | 165 virtual void SetTicket(const std::string& ticket) = 0; |
| 166 // |capabilities| should be in CDD format. | 166 // |capabilities| should be in CDD format. |
| 167 virtual void SetCapabilities(const std::string& capabilities) = 0; | 167 virtual void SetCapabilities(const std::string& capabilities) = 0; |
| 168 // Username and jobname are for display only. | 168 // Username and jobname are for display only. |
| 169 virtual void SetUsername(const std::string& username) = 0; | 169 virtual void SetUsername(const std::string& username) = 0; |
| 170 virtual void SetJobname(const std::string& jobname) = 0; | 170 virtual void SetJobname(const std::string& jobname) = 0; |
| 171 // If |offline| is true, we will indicate to the printer not to post the job | 171 // If |offline| is true, we will indicate to the printer not to post the job |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 const PrivetJSONOperation::ResultCallback& callback) = 0; | 215 const PrivetJSONOperation::ResultCallback& callback) = 0; |
| 216 | 216 |
| 217 // Creates operation to read data from local Privet storage. | 217 // Creates operation to read data from local Privet storage. |
| 218 virtual scoped_ptr<PrivetDataReadOperation> CreateStorageReadOperation( | 218 virtual scoped_ptr<PrivetDataReadOperation> CreateStorageReadOperation( |
| 219 const std::string& path, | 219 const std::string& path, |
| 220 const PrivetDataReadOperation::ResultCallback& callback) = 0; | 220 const PrivetDataReadOperation::ResultCallback& callback) = 0; |
| 221 }; | 221 }; |
| 222 | 222 |
| 223 } // namespace local_discovery | 223 } // namespace local_discovery |
| 224 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_H_ | 224 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_H_ |
| OLD | NEW |