Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1039)

Unified Diff: chrome/browser/local_discovery/privet_device_resolver.h

Issue 131503013: Added PrivetDeviceResolver to resolve a device and parse it as a privet device (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/local_discovery/privet_device_resolver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..8e82bf9034d8fa0c89518c2c512142f323fbc899
--- /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;
+
+ PrivetDeviceResolver(
+ ServiceDiscoveryClient* service_discovery_client,
+ const std::string& service_name,
+ const ResultCallback& callback);
+ ~PrivetDeviceResolver();
+
+ void Start();
+
+ private:
+ void OnServiceResolved(
+ ServiceResolver::RequestStatus request_status,
+ 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_
« no previous file with comments | « no previous file | chrome/browser/local_discovery/privet_device_resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698