本文整理汇总了C++中irecv_client_t::disconnected_callback方法的典型用法代码示例。如果您正苦于以下问题:C++ irecv_client_t::disconnected_callback方法的具体用法?C++ irecv_client_t::disconnected_callback怎么用?C++ irecv_client_t::disconnected_callback使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类irecv_client_t
的用法示例。
在下文中一共展示了irecv_client_t::disconnected_callback方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: irecv_close
irecv_error_t irecv_close(irecv_client_t client) {
if (client != NULL) {
if(client->disconnected_callback != NULL) {
irecv_event_t event;
event.size = 0;
event.data = NULL;
event.progress = 0;
event.type = IRECV_DISCONNECTED;
client->disconnected_callback(client, &event);
}
#ifndef WIN32
if (client->handle != NULL) {
if (client->mode != kDfuMode) {
libusb_release_interface(client->handle, client->interface);
}
libusb_close(client->handle);
client->handle = NULL;
}
#else
if (client->iBootPath!=NULL) {
free(client->iBootPath);
client->iBootPath = NULL;
}
if (client->DfuPath!=NULL) {
free(client->DfuPath);
client->DfuPath = NULL;
}
mobiledevice_closepipes(client);
#endif
free(client);
client = NULL;
}
return IRECV_E_SUCCESS;
}
示例2: irecv_close
irecv_error_t irecv_close(irecv_client_t client) {
if (client != NULL) {
if(client->disconnected_callback != NULL) {
irecv_event_t event;
event.size = 0;
event.data = NULL;
event.progress = 0;
event.type = IRECV_DISCONNECTED;
client->disconnected_callback(client, &event);
}
if (client->handle != NULL) {
libusb_release_interface(client->handle, client->interface);
libusb_close(client->handle);
client->handle = NULL;
}
if (libirecovery_context != NULL) {
libusb_exit(libirecovery_context);
libirecovery_context = NULL;
}
free(client);
client = NULL;
}
return IRECV_E_SUCCESS;
}