Chromium Code Reviews| Index: chrome/browser/local_discovery/privet_device_resolver.h |
| diff --git a/chrome/browser/local_discovery/privet_device_resolver.h b/chrome/browser/local_discovery/privet_device_resolver.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3fed2fe74d2fd6b687799363f1378a6088f467e4 |
| --- /dev/null |
| +++ b/chrome/browser/local_discovery/privet_device_resolver.h |
| @@ -0,0 +1,44 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_DEVICE_RESOLVER_H_ |
| +#define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_DEVICE_RESOLVER_H_ |
| + |
| +#include <string> |
| + |
| +#include "base/callback.h" |
| +#include "chrome/browser/local_discovery/device_description.h" |
| +#include "chrome/common/local_discovery/service_discovery_client.h" |
| + |
| +namespace local_discovery { |
| + |
| +class PrivetDeviceResolver { |
| + public: |
| + typedef base::Callback<void(bool /*success*/, |
| + const DeviceDescription& /*description*/)> |
| + ResultCallback; |
|
Vitaly Buka (NO REVIEWS)
2014/01/29 23:13:16
missaligned
Noam Samuel
2014/01/29 23:22:59
Done.
|
| + |
| + PrivetDeviceResolver( |
| + ServiceDiscoveryClient* service_discovery_client, |
|
Vitaly Buka (NO REVIEWS)
2014/01/29 23:13:16
missaligned
Noam Samuel
2014/01/29 23:22:59
Done.
|
| + const std::string& service_name, |
| + const ResultCallback& callback); |
| + ~PrivetDeviceResolver(); |
| + |
| + void Start(); |
| + |
| + private: |
| + void OnServiceResolved( |
| + ServiceResolver::RequestStatus request_status, |
|
Vitaly Buka (NO REVIEWS)
2014/01/29 23:13:16
same
Noam Samuel
2014/01/29 23:22:59
Done.
|
| + const ServiceDescription& service_description); |
| + |
| + |
| + ServiceDiscoveryClient* service_discovery_client_; |
| + scoped_ptr<ServiceResolver> service_resolver_; |
| + std::string service_name_; |
| + ResultCallback callback_; |
| +}; |
| + |
| +} // namespace local_discovery |
| + |
| +#endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_DEVICE_RESOLVER_H_ |