| Index: chrome/browser/extensions/api/dial/mdns_service.h
|
| diff --git a/chrome/browser/extensions/api/dial/mdns_service.h b/chrome/browser/extensions/api/dial/mdns_service.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..60e186b73318c4722efd1ffaf183acbd2d0ae1a1
|
| --- /dev/null
|
| +++ b/chrome/browser/extensions/api/dial/mdns_service.h
|
| @@ -0,0 +1,37 @@
|
| +// Copyright (c) 2013 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_EXTENSIONS_API_DIAL_MDNS_SERVICE_H_
|
| +#define CHROME_BROWSER_EXTENSIONS_API_DIAL_MDNS_SERVICE_H_
|
| +
|
| +#include "chrome/browser/local_discovery/service_discovery_host_client.h"
|
| +#include "chrome/common/local_discovery/service_discovery_client.h"
|
| +
|
| +namespace extensions {
|
| +
|
| +// Service for managing the mDNS device lister.
|
| +class MDNSService {
|
| + public:
|
| + // TODO(justinlin): Should be singleton.
|
| + explicit MDNSService(std::string service_type);
|
| + ~MDNSService();
|
| +
|
| + bool Start();
|
| + void Stop();
|
| + void Discover(bool force_update);
|
| +
|
| + private:
|
| + void OnServiceUpdated(
|
| + local_discovery::ServiceWatcher::UpdateType update,
|
| + const std::string& service_name);
|
| +
|
| + const std::string service_type_;
|
| + local_discovery::ServiceDiscoveryClient* service_discovery_client_;
|
| + scoped_ptr<local_discovery::ServiceWatcher> service_watcher_;
|
| + bool started_;
|
| +};
|
| +
|
| +} // namespace extensions
|
| +
|
| +#endif // CHROME_BROWSER_EXTENSIONS_API_DIAL_MDNS_SERVICE_H_
|
|
|