mbed Connector Interface simplification API on top of mbed-client
Fork of mbedConnectorInterfaceV3 by
NOTE:
This repo has been replaced with https://github.com/ARMmbed/mbedConnectorInterface. No further updates will occur with this repo. Please use the github repo instead. Thanks!
Diff: source/ConnectorEndpoint.cpp
- Revision:
- 83:8d856fa24fda
- Parent:
- 82:e085176f6719
- Child:
- 84:e5f53e7492cb
--- a/source/ConnectorEndpoint.cpp Fri Nov 04 23:22:01 2016 +0000 +++ b/source/ConnectorEndpoint.cpp Fri Nov 04 23:27:59 2016 +0000 @@ -463,44 +463,24 @@ #ifdef ENABLE_MBED_CLOUD_SUPPORT // object registered -void Endpoint::on_registered() { - this->logger()->log("Connector::Endpoint(Cloud): endpoint registered."); - this->m_connected = true; - this->m_registered = true; - if (this->m_csi != NULL) { - this->m_csi->object_registered((void *)this); +void Endpoint::on_registered() { + if (__endpoint != NULL) { + __endpoint->object_registered(NULL,NULL); } } // registration updated void Endpoint::on_registration_updated() { - this->logger()->log("Connector::Endpoint(Cloud): endpoint re-registered."); - this->m_connected = true; - this->m_registered = true; - if (this->m_csi != NULL) { - this->m_csi->registration_updated((void *)this); + if (__endpoint != NULL) { + __endpoint->registration_updated(NULL,NULL); } } // object unregistered void Endpoint::on_unregistered() { - // DEBUG - this->logger()->log("Connector::Endpoint(Cloud): endpoint de-registered."); - - // no longer connected/registered - this->m_registered = false; - this->m_connected = false; - - // stop all observers... - this->stopObservations(); - - // invoke ConnectionHandler if we have one... - if (this->m_csi != NULL) { - this->m_csi->object_unregistered((void *)this); + if (__endpoint != NULL) { + __endpoint->object_unregistered(NULL,NULL); } - - // halt the main event loop... we are done. - net_shutdown_endpoint(); } #endif