apmanager: claim interfaces from shill

apmanager requires sole ownership of a device before it can successfully
start a hostapd on that device.

The support for reclaiming interfaces from shill when an instance of
shill is started/restarted is not in yet. It requires support for registering
DBusNameOwnerChanged callback to the dbus_object_proxy_ which is not possible
in the current generated proxy code.

BUG=chromium:435704
TEST=unittests and manual test using apmanager on stumpy router

Change-Id: I7f737d0bf55f31c1e4ed2a7e5ffe04943ea056db
Reviewed-on: https://chromium-review.googlesource.com/232752
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Peter Qiu <zqiu@chromium.org>
Tested-by: Peter Qiu <zqiu@chromium.org>
diff --git a/mock_manager.h b/mock_manager.h
index aa909df..08ae117 100644
--- a/mock_manager.h
+++ b/mock_manager.h
@@ -25,6 +25,8 @@
   MOCK_METHOD0(GetAvailableDevice, scoped_refptr<Device>());
   MOCK_METHOD1(GetDeviceFromInterfaceName,
                scoped_refptr<Device>(const std::string& interface_name));
+  MOCK_METHOD1(ClaimInterface, void(const std::string& interface_name));
+  MOCK_METHOD1(ReleaseInterface, void(const std::string& interface_name));
 
  private:
   DISALLOW_COPY_AND_ASSIGN(MockManager);