apmanager: support for WiFi devices and interfaces

Added DeviceInfo for enumerating WiFi devices (PHYs) and detecting
WiFi interfaces. Also Created a Device class for abstracting WiFi PHYs,
which will maintain the device's capabilities and manage interfaces
created on the device.

Integrate Device with Manager and Config to allow user to start
an AP service without providing interface information.

Next up, will focus on parsing HT/VHT capabilities for each band and
integrate it into ap configuration. Also adding shill support for
claim/release interface.

BUG=chromium:431763
TEST=unittest

Change-Id: I62f4251064483b57e264d1278fde68022a737aea
Reviewed-on: https://chromium-review.googlesource.com/231257
Reviewed-by: Peter Qiu <zqiu@chromium.org>
Commit-Queue: Peter Qiu <zqiu@chromium.org>
Tested-by: Peter Qiu <zqiu@chromium.org>
diff --git a/mock_device.h b/mock_device.h
new file mode 100644
index 0000000..2f0ee53
--- /dev/null
+++ b/mock_device.h
@@ -0,0 +1,38 @@
+// Copyright 2014 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_DEVICE_H_
+#define APMANAGER_MOCK_DEVICE_H_
+
+#include <string>
+
+#include <base/macros.h>
+#include <gmock/gmock.h>
+
+#include "apmanager/device.h"
+
+namespace apmanager {
+
+class MockDevice : public Device {
+ public:
+  MockDevice();
+  ~MockDevice() override;
+
+  MOCK_METHOD1(RegisterInterface,
+               void(const WiFiInterface& interface));
+  MOCK_METHOD1(DeregisterInterface,
+               void(const WiFiInterface& interface));
+  MOCK_METHOD1(ParseWiFiPhyInfo,
+               void(const shill::Nl80211Message& msg));
+  MOCK_METHOD0(ClaimDevice, bool());
+  MOCK_METHOD0(ReleaseDevice, bool());
+  MOCK_METHOD1(InterfaceExists, bool(const std::string& interface_name));
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(MockDevice);
+};
+
+}  // namespace apmanager
+
+#endif  // APMANAGER_MOCK_DEVICE_H_