| 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 | 134 |
| 135 virtual void Start() = 0; | 135 virtual void Start() = 0; |
| 136 | 136 |
| 137 | 137 |
| 138 // Required print data. MUST be called before calling |Start()|. | 138 // Required print data. MUST be called before calling |Start()|. |
| 139 virtual void SetData(base::RefCountedBytes* data) = 0; | 139 virtual void SetData(base::RefCountedBytes* data) = 0; |
| 140 | 140 |
| 141 // Optional attributes for /submitdoc. Call before calling |Start()| | 141 // Optional attributes for /submitdoc. Call before calling |Start()| |
| 142 // |ticket| should be in CJT format. | 142 // |ticket| should be in CJT format. |
| 143 virtual void SetTicket(const std::string& ticket) = 0; | 143 virtual void SetTicket(const std::string& ticket) = 0; |
| 144 // |capabilities| should be in CDD format. |
| 145 virtual void SetCapabilities(const std::string& capabilities) = 0; |
| 144 // Username and jobname are for display only. | 146 // Username and jobname are for display only. |
| 145 virtual void SetUsername(const std::string& username) = 0; | 147 virtual void SetUsername(const std::string& username) = 0; |
| 146 virtual void SetJobname(const std::string& jobname) = 0; | 148 virtual void SetJobname(const std::string& jobname) = 0; |
| 147 // If |offline| is true, we will indicate to the printer not to post the job | 149 // If |offline| is true, we will indicate to the printer not to post the job |
| 148 // to Google Cloud Print. | 150 // to Google Cloud Print. |
| 149 virtual void SetOffline(bool offline) = 0; | 151 virtual void SetOffline(bool offline) = 0; |
| 150 // Document page size. | 152 // Document page size. |
| 151 virtual void SetPageSize(const gfx::Size& page_size) = 0; | 153 virtual void SetPageSize(const gfx::Size& page_size) = 0; |
| 152 | 154 |
| 153 // For testing, inject an alternative PWG raster converter. | 155 // For testing, inject an alternative PWG raster converter. |
| (...skipping 23 matching lines...) Expand all Loading... |
| 177 virtual scoped_ptr<PrivetDataReadOperation> CreateStorageReadOperation( | 179 virtual scoped_ptr<PrivetDataReadOperation> CreateStorageReadOperation( |
| 178 const std::string& path, | 180 const std::string& path, |
| 179 const PrivetDataReadOperation::ResultCallback& callback) = 0; | 181 const PrivetDataReadOperation::ResultCallback& callback) = 0; |
| 180 | 182 |
| 181 // A name for the HTTP client, e.g. the device name for the privet device. | 183 // A name for the HTTP client, e.g. the device name for the privet device. |
| 182 virtual const std::string& GetName() = 0; | 184 virtual const std::string& GetName() = 0; |
| 183 }; | 185 }; |
| 184 | 186 |
| 185 } // namespace local_discovery | 187 } // namespace local_discovery |
| 186 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_H_ | 188 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_H_ |
| OLD | NEW |