//////////////////////////////////////// //stop the client //////////////////////////////////////// int TvCtrlPointStop( void ) { TvCtrlPointRemoveAll( ); UpnpUnRegisterClient( ctrlpt_handle ); UpnpFinish( ); SampleUtil_Finish( ); return TV_SUCCESS; }
/******************************************************************************** * TvCtrlPointRefresh * * Description: * Clear the current global device list and issue new search * requests to build it up again from scratch. * * Parameters: * None * ********************************************************************************/ int TvCtrlPointRefresh(void) { int rc; TvCtrlPointRemoveAll(); /* Search for all devices of type tvdevice version 1, * waiting for up to 5 seconds for the response */ rc = UpnpSearchAsync(ctrlpt_handle, 5, TvDeviceType, NULL); if (UPNP_E_SUCCESS != rc) { SampleUtil_Print("Error sending search request%d\n", rc); return TV_ERROR; } return TV_SUCCESS; }
/******************************************************************************** * TvCtrlPointRefresh * * Description: * Clear the current global device list and issue new search * requests to build it up again from scratch. * * Parameters: * None * ********************************************************************************/ int Tvctrlpointrefresh( void ) { int rc; TvCtrlPointRemoveAll( ); /*upnp:rootdevice Search for all devices of type tvdevice version 1, waiting for up to 5 seconds for the response */ rc = UpnpSearchAsync( ctrlpt_handle, 5, TvDeviceType, NULL ); if( UPNP_E_SUCCESS != rc ) { printf( "Error sending search request%d", rc ); return TV_ERROR; } printf("Tvctrlpointrefresh ok\n"); return TV_SUCCESS; }