diff options
author | Gaurav Shah <gauravsh@chromium.org> | 2011-11-17 19:01:07 -0800 |
---|---|---|
committer | Gaurav Shah <gauravsh@chromium.org> | 2011-11-28 09:52:14 -0800 |
commit | 435de2cd55a95836381b53acbce8cbbad98ec04d (patch) | |
tree | f148d9803a49bcb9d50d44a706ed4377cad33764 /mock_service.h | |
parent | c6d6c72920d32299e8ae1cb3a7dbbb13a0741b13 (diff) | |
download | shill-435de2cd55a95836381b53acbce8cbbad98ec04d.tar.gz |
Implement {Available|Connected|Enabled}Technolgies and DefaultTechnology
This is Part 1 of a series of changes required for the Manager to generate
the right set of DBus events allowing shill to properly tell Chrome about
connectivity.
Some other side-effects in the change (needed to implement the above):
- Emit these manager properties over DBus everytime we re-sort the Service
vector.
- Add a technology data member to Device, this allows easy enumeration of
technologies.
- Add interface for getting a handle to the selected service on a device.
- Map connected state to online instead of ready state. This is needed for
so that Chrome doesn't wait for the portal detection code to switch the
state from ready->online.
- Default set the ethernet service as connectable.
BUG=chromium-os:14887
TEST=1) manual test to verify shill properly configures the ethernet
device and Chrome correctly detects that.
2) new unit tests
Change-Id: Ib10f2f0836f8d4aacaad1491f58ed9b3b5d37e7d
Reviewed-on: https://gerrit.chromium.org/gerrit/12019
Tested-by: Gaurav Shah <gauravsh@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Diffstat (limited to 'mock_service.h')
-rw-r--r-- | mock_service.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mock_service.h b/mock_service.h index a9d738a0..d58503cc 100644 --- a/mock_service.h +++ b/mock_service.h @@ -10,6 +10,7 @@ #include "shill/refptr_types.h" #include "shill/service.h" +#include "shill/technology.h" namespace shill { @@ -26,8 +27,10 @@ class MockService : public Service { MOCK_METHOD1(CalculateState, std::string(Error *error)); MOCK_CONST_METHOD1(TechnologyIs, bool(const Technology::Identifier technology)); - MOCK_METHOD1(SetState, void(ConnectState state)); MOCK_CONST_METHOD0(state, ConnectState()); + MOCK_METHOD1(SetState, void(ConnectState state)); + MOCK_CONST_METHOD0(IsConnected, bool()); + MOCK_CONST_METHOD0(IsConnecting, bool()); MOCK_METHOD1(SetFailure, void(ConnectFailure failure)); MOCK_CONST_METHOD0(failure, ConnectFailure()); MOCK_METHOD1(GetDeviceRpcId, std::string(Error *error)); @@ -35,7 +38,7 @@ class MockService : public Service { MOCK_CONST_METHOD0(GetStorageIdentifier, std::string()); MOCK_METHOD1(Load, bool(StoreInterface *store_interface)); MOCK_METHOD1(Save, bool(StoreInterface *store_interface)); - + MOCK_CONST_METHOD0(technology, Technology::Identifier()); // Set a string for this Service via |store|. Can be wired to Save() for // test purposes. bool FauxSave(StoreInterface *store); |