1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_DEVICE_RESOLVER_H_
6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_DEVICE_RESOLVER_H_
10 #include "base/callback.h"
11 #include "chrome/browser/local_discovery/device_description.h"
12 #include "chrome/common/local_discovery/service_discovery_client.h"
14 namespace local_discovery
{
16 class PrivetDeviceResolver
{
18 typedef base::Callback
<void(bool /*success*/,
19 const DeviceDescription
& /*description*/)>
23 ServiceDiscoveryClient
* service_discovery_client
,
24 const std::string
& service_name
,
25 const ResultCallback
& callback
);
26 ~PrivetDeviceResolver();
31 void OnServiceResolved(
32 ServiceResolver::RequestStatus request_status
,
33 const ServiceDescription
& service_description
);
36 ServiceDiscoveryClient
* service_discovery_client_
;
37 scoped_ptr
<ServiceResolver
> service_resolver_
;
38 std::string service_name_
;
39 ResultCallback callback_
;
42 } // namespace local_discovery
44 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_DEVICE_RESOLVER_H_