diff options
author | San Mehat <san@google.com> | 2009-06-15 14:10:44 -0700 |
---|---|---|
committer | San Mehat <san@google.com> | 2009-06-15 14:20:02 -0700 |
commit | 3aff2d1de59972684bf2ab798351be5544158239 (patch) | |
tree | e16fdc00ec3615dc4257ef1b57b2d0f49437fdcf /nexus/NetworkManager.cpp | |
parent | 669a7011e7e23c0594242465caa15b46b92aa340 (diff) | |
download | system_core-3aff2d1de59972684bf2ab798351be5544158239.zip system_core-3aff2d1de59972684bf2ab798351be5544158239.tar.gz system_core-3aff2d1de59972684bf2ab798351be5544158239.tar.bz2 |
Nexus: Clean up supplicant events, protocol, and continue plumbing
- Create SupplicantEvent classes for events
- New SupplicantEventFactory for creating events
- Extract Controller -> NetworkManager callbacks into IControllerHandler
- Move ScanResult handling from Supplicant -> WifiController
- Plumb more 'onConnected()' code
- Instead of re-creating NetworkList every-time, merge in
new entries
- Extract SupplicantListener -> Supplicant callbacks into
ISupplicantEventHandler
- Move SupplicantListener callback handling to WifiController
- Add unlocked version of lookupNetwork()
- Save supplicant config after setting a WifiNetwork variable
- Move property registration from WifiNetwork -> Supplicant
- Change wifi enable broadcast messages
- Add 3 new events: 'onAssociating', 'onAssociated', 'onConnectionTimeout'
- Add support for handling KeyManagement
Signed-off-by: San Mehat <san@google.com>
Diffstat (limited to 'nexus/NetworkManager.cpp')
-rw-r--r-- | nexus/NetworkManager.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/nexus/NetworkManager.cpp b/nexus/NetworkManager.cpp index f4ae88f..2f13a40 100644 --- a/nexus/NetworkManager.cpp +++ b/nexus/NetworkManager.cpp @@ -89,23 +89,26 @@ Controller *NetworkManager::findController(const char *name) { return NULL; } -int NetworkManager::onInterfaceStart(Controller *c, const InterfaceConfig *cfg) { +void NetworkManager::onInterfaceStarted(Controller *c, const InterfaceConfig *cfg) { LOGD("Interface %s started by controller %s", c->getBoundInterface(), c->getName()); // Look up the interface if (0) { // already started? - errno = EADDRINUSE; - return -1; } - if (cfg->getUseDhcp()) { + if (cfg) { + if (cfg->getUseDhcp()) { + // Launch DHCP thread + } else { + // Static configuration + } } else { + LOGD("No InterfaceConfig for %s:%s - assuming self-managed", + c->getName(), c->getBoundInterface()); } - return 0; } -int NetworkManager::onInterfaceStop(Controller *c, const char *name) { +void NetworkManager::onInterfaceStopping(Controller *c, const char *name) { LOGD("Interface %s stopped by controller %s", name, c->getName()); - return 0; } |