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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 public: | 47 public: |
48 virtual ~PrivetHTTPClient() {} | 48 virtual ~PrivetHTTPClient() {} |
49 | 49 |
50 // A name for the HTTP client, e.g. the device name for the privet device. | 50 // A name for the HTTP client, e.g. the device name for the privet device. |
51 virtual const std::string& GetName() = 0; | 51 virtual const std::string& GetName() = 0; |
52 | 52 |
53 // Creates operation to query basic information about local device. | 53 // Creates operation to query basic information about local device. |
54 virtual scoped_ptr<PrivetJSONOperation> CreateInfoOperation( | 54 virtual scoped_ptr<PrivetJSONOperation> CreateInfoOperation( |
55 const PrivetJSONOperation::ResultCallback& callback) = 0; | 55 const PrivetJSONOperation::ResultCallback& callback) = 0; |
56 | 56 |
| 57 // Creates a URL fetcher for PrivetV1. |
57 virtual scoped_ptr<PrivetURLFetcher> CreateURLFetcher( | 58 virtual scoped_ptr<PrivetURLFetcher> CreateURLFetcher( |
58 const GURL& url, | 59 const GURL& url, |
59 net::URLFetcher::RequestType request_type, | 60 net::URLFetcher::RequestType request_type, |
60 PrivetURLFetcher::Delegate* delegate) = 0; | 61 PrivetURLFetcher::Delegate* delegate) = 0; |
61 | 62 |
62 virtual void RefreshPrivetToken( | 63 virtual void RefreshPrivetToken( |
63 const PrivetURLFetcher::TokenCallback& token_callback) = 0; | 64 const PrivetURLFetcher::TokenCallback& token_callback) = 0; |
64 }; | 65 }; |
65 | 66 |
66 class PrivetDataReadOperation { | 67 class PrivetDataReadOperation { |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 const PrivetJSONOperation::ResultCallback& callback) = 0; | 215 const PrivetJSONOperation::ResultCallback& callback) = 0; |
215 | 216 |
216 // Creates operation to read data from local Privet storage. | 217 // Creates operation to read data from local Privet storage. |
217 virtual scoped_ptr<PrivetDataReadOperation> CreateStorageReadOperation( | 218 virtual scoped_ptr<PrivetDataReadOperation> CreateStorageReadOperation( |
218 const std::string& path, | 219 const std::string& path, |
219 const PrivetDataReadOperation::ResultCallback& callback) = 0; | 220 const PrivetDataReadOperation::ResultCallback& callback) = 0; |
220 }; | 221 }; |
221 | 222 |
222 } // namespace local_discovery | 223 } // namespace local_discovery |
223 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_H_ | 224 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_HTTP_H_ |
OLD | NEW |