| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 virtual void SetPWGRasterConverterForTesting( | 130 virtual void SetPWGRasterConverterForTesting( |
| 131 scoped_ptr<PWGRasterConverter> pwg_raster_converter) = 0; | 131 scoped_ptr<PWGRasterConverter> pwg_raster_converter) = 0; |
| 132 | 132 |
| 133 virtual PrivetHTTPClient* GetHTTPClient() = 0; | 133 virtual PrivetHTTPClient* GetHTTPClient() = 0; |
| 134 }; | 134 }; |
| 135 | 135 |
| 136 // Privet HTTP client. Must not outlive the operations it creates. | 136 // Privet HTTP client. Must not outlive the operations it creates. |
| 137 class PrivetHTTPClient { | 137 class PrivetHTTPClient { |
| 138 public: | 138 public: |
| 139 virtual ~PrivetHTTPClient() {} | 139 virtual ~PrivetHTTPClient() {} |
| 140 virtual const base::DictionaryValue* GetCachedInfo() const = 0; | |
| 141 | 140 |
| 142 virtual scoped_ptr<PrivetRegisterOperation> CreateRegisterOperation( | 141 virtual scoped_ptr<PrivetRegisterOperation> CreateRegisterOperation( |
| 143 const std::string& user, | 142 const std::string& user, |
| 144 PrivetRegisterOperation::Delegate* delegate) = 0; | 143 PrivetRegisterOperation::Delegate* delegate) = 0; |
| 145 virtual scoped_ptr<PrivetJSONOperation> CreateInfoOperation( | 144 virtual scoped_ptr<PrivetJSONOperation> CreateInfoOperation( |
| 146 const PrivetJSONOperation::ResultCallback& callback) = 0; | 145 const PrivetJSONOperation::ResultCallback& callback) = 0; |
| 147 virtual scoped_ptr<PrivetJSONOperation> CreateCapabilitiesOperation( | 146 virtual scoped_ptr<PrivetJSONOperation> CreateCapabilitiesOperation( |
| 148 const PrivetJSONOperation::ResultCallback& callback) = 0; | 147 const PrivetJSONOperation::ResultCallback& callback) = 0; |
| 149 virtual scoped_ptr<PrivetLocalPrintOperation> CreateLocalPrintOperation( | 148 virtual scoped_ptr<PrivetLocalPrintOperation> CreateLocalPrintOperation( |
| 150 PrivetLocalPrintOperation::Delegate* delegate) = 0; | 149 PrivetLocalPrintOperation::Delegate* delegate) = 0; |
| 151 virtual scoped_ptr<PrivetJSONOperation> CreateStorageListOperation( | 150 virtual scoped_ptr<PrivetJSONOperation> CreateStorageListOperation( |
| 152 const std::string& path, | 151 const std::string& path, |
| 153 const PrivetJSONOperation::ResultCallback& callback) = 0; | 152 const PrivetJSONOperation::ResultCallback& callback) = 0; |
| 154 | 153 |
| 155 // A name for the HTTP client, e.g. the device name for the privet device. | 154 // A name for the HTTP client, e.g. the device name for the privet device. |
| 156 virtual const std::string& GetName() = 0; | 155 virtual const std::string& GetName() = 0; |
| 157 }; | 156 }; |
| 158 | 157 |
| 159 } // namespace local_discovery | 158 } // namespace local_discovery |
| 160 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_H_ | 159 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_H_ |
| OLD | NEW |