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:
- 121:dfe65a93f26b
- Parent:
- 120:2a4b2664adf9
- Child:
- 127:b4a661ff6fb9
--- a/source/ConnectorEndpoint.cpp Thu Jun 01 17:19:50 2017 +0000 +++ b/source/ConnectorEndpoint.cpp Mon Jun 05 21:28:42 2017 +0000 @@ -302,11 +302,21 @@ } else { // enable hooks for Updater support (R1.2+) (if enabled) -#ifdef MBED_CLOUD_CLIENT_SUPPORT_UPDATE +#ifdef MBED_CLOUD_CLIENT_SUPPORT_UPDATE + // Establish the updater hook update_ui_set_cloud_client(this->m_endpoint_interface); + + // Update Authorize Handler (optional, disabled by default) +#ifdef ENABLE_UPDATE_AUTHORIZE_HANDLER this->m_endpoint_interface->set_update_authorize_handler(&Connector::Endpoint::update_authorize); +#endif + + // Update Progress Handler (optional, disabled by default) +#ifdef ENABLE_UPDATE_PROGRESS_HANDLER this->m_endpoint_interface->set_update_progress_handler(&Connector::Endpoint::update_progress); #endif + +#endif } } else { @@ -502,7 +512,7 @@ // mbed-cloud-client: update_authorized void Endpoint::update_authorize(int32_t request) { - // simple debug for now... + // simple debug for now... this will NOT authorize the update request... printf("Connector::Endpoint(Cloud) Update Authorize: request: %d\n",(int)request); }