Exemplo n.º 1
0
int ReceiverBindingService::GetServiceCapabilities(_trv__GetServiceCapabilities *trv__GetServiceCapabilities, _trv__GetServiceCapabilitiesResponse *trv__GetServiceCapabilitiesResponse) 
{
	std::cout << __FUNCTION__ << std::endl;
	ServiceContext* ctx = (ServiceContext*)this->soap->user;
	trv__GetServiceCapabilitiesResponse->Capabilities = ctx->getReceiverServiceCapabilities(this->soap);	
	return SOAP_OK;
}
Exemplo n.º 2
0
int DeviceBindingService::GetServices(_tds__GetServices *tds__GetServices, _tds__GetServicesResponse *tds__GetServicesResponse) 
{
	std::cout << __FUNCTION__ << std::endl;
	ServiceContext* ctx = (ServiceContext*)this->soap->user;	
	std::ostringstream os;
	os << "http://" << ctx->getServerIpFromClientIp(htonl(this->soap->ip)) << ":" << ctx->m_port;
	std::string url(os.str());
	
	tds__GetServicesResponse->Service.push_back(soap_new_tds__Service(this->soap));
	tds__GetServicesResponse->Service.back()->Namespace  = "http://www.onvif.org/ver10/device/wsdl";
	tds__GetServicesResponse->Service.back()->XAddr = url;
	tds__GetServicesResponse->Service.back()->Version = soap_new_req_tt__OnvifVersion(this->soap,2,5);
	if (tds__GetServices->IncludeCapability)
	{
		tds__GetServicesResponse->Service.back()->Capabilities = soap_new__tds__Service_Capabilities(this->soap);
		tds__DeviceServiceCapabilities *capabilities = ctx->getDeviceServiceCapabilities(this->soap);
		tds__GetServicesResponse->Service.back()->Capabilities->__any = soap_dom_element(this->soap, NULL, "tds:Capabilities", capabilities, capabilities->soap_type());
	}

	tds__GetServicesResponse->Service.push_back(soap_new_tds__Service(this->soap));
	tds__GetServicesResponse->Service.back()->Namespace  = "http://www.onvif.org/ver10/media/wsdl";
	tds__GetServicesResponse->Service.back()->XAddr = url;
	tds__GetServicesResponse->Service.back()->Version = soap_new_req_tt__OnvifVersion(this->soap,2,6);
	if (tds__GetServices->IncludeCapability)
	{
		tds__GetServicesResponse->Service.back()->Capabilities = soap_new__tds__Service_Capabilities(this->soap);
		trt__Capabilities *capabilities = ctx->getMediaServiceCapabilities(this->soap);
		tds__GetServicesResponse->Service.back()->Capabilities->__any = soap_dom_element(this->soap, NULL, "trt:Capabilities", capabilities, capabilities->soap_type());
	}


	tds__GetServicesResponse->Service.push_back(soap_new_tds__Service(this->soap));
	tds__GetServicesResponse->Service.back()->Namespace  = "http://www.onvif.org/ver20/imaging/wsdl";
	tds__GetServicesResponse->Service.back()->XAddr = url;
	tds__GetServicesResponse->Service.back()->Version = soap_new_req_tt__OnvifVersion(this->soap,2,5);
	if (tds__GetServices->IncludeCapability)
	{
		tds__GetServicesResponse->Service.back()->Capabilities = soap_new__tds__Service_Capabilities(this->soap);
		timg__Capabilities *capabilities = ctx->getImagingServiceCapabilities(this->soap);
		tds__GetServicesResponse->Service.back()->Capabilities->__any = soap_dom_element(this->soap, NULL, "timg:Capabilities", capabilities, capabilities->soap_type());
	}

	
	tds__GetServicesResponse->Service.push_back(soap_new_tds__Service(this->soap));
	tds__GetServicesResponse->Service.back()->Namespace  = "http://www.onvif.org/ver10/events/wsdl";
	tds__GetServicesResponse->Service.back()->XAddr = url;
	tds__GetServicesResponse->Service.back()->Version = soap_new_req_tt__OnvifVersion(this->soap,2,6);
	if (tds__GetServices->IncludeCapability)
	{
		tds__GetServicesResponse->Service.back()->Capabilities = soap_new__tds__Service_Capabilities(this->soap);
		tev__Capabilities *capabilities = ctx->getEventServiceCapabilities(this->soap);
		tds__GetServicesResponse->Service.back()->Capabilities->__any = soap_dom_element(this->soap, NULL, "tev:Capabilities", capabilities, capabilities->soap_type());
	}

	tds__GetServicesResponse->Service.push_back(soap_new_tds__Service(this->soap));
	tds__GetServicesResponse->Service.back()->Namespace  = "http://www.onvif.org/ver10/recording/wsdl";
	tds__GetServicesResponse->Service.back()->XAddr = url;
	tds__GetServicesResponse->Service.back()->Version = soap_new_req_tt__OnvifVersion(this->soap,2,5);
	if (tds__GetServices->IncludeCapability)
	{
		tds__GetServicesResponse->Service.back()->Capabilities = soap_new__tds__Service_Capabilities(this->soap);
		trc__Capabilities *capabilities = ctx->getRecordingServiceCapabilities(this->soap);
		tds__GetServicesResponse->Service.back()->Capabilities->__any = soap_dom_element(this->soap, NULL, "trc:Capabilities", capabilities, capabilities->soap_type());
	}

	tds__GetServicesResponse->Service.push_back(soap_new_tds__Service(this->soap));
	tds__GetServicesResponse->Service.back()->Namespace  = "http://www.onvif.org/ver10/replay/wsdl";
	tds__GetServicesResponse->Service.back()->XAddr = url;
	tds__GetServicesResponse->Service.back()->Version = soap_new_req_tt__OnvifVersion(this->soap,2,2);
	if (tds__GetServices->IncludeCapability)
	{
		tds__GetServicesResponse->Service.back()->Capabilities = soap_new__tds__Service_Capabilities(this->soap);
		trp__Capabilities *capabilities = ctx->getReplayServiceCapabilities(this->soap);
		tds__GetServicesResponse->Service.back()->Capabilities->__any = soap_dom_element(this->soap, NULL, "trp:Capabilities", capabilities, capabilities->soap_type());
	}

	tds__GetServicesResponse->Service.push_back(soap_new_tds__Service(this->soap));
	tds__GetServicesResponse->Service.back()->Namespace  = "http://www.onvif.org/ver10/search/wsdl";
	tds__GetServicesResponse->Service.back()->XAddr = url;
	tds__GetServicesResponse->Service.back()->Version = soap_new_req_tt__OnvifVersion(this->soap,2,4);
	if (tds__GetServices->IncludeCapability)
	{
		tds__GetServicesResponse->Service.back()->Capabilities = soap_new__tds__Service_Capabilities(this->soap);
		tse__Capabilities *capabilities = ctx->getSearchServiceCapabilities(this->soap);
		tds__GetServicesResponse->Service.back()->Capabilities->__any = soap_dom_element(this->soap, NULL, "trs:Capabilities", capabilities, capabilities->soap_type());
	}

	tds__GetServicesResponse->Service.push_back(soap_new_tds__Service(this->soap));
	tds__GetServicesResponse->Service.back()->Namespace  = "http://www.onvif.org/ver10/display/wsdl";
	tds__GetServicesResponse->Service.back()->XAddr = url;
	tds__GetServicesResponse->Service.back()->Version = soap_new_req_tt__OnvifVersion(this->soap,2,1);
	if (tds__GetServices->IncludeCapability)
	{
		tds__GetServicesResponse->Service.back()->Capabilities = soap_new__tds__Service_Capabilities(this->soap);
		tls__Capabilities *capabilities = ctx->getDisplayServiceCapabilities(this->soap);
		tds__GetServicesResponse->Service.back()->Capabilities->__any = soap_dom_element(this->soap, NULL, "tls:Capabilities", capabilities, capabilities->soap_type());
	}

	tds__GetServicesResponse->Service.push_back(soap_new_tds__Service(this->soap));
	tds__GetServicesResponse->Service.back()->Namespace  = "http://www.onvif.org/ver10/deviceIO/wsdl";
	tds__GetServicesResponse->Service.back()->XAddr = url;
	tds__GetServicesResponse->Service.back()->Version = soap_new_req_tt__OnvifVersion(this->soap,2,6);
	if (tds__GetServices->IncludeCapability)
	{
		tds__GetServicesResponse->Service.back()->Capabilities = soap_new__tds__Service_Capabilities(this->soap);
		tmd__Capabilities *capabilities = ctx->getDeviceIOServiceCapabilities(this->soap);
		tds__GetServicesResponse->Service.back()->Capabilities->__any = soap_dom_element(this->soap, NULL, "tmd:Capabilities", capabilities, capabilities->soap_type());
	}
	
	tds__GetServicesResponse->Service.push_back(soap_new_tds__Service(this->soap));
	tds__GetServicesResponse->Service.back()->Namespace  = "http://www.onvif.org/ver10/receiver/wsdl";
	tds__GetServicesResponse->Service.back()->XAddr = url;
	tds__GetServicesResponse->Service.back()->Version = soap_new_req_tt__OnvifVersion(this->soap,2,1);
	if (tds__GetServices->IncludeCapability)
	{
		tds__GetServicesResponse->Service.back()->Capabilities = soap_new__tds__Service_Capabilities(this->soap);
		trv__Capabilities *capabilities = ctx->getReceiverServiceCapabilities(this->soap);
		tds__GetServicesResponse->Service.back()->Capabilities->__any = soap_dom_element(this->soap, NULL, "trv:Capabilities", capabilities, capabilities->soap_type());
	}
	
	
	return SOAP_OK;
}