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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 virtual void SetPWGRasterConverterForTesting( | 154 virtual void SetPWGRasterConverterForTesting( |
155 scoped_ptr<PWGRasterConverter> pwg_raster_converter) = 0; | 155 scoped_ptr<PWGRasterConverter> pwg_raster_converter) = 0; |
156 | 156 |
157 virtual PrivetHTTPClient* GetHTTPClient() = 0; | 157 virtual PrivetHTTPClient* GetHTTPClient() = 0; |
158 }; | 158 }; |
159 | 159 |
160 // Privet HTTP client. Must not outlive the operations it creates. | 160 // Privet HTTP client. Must not outlive the operations it creates. |
161 class PrivetHTTPClient { | 161 class PrivetHTTPClient { |
162 public: | 162 public: |
163 virtual ~PrivetHTTPClient() {} | 163 virtual ~PrivetHTTPClient() {} |
164 virtual const base::DictionaryValue* GetCachedInfo() const = 0; | |
165 | 164 |
166 virtual scoped_ptr<PrivetRegisterOperation> CreateRegisterOperation( | 165 virtual scoped_ptr<PrivetRegisterOperation> CreateRegisterOperation( |
167 const std::string& user, | 166 const std::string& user, |
168 PrivetRegisterOperation::Delegate* delegate) = 0; | 167 PrivetRegisterOperation::Delegate* delegate) = 0; |
169 virtual scoped_ptr<PrivetJSONOperation> CreateInfoOperation( | 168 virtual scoped_ptr<PrivetJSONOperation> CreateInfoOperation( |
170 const PrivetJSONOperation::ResultCallback& callback) = 0; | 169 const PrivetJSONOperation::ResultCallback& callback) = 0; |
171 virtual scoped_ptr<PrivetJSONOperation> CreateCapabilitiesOperation( | 170 virtual scoped_ptr<PrivetJSONOperation> CreateCapabilitiesOperation( |
172 const PrivetJSONOperation::ResultCallback& callback) = 0; | 171 const PrivetJSONOperation::ResultCallback& callback) = 0; |
173 virtual scoped_ptr<PrivetLocalPrintOperation> CreateLocalPrintOperation( | 172 virtual scoped_ptr<PrivetLocalPrintOperation> CreateLocalPrintOperation( |
174 PrivetLocalPrintOperation::Delegate* delegate) = 0; | 173 PrivetLocalPrintOperation::Delegate* delegate) = 0; |
175 virtual scoped_ptr<PrivetJSONOperation> CreateStorageListOperation( | 174 virtual scoped_ptr<PrivetJSONOperation> CreateStorageListOperation( |
176 const std::string& path, | 175 const std::string& path, |
177 const PrivetJSONOperation::ResultCallback& callback) = 0; | 176 const PrivetJSONOperation::ResultCallback& callback) = 0; |
178 virtual scoped_ptr<PrivetDataReadOperation> CreateStorageReadOperation( | 177 virtual scoped_ptr<PrivetDataReadOperation> CreateStorageReadOperation( |
179 const std::string& path, | 178 const std::string& path, |
180 const PrivetDataReadOperation::ResultCallback& callback) = 0; | 179 const PrivetDataReadOperation::ResultCallback& callback) = 0; |
181 | 180 |
182 // A name for the HTTP client, e.g. the device name for the privet device. | 181 // A name for the HTTP client, e.g. the device name for the privet device. |
183 virtual const std::string& GetName() = 0; | 182 virtual const std::string& GetName() = 0; |
184 }; | 183 }; |
185 | 184 |
186 } // namespace local_discovery | 185 } // namespace local_discovery |
187 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_H_ | 186 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_H_ |
OLD | NEW |