summaryrefslogtreecommitdiffstats
path: root/chromeos/dbus/fake_ap_manager_client.h
diff options
context:
space:
mode:
authordtapuska <dtapuska@chromium.org>2015-03-09 11:01:37 -0700
committerCommit bot <commit-bot@chromium.org>2015-03-09 18:02:04 +0000
commit4bca047f2cc173183673d799d1bd148cea08efa6 (patch)
tree7394a5f154fe412247d090e0413a928dfe16b02b /chromeos/dbus/fake_ap_manager_client.h
parent6c7f969a830fe55df8b3be5a55305168b1c26106 (diff)
downloadchromium_src-4bca047f2cc173183673d799d1bd148cea08efa6.zip
chromium_src-4bca047f2cc173183673d799d1bd148cea08efa6.tar.gz
chromium_src-4bca047f2cc173183673d799d1bd148cea08efa6.tar.bz2
apmanager: Add dbus implementation to chromium.
Add a dbus implementation for the wifi ap manager. ap_manager is a ChromeOS service that manages the hostapd instance; this is a dbus binding that the ChromeOS service. BUG=463194 Review URL: https://codereview.chromium.org/980973003 Cr-Commit-Position: refs/heads/master@{#319682}
Diffstat (limited to 'chromeos/dbus/fake_ap_manager_client.h')
-rw-r--r--chromeos/dbus/fake_ap_manager_client.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/chromeos/dbus/fake_ap_manager_client.h b/chromeos/dbus/fake_ap_manager_client.h
new file mode 100644
index 0000000..24b8cc6
--- /dev/null
+++ b/chromeos/dbus/fake_ap_manager_client.h
@@ -0,0 +1,49 @@
+// Copyright 2015 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 CHROMEOS_DBUS_FAKE_AP_MANAGER_CLIENT_H_
+#define CHROMEOS_DBUS_FAKE_AP_MANAGER_CLIENT_H_
+
+#include <map>
+#include <string>
+#include <vector>
+
+#include "chromeos/dbus/ap_manager_client.h"
+
+namespace chromeos {
+
+// A fake implementation of ApManagerClient. Invokes callbacks
+// immediately.
+class FakeApManagerClient : public ApManagerClient {
+ public:
+ FakeApManagerClient();
+ ~FakeApManagerClient() override;
+
+ // DBusClient overrides:
+ void Init(dbus::Bus* bus) override;
+
+ // ApManagerClient overrides:
+ void AddObserver(Observer* observer) override;
+ void RemoveObserver(Observer* observer) override;
+ void CreateService(const ObjectPathDBusMethodCallback& callback) override;
+ void RemoveService(const dbus::ObjectPath& object_path,
+ const VoidDBusMethodCallback& callback) override;
+ void StartService(const dbus::ObjectPath& object_path,
+ const VoidDBusMethodCallback& callback) override;
+ void StopService(const dbus::ObjectPath& object_path,
+ const VoidDBusMethodCallback& callback) override;
+ ConfigProperties* GetConfigProperties(
+ const dbus::ObjectPath& object_path) override;
+ const DeviceProperties* GetDeviceProperties(
+ const dbus::ObjectPath& object_path) override;
+ const ServiceProperties* GetServiceProperties(
+ const dbus::ObjectPath& object_path) override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(FakeApManagerClient);
+};
+
+} // namespace chromeos
+
+#endif // CHROMEOS_DBUS_FAKE_AP_MANAGER_CLIENT_H_