apmanager: monitor events from hostapd control interface

Monitor hostapd control interface for unsolicited event notifications,
such as station connect and disconnect events.

BUG=chromium:431759
TEST=USE="asan clang" FEATURES=test emerge-$BOARD apmanager
Manual Test:
1. Setup an AP service using apmanager.
2. Connect a client to the AP, verify that "Station connected" message is
   in "/var/log/message".
3. Disconnect the client from the AP, verify that "Station disconnect"
   message is in "/var/log/message".

Change-Id: I7410411c43db9670d7ae5e4cf4f9d83a2a2c6337
Reviewed-on: https://chromium-review.googlesource.com/240548
Trybot-Ready: Zeping Qiu <zqiu@chromium.org>
Tested-by: Zeping Qiu <zqiu@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Zeping Qiu <zqiu@chromium.org>
diff --git a/mock_hostapd_monitor.h b/mock_hostapd_monitor.h
new file mode 100644
index 0000000..1f4859c
--- /dev/null
+++ b/mock_hostapd_monitor.h
@@ -0,0 +1,27 @@
+// Copyright 2015 The Chromium OS 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 APMANAGER_MOCK_HOSTAPD_MONITOR_H_
+#define APMANAGER_MOCK_HOSTAPD_MONITOR_H_
+
+#include <gmock/gmock.h>
+
+#include "apmanager/hostapd_monitor.h"
+
+namespace apmanager {
+
+class MockHostapdMonitor : public HostapdMonitor {
+ public:
+  MockHostapdMonitor();
+  ~MockHostapdMonitor() override;
+
+  MOCK_METHOD0(Start, void());
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(MockHostapdMonitor);
+};
+
+}  // namespace apmanager
+
+#endif  // APMANAGER_MOCK_HOSTAPD_MONITOR_H_