// ********************************************************************** // // Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved. // // This copy of Ice is licensed to you under the terms described in the // ICE_LICENSE file included in this distribution. // // ********************************************************************** // // Ice version 3.7.0 // // // // Generated from file `RtspAnalysServer.ice' // // Warning: do not edit this file. // // // #include #include #include #include #include #include #include #include #if defined(_MSC_VER) # pragma warning(disable:4458) // declaration of ... hides class member #elif defined(__clang__) # pragma clang diagnostic ignored "-Wshadow" #elif defined(__GNUC__) # pragma GCC diagnostic ignored "-Wshadow" #endif #ifndef ICE_IGNORE_VERSION # if ICE_INT_VERSION / 100 != 307 # error Ice version mismatch! # endif # if ICE_INT_VERSION % 100 > 50 # error Beta header file detected # endif # if ICE_INT_VERSION % 100 < 0 # error Ice patch level mismatch! # endif #endif #ifdef ICE_CPP11_MAPPING // C++11 mapping namespace { const ::std::string iceC_RtspAnalys_RtspAnalysServer_ids[2] = { "::Ice::Object", "::RtspAnalys::RtspAnalysServer" }; const ::std::string iceC_RtspAnalys_RtspAnalysServer_ops[] = { "ice_id", "ice_ids", "ice_isA", "ice_ping", "recordVideo" }; const ::std::string iceC_RtspAnalys_RtspAnalysServer_recordVideo_name = "recordVideo"; } bool RtspAnalys::RtspAnalysServer::ice_isA(::std::string s, const ::Ice::Current&) const { return ::std::binary_search(iceC_RtspAnalys_RtspAnalysServer_ids, iceC_RtspAnalys_RtspAnalysServer_ids + 2, s); } ::std::vector<::std::string> RtspAnalys::RtspAnalysServer::ice_ids(const ::Ice::Current&) const { return ::std::vector<::std::string>(&iceC_RtspAnalys_RtspAnalysServer_ids[0], &iceC_RtspAnalys_RtspAnalysServer_ids[2]); } ::std::string RtspAnalys::RtspAnalysServer::ice_id(const ::Ice::Current&) const { return ice_staticId(); } const ::std::string& RtspAnalys::RtspAnalysServer::ice_staticId() { static const ::std::string typeId = "::RtspAnalys::RtspAnalysServer"; return typeId; } bool RtspAnalys::RtspAnalysServer::_iceD_recordVideo(::IceInternal::Incoming& inS, const ::Ice::Current& current) { _iceCheckMode(::Ice::OperationMode::Normal, current.mode); auto istr = inS.startReadParams(); ::std::string iceP_name; istr->readAll(iceP_name); inS.endReadParams(); ::std::string ret = this->recordVideo(::std::move(iceP_name), current); auto ostr = inS.startWriteParams(); ostr->writeAll(ret); inS.endWriteParams(); return true; } bool RtspAnalys::RtspAnalysServer::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current) { ::std::pair r = ::std::equal_range(iceC_RtspAnalys_RtspAnalysServer_ops, iceC_RtspAnalys_RtspAnalysServer_ops + 5, current.operation); if(r.first == r.second) { throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); } switch(r.first - iceC_RtspAnalys_RtspAnalysServer_ops) { case 0: { return _iceD_ice_id(in, current); } case 1: { return _iceD_ice_ids(in, current); } case 2: { return _iceD_ice_isA(in, current); } case 3: { return _iceD_ice_ping(in, current); } case 4: { return _iceD_recordVideo(in, current); } default: { assert(false); throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); } } } void RtspAnalys::RtspAnalysServerPrx::_iceI_recordVideo(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<::std::string>>& outAsync, const ::std::string& iceP_name, const ::Ice::Context& context) { _checkTwowayOnly(iceC_RtspAnalys_RtspAnalysServer_recordVideo_name); outAsync->invoke(iceC_RtspAnalys_RtspAnalysServer_recordVideo_name, ::Ice::OperationMode::Normal, ::Ice::FormatType::DefaultFormat, context, [&](::Ice::OutputStream* ostr) { ostr->writeAll(iceP_name); }, nullptr); } ::std::shared_ptr<::Ice::ObjectPrx> RtspAnalys::RtspAnalysServerPrx::_newInstance() const { return ::IceInternal::createProxy(); } const ::std::string& RtspAnalys::RtspAnalysServerPrx::ice_staticId() { return RtspAnalys::RtspAnalysServer::ice_staticId(); } #else // C++98 mapping namespace { const ::std::string iceC_RtspAnalys_RtspAnalysServer_recordVideo_name = "recordVideo"; } ::IceProxy::Ice::Object* ::IceProxy::RtspAnalys::upCast(::IceProxy::RtspAnalys::RtspAnalysServer* p) { return p; } void ::IceProxy::RtspAnalys::_readProxy(::Ice::InputStream* istr, ::IceInternal::ProxyHandle< ::IceProxy::RtspAnalys::RtspAnalysServer>& v) { ::Ice::ObjectPrx proxy; istr->read(proxy); if(!proxy) { v = 0; } else { v = new ::IceProxy::RtspAnalys::RtspAnalysServer; v->_copyFrom(proxy); } } ::Ice::AsyncResultPtr IceProxy::RtspAnalys::RtspAnalysServer::_iceI_begin_recordVideo(const ::std::string& iceP_name, const ::Ice::Context& context, const ::IceInternal::CallbackBasePtr& del, const ::Ice::LocalObjectPtr& cookie, bool sync) { _checkTwowayOnly(iceC_RtspAnalys_RtspAnalysServer_recordVideo_name, sync); ::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(this, iceC_RtspAnalys_RtspAnalysServer_recordVideo_name, del, cookie, sync); try { result->prepare(iceC_RtspAnalys_RtspAnalysServer_recordVideo_name, ::Ice::Normal, context); ::Ice::OutputStream* ostr = result->startWriteParams(::Ice::DefaultFormat); ostr->write(iceP_name); result->endWriteParams(); result->invoke(iceC_RtspAnalys_RtspAnalysServer_recordVideo_name); } catch(const ::Ice::Exception& ex) { result->abort(ex); } return result; } ::std::string IceProxy::RtspAnalys::RtspAnalysServer::end_recordVideo(const ::Ice::AsyncResultPtr& result) { ::Ice::AsyncResult::_check(result, this, iceC_RtspAnalys_RtspAnalysServer_recordVideo_name); ::std::string ret; if(!result->_waitForResponse()) { try { result->_throwUserException(); } catch(const ::Ice::UserException& ex) { throw ::Ice::UnknownUserException(__FILE__, __LINE__, ex.ice_id()); } } ::Ice::InputStream* istr = result->_startReadParams(); istr->read(ret); result->_endReadParams(); return ret; } ::IceProxy::Ice::Object* IceProxy::RtspAnalys::RtspAnalysServer::_newInstance() const { return new RtspAnalysServer; } const ::std::string& IceProxy::RtspAnalys::RtspAnalysServer::ice_staticId() { return ::RtspAnalys::RtspAnalysServer::ice_staticId(); } RtspAnalys::RtspAnalysServer::~RtspAnalysServer() { } ::Ice::Object* RtspAnalys::upCast(::RtspAnalys::RtspAnalysServer* p) { return p; } namespace { const ::std::string iceC_RtspAnalys_RtspAnalysServer_ids[2] = { "::Ice::Object", "::RtspAnalys::RtspAnalysServer" }; } bool RtspAnalys::RtspAnalysServer::ice_isA(const ::std::string& s, const ::Ice::Current&) const { return ::std::binary_search(iceC_RtspAnalys_RtspAnalysServer_ids, iceC_RtspAnalys_RtspAnalysServer_ids + 2, s); } ::std::vector< ::std::string> RtspAnalys::RtspAnalysServer::ice_ids(const ::Ice::Current&) const { return ::std::vector< ::std::string>(&iceC_RtspAnalys_RtspAnalysServer_ids[0], &iceC_RtspAnalys_RtspAnalysServer_ids[2]); } const ::std::string& RtspAnalys::RtspAnalysServer::ice_id(const ::Ice::Current&) const { return ice_staticId(); } const ::std::string& RtspAnalys::RtspAnalysServer::ice_staticId() { #ifdef ICE_HAS_THREAD_SAFE_LOCAL_STATIC static const ::std::string typeId = "::RtspAnalys::RtspAnalysServer"; return typeId; #else return iceC_RtspAnalys_RtspAnalysServer_ids[1]; #endif } bool RtspAnalys::RtspAnalysServer::_iceD_recordVideo(::IceInternal::Incoming& inS, const ::Ice::Current& current) { _iceCheckMode(::Ice::Normal, current.mode); ::Ice::InputStream* istr = inS.startReadParams(); ::std::string iceP_name; istr->read(iceP_name); inS.endReadParams(); ::std::string ret = this->recordVideo(iceP_name, current); ::Ice::OutputStream* ostr = inS.startWriteParams(); ostr->write(ret); inS.endWriteParams(); return true; } namespace { const ::std::string iceC_RtspAnalys_RtspAnalysServer_all[] = { "ice_id", "ice_ids", "ice_isA", "ice_ping", "recordVideo" }; } bool RtspAnalys::RtspAnalysServer::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current) { ::std::pair r = ::std::equal_range(iceC_RtspAnalys_RtspAnalysServer_all, iceC_RtspAnalys_RtspAnalysServer_all + 5, current.operation); if(r.first == r.second) { throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); } switch(r.first - iceC_RtspAnalys_RtspAnalysServer_all) { case 0: { return _iceD_ice_id(in, current); } case 1: { return _iceD_ice_ids(in, current); } case 2: { return _iceD_ice_isA(in, current); } case 3: { return _iceD_ice_ping(in, current); } case 4: { return _iceD_recordVideo(in, current); } default: { assert(false); throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); } } } void RtspAnalys::RtspAnalysServer::_iceWriteImpl(::Ice::OutputStream* ostr) const { ostr->startSlice(ice_staticId(), -1, true); Ice::StreamWriter< ::RtspAnalys::RtspAnalysServer, ::Ice::OutputStream>::write(ostr, *this); ostr->endSlice(); } void RtspAnalys::RtspAnalysServer::_iceReadImpl(::Ice::InputStream* istr) { istr->startSlice(); Ice::StreamReader< ::RtspAnalys::RtspAnalysServer, ::Ice::InputStream>::read(istr, *this); istr->endSlice(); } void RtspAnalys::_icePatchObjectPtr(RtspAnalysServerPtr& handle, const ::Ice::ObjectPtr& v) { handle = ::RtspAnalys::RtspAnalysServerPtr::dynamicCast(v); if(v && !handle) { IceInternal::Ex::throwUOE(::RtspAnalys::RtspAnalysServer::ice_staticId(), v); } } namespace Ice { } #endif