Delete the callback function from the specified context.
MCO_RET mco_iot_comm_unregister_callback(mco_iot_comm_h comm,
void *context);
comm
context
This function deletes the callback structure
iot_comm_callback_t for
communicator comm from the specified context. Note that this
function does not delete the context. It finds
the registered callback using context as a key and removes the
callbacks from the list. If context is a heap pointer to some
application data, the data will not be freed
by this function.
MCO_S_OK
MCO_E_IOT_INVALID_HANDLE
comm is invalid.MCO_E_IOT_CALLBACK_NOT_FOUND
context.The code snippet below unregisters the callbacks previously registered for this context (see mco_iot_comm_register_callback() for definition of the callbacks):
int main(int argc, char *argv[])
{
...
void *context = ...;
...
mco_iot_comm_register_callback(comm, &iot_callbacks, context);
...
CHECK(mco_iot_comm_unregister_callback(comm, context));
...
}