int MediaBindingService::GetProfiles(_trt__GetProfiles *trt__GetProfiles, _trt__GetProfilesResponse *trt__GetProfilesResponse) { std::cout << __FUNCTION__ << std::endl; ServiceContext* ctx = (ServiceContext*)this->soap->user; for (auto it: ctx->m_devices) { trt__GetProfilesResponse->Profiles.push_back(ctx->getProfile(this->soap, it.first)); } return SOAP_OK; }
int MediaBindingService::GetProfile(_trt__GetProfile *trt__GetProfile, _trt__GetProfileResponse *trt__GetProfileResponse) { std::cout << __FUNCTION__ << std::endl; ServiceContext* ctx = (ServiceContext*)this->soap->user; int ret = SOAP_FAULT; std::cout << __FUNCTION__ << " search for profile:" << trt__GetProfile->ProfileToken << std::endl; auto it = ctx->m_devices.find(trt__GetProfile->ProfileToken); if (it != ctx->m_devices.end()) { trt__GetProfileResponse->Profile = ctx->getProfile(this->soap, it->first); ret = SOAP_OK; } return ret; }