예제 #1
0
int RecordingBindingService::GetTrackConfiguration(_trc__GetTrackConfiguration *trc__GetTrackConfiguration, _trc__GetTrackConfigurationResponse *trc__GetTrackConfigurationResponse) 
{
	std::cout << __FUNCTION__ << std::endl;
	ServiceContext* ctx = (ServiceContext*)this->soap->user;
	
	auto it = ctx->m_devices.find(trc__GetTrackConfiguration->RecordingToken);
	if ( (it != ctx->m_devices.end()) && (trc__GetTrackConfiguration->TrackToken == "video") )
	{
		trc__GetTrackConfigurationResponse->TrackConfiguration = ctx->getTracksCfg(this->soap);
	}
	return SOAP_OK;
}
예제 #2
0
int RecordingBindingService::GetRecordings(_trc__GetRecordings *trc__GetRecordings, _trc__GetRecordingsResponse *trc__GetRecordingsResponse) 
{
	std::cout << __FUNCTION__ << std::endl;
	ServiceContext* ctx = (ServiceContext*)this->soap->user;
	
	trc__GetRecordingsResponse->RecordingItem.push_back(soap_new_tt__GetRecordingsResponseItem(this->soap));
	for (auto it: ctx->m_devices) 
	{		
		trc__GetRecordingsResponse->RecordingItem.back()->RecordingToken = it.first;
		trc__GetRecordingsResponse->RecordingItem.back()->Configuration	= ctx->getRecordingCfg(this->soap);
		trc__GetRecordingsResponse->RecordingItem.back()->Tracks = soap_new_tt__GetTracksResponseList(soap);
		trc__GetRecordingsResponse->RecordingItem.back()->Tracks->Track.push_back(soap_new_tt__GetTracksResponseItem(soap));
		trc__GetRecordingsResponse->RecordingItem.back()->Tracks->Track.back()->TrackToken = "video";
		trc__GetRecordingsResponse->RecordingItem.back()->Tracks->Track.back()->Configuration = ctx->getTracksCfg(this->soap);
	}
	return SOAP_OK;
}