Exemple #1
0
/**
 * Parse the service description from the service's SCPD URL. Do not call
 * this from user applications.
 * 
 * @param service The service in question
 * @return true if successful; otherwise false
 */
bool mupnp_controlpoint_parsescservicescpd(mUpnpService *service)
{
	mUpnpNetURL *scpdURL;
	bool scpdParseSuccess;
	
	mupnp_log_debug_l4("Entering...\n");

	scpdURL = mupnp_service_getscpdurl(service); 

	if ( NULL == scpdURL )		
		return false;
	
	mupnp_log_debug_s("SCPD URL: %s\n", mupnp_net_url_getrequest(scpdURL));
	scpdParseSuccess = mupnp_service_parsedescriptionurl(service, scpdURL);
	
	mupnp_net_url_delete(scpdURL);
	if (scpdParseSuccess == true)
		return true;

#if defined(MUPNP_USE_STDDCP)
	if (mupnp_service_hasstddcp(service)) {
		char *stdDCP = mupnp_service_getstddcp(service);
		scpdParseSuccess = mupnp_service_parsedescription(service, stdDCP, mupnp_strlen(stdDCP));
	}
#endif

	mupnp_log_debug_l4("Leaving...\n");

	return scpdParseSuccess;
}
Exemple #2
0
BOOL mupnp_service_hasstddcp(mUpnpService *service)
{
	return (mupnp_service_getstddcp(service) != NULL) ? TRUE : FALSE;
}