// ********************************************************************** // // 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 `RecordVideo.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_RecordVideo_Recorder_ids[2] = { "::Ice::Object", "::RecordVideo::Recorder" }; const ::std::string iceC_RecordVideo_Recorder_ops[] = { "ice_id", "ice_ids", "ice_isA", "ice_ping", "recordVideo" }; const ::std::string iceC_RecordVideo_Recorder_recordVideo_name = "recordVideo"; const ::std::string iceC_RecordVideo_ImageGrabber_ids[2] = { "::Ice::Object", "::RecordVideo::ImageGrabber" }; const ::std::string iceC_RecordVideo_ImageGrabber_ops[] = { "grabImage", "grabImageUrl", "ice_id", "ice_ids", "ice_isA", "ice_ping" }; const ::std::string iceC_RecordVideo_ImageGrabber_grabImage_name = "grabImage"; const ::std::string iceC_RecordVideo_ImageGrabber_grabImageUrl_name = "grabImageUrl"; const ::std::string iceC_RecordVideo_LoopRecorder_ids[2] = { "::Ice::Object", "::RecordVideo::LoopRecorder" }; const ::std::string iceC_RecordVideo_LoopRecorder_ops[] = { "addCamera", "clearCamera", "feedDog", "ice_id", "ice_ids", "ice_isA", "ice_ping", "removeCamera" }; const ::std::string iceC_RecordVideo_LoopRecorder_addCamera_name = "addCamera"; const ::std::string iceC_RecordVideo_LoopRecorder_removeCamera_name = "removeCamera"; const ::std::string iceC_RecordVideo_LoopRecorder_clearCamera_name = "clearCamera"; const ::std::string iceC_RecordVideo_LoopRecorder_feedDog_name = "feedDog"; } bool RecordVideo::Recorder::ice_isA(::std::string s, const ::Ice::Current&) const { return ::std::binary_search(iceC_RecordVideo_Recorder_ids, iceC_RecordVideo_Recorder_ids + 2, s); } ::std::vector<::std::string> RecordVideo::Recorder::ice_ids(const ::Ice::Current&) const { return ::std::vector<::std::string>(&iceC_RecordVideo_Recorder_ids[0], &iceC_RecordVideo_Recorder_ids[2]); } ::std::string RecordVideo::Recorder::ice_id(const ::Ice::Current&) const { return ice_staticId(); } const ::std::string& RecordVideo::Recorder::ice_staticId() { static const ::std::string typeId = "::RecordVideo::Recorder"; return typeId; } bool RecordVideo::Recorder::_iceD_recordVideo(::IceInternal::Incoming& inS, const ::Ice::Current& current) { _iceCheckMode(::Ice::OperationMode::Normal, current.mode); auto istr = inS.startReadParams(); ::std::string iceP_rtsp; long long int iceP_ms; istr->readAll(iceP_rtsp, iceP_ms); inS.endReadParams(); ::std::string ret = this->recordVideo(::std::move(iceP_rtsp), iceP_ms, current); auto ostr = inS.startWriteParams(); ostr->writeAll(ret); inS.endWriteParams(); return true; } bool RecordVideo::Recorder::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current) { ::std::pair r = ::std::equal_range(iceC_RecordVideo_Recorder_ops, iceC_RecordVideo_Recorder_ops + 5, current.operation); if(r.first == r.second) { throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); } switch(r.first - iceC_RecordVideo_Recorder_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); } } } bool RecordVideo::ImageGrabber::ice_isA(::std::string s, const ::Ice::Current&) const { return ::std::binary_search(iceC_RecordVideo_ImageGrabber_ids, iceC_RecordVideo_ImageGrabber_ids + 2, s); } ::std::vector<::std::string> RecordVideo::ImageGrabber::ice_ids(const ::Ice::Current&) const { return ::std::vector<::std::string>(&iceC_RecordVideo_ImageGrabber_ids[0], &iceC_RecordVideo_ImageGrabber_ids[2]); } ::std::string RecordVideo::ImageGrabber::ice_id(const ::Ice::Current&) const { return ice_staticId(); } const ::std::string& RecordVideo::ImageGrabber::ice_staticId() { static const ::std::string typeId = "::RecordVideo::ImageGrabber"; return typeId; } bool RecordVideo::ImageGrabber::_iceD_grabImage(::IceInternal::Incoming& inS, const ::Ice::Current& current) { _iceCheckMode(::Ice::OperationMode::Normal, current.mode); auto istr = inS.startReadParams(); int iceP_index; ::std::string iceP_time; istr->readAll(iceP_index, iceP_time); inS.endReadParams(); ::RecordVideo::ByteSequence ret = this->grabImage(iceP_index, ::std::move(iceP_time), current); auto ostr = inS.startWriteParams(); ostr->writeAll(ret); inS.endWriteParams(); return true; } bool RecordVideo::ImageGrabber::_iceD_grabImageUrl(::IceInternal::Incoming& inS, const ::Ice::Current& current) { _iceCheckMode(::Ice::OperationMode::Normal, current.mode); auto istr = inS.startReadParams(); int iceP_index; ::std::string iceP_time; istr->readAll(iceP_index, iceP_time); inS.endReadParams(); ::std::string ret = this->grabImageUrl(iceP_index, ::std::move(iceP_time), current); auto ostr = inS.startWriteParams(); ostr->writeAll(ret); inS.endWriteParams(); return true; } bool RecordVideo::ImageGrabber::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current) { ::std::pair r = ::std::equal_range(iceC_RecordVideo_ImageGrabber_ops, iceC_RecordVideo_ImageGrabber_ops + 6, current.operation); if(r.first == r.second) { throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); } switch(r.first - iceC_RecordVideo_ImageGrabber_ops) { case 0: { return _iceD_grabImage(in, current); } case 1: { return _iceD_grabImageUrl(in, current); } case 2: { return _iceD_ice_id(in, current); } case 3: { return _iceD_ice_ids(in, current); } case 4: { return _iceD_ice_isA(in, current); } case 5: { return _iceD_ice_ping(in, current); } default: { assert(false); throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); } } } bool RecordVideo::LoopRecorder::ice_isA(::std::string s, const ::Ice::Current&) const { return ::std::binary_search(iceC_RecordVideo_LoopRecorder_ids, iceC_RecordVideo_LoopRecorder_ids + 2, s); } ::std::vector<::std::string> RecordVideo::LoopRecorder::ice_ids(const ::Ice::Current&) const { return ::std::vector<::std::string>(&iceC_RecordVideo_LoopRecorder_ids[0], &iceC_RecordVideo_LoopRecorder_ids[2]); } ::std::string RecordVideo::LoopRecorder::ice_id(const ::Ice::Current&) const { return ice_staticId(); } const ::std::string& RecordVideo::LoopRecorder::ice_staticId() { static const ::std::string typeId = "::RecordVideo::LoopRecorder"; return typeId; } bool RecordVideo::LoopRecorder::_iceD_addCamera(::IceInternal::Incoming& inS, const ::Ice::Current& current) { _iceCheckMode(::Ice::OperationMode::Normal, current.mode); auto istr = inS.startReadParams(); ::std::string iceP_index; ::std::string iceP_rtsp; istr->readAll(iceP_index, iceP_rtsp); inS.endReadParams(); ::std::string ret = this->addCamera(::std::move(iceP_index), ::std::move(iceP_rtsp), current); auto ostr = inS.startWriteParams(); ostr->writeAll(ret); inS.endWriteParams(); return true; } bool RecordVideo::LoopRecorder::_iceD_removeCamera(::IceInternal::Incoming& inS, const ::Ice::Current& current) { _iceCheckMode(::Ice::OperationMode::Normal, current.mode); auto istr = inS.startReadParams(); ::std::string iceP_index; istr->readAll(iceP_index); inS.endReadParams(); this->removeCamera(::std::move(iceP_index), current); inS.writeEmptyParams(); return true; } bool RecordVideo::LoopRecorder::_iceD_clearCamera(::IceInternal::Incoming& inS, const ::Ice::Current& current) { _iceCheckMode(::Ice::OperationMode::Normal, current.mode); inS.readEmptyParams(); this->clearCamera(current); inS.writeEmptyParams(); return true; } bool RecordVideo::LoopRecorder::_iceD_feedDog(::IceInternal::Incoming& inS, const ::Ice::Current& current) { _iceCheckMode(::Ice::OperationMode::Normal, current.mode); auto istr = inS.startReadParams(); ::std::string iceP_index; istr->readAll(iceP_index); inS.endReadParams(); this->feedDog(::std::move(iceP_index), current); inS.writeEmptyParams(); return true; } bool RecordVideo::LoopRecorder::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current) { ::std::pair r = ::std::equal_range(iceC_RecordVideo_LoopRecorder_ops, iceC_RecordVideo_LoopRecorder_ops + 8, current.operation); if(r.first == r.second) { throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); } switch(r.first - iceC_RecordVideo_LoopRecorder_ops) { case 0: { return _iceD_addCamera(in, current); } case 1: { return _iceD_clearCamera(in, current); } case 2: { return _iceD_feedDog(in, current); } case 3: { return _iceD_ice_id(in, current); } case 4: { return _iceD_ice_ids(in, current); } case 5: { return _iceD_ice_isA(in, current); } case 6: { return _iceD_ice_ping(in, current); } case 7: { return _iceD_removeCamera(in, current); } default: { assert(false); throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); } } } void RecordVideo::RecorderPrx::_iceI_recordVideo(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<::std::string>>& outAsync, const ::std::string& iceP_rtsp, long long int iceP_ms, const ::Ice::Context& context) { _checkTwowayOnly(iceC_RecordVideo_Recorder_recordVideo_name); outAsync->invoke(iceC_RecordVideo_Recorder_recordVideo_name, ::Ice::OperationMode::Normal, ::Ice::FormatType::DefaultFormat, context, [&](::Ice::OutputStream* ostr) { ostr->writeAll(iceP_rtsp, iceP_ms); }, nullptr); } ::std::shared_ptr<::Ice::ObjectPrx> RecordVideo::RecorderPrx::_newInstance() const { return ::IceInternal::createProxy(); } const ::std::string& RecordVideo::RecorderPrx::ice_staticId() { return RecordVideo::Recorder::ice_staticId(); } void RecordVideo::ImageGrabberPrx::_iceI_grabImage(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<::RecordVideo::ByteSequence>>& outAsync, int iceP_index, const ::std::string& iceP_time, const ::Ice::Context& context) { _checkTwowayOnly(iceC_RecordVideo_ImageGrabber_grabImage_name); outAsync->invoke(iceC_RecordVideo_ImageGrabber_grabImage_name, ::Ice::OperationMode::Normal, ::Ice::FormatType::DefaultFormat, context, [&](::Ice::OutputStream* ostr) { ostr->writeAll(iceP_index, iceP_time); }, nullptr); } void RecordVideo::ImageGrabberPrx::_iceI_grabImageUrl(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<::std::string>>& outAsync, int iceP_index, const ::std::string& iceP_time, const ::Ice::Context& context) { _checkTwowayOnly(iceC_RecordVideo_ImageGrabber_grabImageUrl_name); outAsync->invoke(iceC_RecordVideo_ImageGrabber_grabImageUrl_name, ::Ice::OperationMode::Normal, ::Ice::FormatType::DefaultFormat, context, [&](::Ice::OutputStream* ostr) { ostr->writeAll(iceP_index, iceP_time); }, nullptr); } ::std::shared_ptr<::Ice::ObjectPrx> RecordVideo::ImageGrabberPrx::_newInstance() const { return ::IceInternal::createProxy(); } const ::std::string& RecordVideo::ImageGrabberPrx::ice_staticId() { return RecordVideo::ImageGrabber::ice_staticId(); } void RecordVideo::LoopRecorderPrx::_iceI_addCamera(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT<::std::string>>& outAsync, const ::std::string& iceP_index, const ::std::string& iceP_rtsp, const ::Ice::Context& context) { _checkTwowayOnly(iceC_RecordVideo_LoopRecorder_addCamera_name); outAsync->invoke(iceC_RecordVideo_LoopRecorder_addCamera_name, ::Ice::OperationMode::Normal, ::Ice::FormatType::DefaultFormat, context, [&](::Ice::OutputStream* ostr) { ostr->writeAll(iceP_index, iceP_rtsp); }, nullptr); } void RecordVideo::LoopRecorderPrx::_iceI_removeCamera(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT>& outAsync, const ::std::string& iceP_index, const ::Ice::Context& context) { outAsync->invoke(iceC_RecordVideo_LoopRecorder_removeCamera_name, ::Ice::OperationMode::Normal, ::Ice::FormatType::DefaultFormat, context, [&](::Ice::OutputStream* ostr) { ostr->writeAll(iceP_index); }, nullptr); } void RecordVideo::LoopRecorderPrx::_iceI_clearCamera(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT>& outAsync, const ::Ice::Context& context) { outAsync->invoke(iceC_RecordVideo_LoopRecorder_clearCamera_name, ::Ice::OperationMode::Normal, ::Ice::FormatType::DefaultFormat, context, nullptr, nullptr); } void RecordVideo::LoopRecorderPrx::_iceI_feedDog(const ::std::shared_ptr<::IceInternal::OutgoingAsyncT>& outAsync, const ::std::string& iceP_index, const ::Ice::Context& context) { outAsync->invoke(iceC_RecordVideo_LoopRecorder_feedDog_name, ::Ice::OperationMode::Normal, ::Ice::FormatType::DefaultFormat, context, [&](::Ice::OutputStream* ostr) { ostr->writeAll(iceP_index); }, nullptr); } ::std::shared_ptr<::Ice::ObjectPrx> RecordVideo::LoopRecorderPrx::_newInstance() const { return ::IceInternal::createProxy(); } const ::std::string& RecordVideo::LoopRecorderPrx::ice_staticId() { return RecordVideo::LoopRecorder::ice_staticId(); } #else // C++98 mapping namespace { const ::std::string iceC_RecordVideo_Recorder_recordVideo_name = "recordVideo"; const ::std::string iceC_RecordVideo_ImageGrabber_grabImage_name = "grabImage"; const ::std::string iceC_RecordVideo_ImageGrabber_grabImageUrl_name = "grabImageUrl"; const ::std::string iceC_RecordVideo_LoopRecorder_addCamera_name = "addCamera"; const ::std::string iceC_RecordVideo_LoopRecorder_removeCamera_name = "removeCamera"; const ::std::string iceC_RecordVideo_LoopRecorder_clearCamera_name = "clearCamera"; const ::std::string iceC_RecordVideo_LoopRecorder_feedDog_name = "feedDog"; } ::IceProxy::Ice::Object* ::IceProxy::RecordVideo::upCast(::IceProxy::RecordVideo::Recorder* p) { return p; } void ::IceProxy::RecordVideo::_readProxy(::Ice::InputStream* istr, ::IceInternal::ProxyHandle< ::IceProxy::RecordVideo::Recorder>& v) { ::Ice::ObjectPrx proxy; istr->read(proxy); if(!proxy) { v = 0; } else { v = new ::IceProxy::RecordVideo::Recorder; v->_copyFrom(proxy); } } ::Ice::AsyncResultPtr IceProxy::RecordVideo::Recorder::_iceI_begin_recordVideo(const ::std::string& iceP_rtsp, ::Ice::Long iceP_ms, const ::Ice::Context& context, const ::IceInternal::CallbackBasePtr& del, const ::Ice::LocalObjectPtr& cookie, bool sync) { _checkTwowayOnly(iceC_RecordVideo_Recorder_recordVideo_name, sync); ::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(this, iceC_RecordVideo_Recorder_recordVideo_name, del, cookie, sync); try { result->prepare(iceC_RecordVideo_Recorder_recordVideo_name, ::Ice::Normal, context); ::Ice::OutputStream* ostr = result->startWriteParams(::Ice::DefaultFormat); ostr->write(iceP_rtsp); ostr->write(iceP_ms); result->endWriteParams(); result->invoke(iceC_RecordVideo_Recorder_recordVideo_name); } catch(const ::Ice::Exception& ex) { result->abort(ex); } return result; } ::std::string IceProxy::RecordVideo::Recorder::end_recordVideo(const ::Ice::AsyncResultPtr& result) { ::Ice::AsyncResult::_check(result, this, iceC_RecordVideo_Recorder_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::RecordVideo::Recorder::_newInstance() const { return new Recorder; } const ::std::string& IceProxy::RecordVideo::Recorder::ice_staticId() { return ::RecordVideo::Recorder::ice_staticId(); } ::IceProxy::Ice::Object* ::IceProxy::RecordVideo::upCast(::IceProxy::RecordVideo::ImageGrabber* p) { return p; } void ::IceProxy::RecordVideo::_readProxy(::Ice::InputStream* istr, ::IceInternal::ProxyHandle< ::IceProxy::RecordVideo::ImageGrabber>& v) { ::Ice::ObjectPrx proxy; istr->read(proxy); if(!proxy) { v = 0; } else { v = new ::IceProxy::RecordVideo::ImageGrabber; v->_copyFrom(proxy); } } ::Ice::AsyncResultPtr IceProxy::RecordVideo::ImageGrabber::_iceI_begin_grabImage(::Ice::Int iceP_index, const ::std::string& iceP_time, const ::Ice::Context& context, const ::IceInternal::CallbackBasePtr& del, const ::Ice::LocalObjectPtr& cookie, bool sync) { _checkTwowayOnly(iceC_RecordVideo_ImageGrabber_grabImage_name, sync); ::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(this, iceC_RecordVideo_ImageGrabber_grabImage_name, del, cookie, sync); try { result->prepare(iceC_RecordVideo_ImageGrabber_grabImage_name, ::Ice::Normal, context); ::Ice::OutputStream* ostr = result->startWriteParams(::Ice::DefaultFormat); ostr->write(iceP_index); ostr->write(iceP_time); result->endWriteParams(); result->invoke(iceC_RecordVideo_ImageGrabber_grabImage_name); } catch(const ::Ice::Exception& ex) { result->abort(ex); } return result; } ::RecordVideo::ByteSequence IceProxy::RecordVideo::ImageGrabber::end_grabImage(const ::Ice::AsyncResultPtr& result) { ::Ice::AsyncResult::_check(result, this, iceC_RecordVideo_ImageGrabber_grabImage_name); ::RecordVideo::ByteSequence 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; } ::Ice::AsyncResultPtr IceProxy::RecordVideo::ImageGrabber::_iceI_begin_grabImageUrl(::Ice::Int iceP_index, const ::std::string& iceP_time, const ::Ice::Context& context, const ::IceInternal::CallbackBasePtr& del, const ::Ice::LocalObjectPtr& cookie, bool sync) { _checkTwowayOnly(iceC_RecordVideo_ImageGrabber_grabImageUrl_name, sync); ::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(this, iceC_RecordVideo_ImageGrabber_grabImageUrl_name, del, cookie, sync); try { result->prepare(iceC_RecordVideo_ImageGrabber_grabImageUrl_name, ::Ice::Normal, context); ::Ice::OutputStream* ostr = result->startWriteParams(::Ice::DefaultFormat); ostr->write(iceP_index); ostr->write(iceP_time); result->endWriteParams(); result->invoke(iceC_RecordVideo_ImageGrabber_grabImageUrl_name); } catch(const ::Ice::Exception& ex) { result->abort(ex); } return result; } ::std::string IceProxy::RecordVideo::ImageGrabber::end_grabImageUrl(const ::Ice::AsyncResultPtr& result) { ::Ice::AsyncResult::_check(result, this, iceC_RecordVideo_ImageGrabber_grabImageUrl_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::RecordVideo::ImageGrabber::_newInstance() const { return new ImageGrabber; } const ::std::string& IceProxy::RecordVideo::ImageGrabber::ice_staticId() { return ::RecordVideo::ImageGrabber::ice_staticId(); } ::IceProxy::Ice::Object* ::IceProxy::RecordVideo::upCast(::IceProxy::RecordVideo::LoopRecorder* p) { return p; } void ::IceProxy::RecordVideo::_readProxy(::Ice::InputStream* istr, ::IceInternal::ProxyHandle< ::IceProxy::RecordVideo::LoopRecorder>& v) { ::Ice::ObjectPrx proxy; istr->read(proxy); if(!proxy) { v = 0; } else { v = new ::IceProxy::RecordVideo::LoopRecorder; v->_copyFrom(proxy); } } ::Ice::AsyncResultPtr IceProxy::RecordVideo::LoopRecorder::_iceI_begin_addCamera(const ::std::string& iceP_index, const ::std::string& iceP_rtsp, const ::Ice::Context& context, const ::IceInternal::CallbackBasePtr& del, const ::Ice::LocalObjectPtr& cookie, bool sync) { _checkTwowayOnly(iceC_RecordVideo_LoopRecorder_addCamera_name, sync); ::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(this, iceC_RecordVideo_LoopRecorder_addCamera_name, del, cookie, sync); try { result->prepare(iceC_RecordVideo_LoopRecorder_addCamera_name, ::Ice::Normal, context); ::Ice::OutputStream* ostr = result->startWriteParams(::Ice::DefaultFormat); ostr->write(iceP_index); ostr->write(iceP_rtsp); result->endWriteParams(); result->invoke(iceC_RecordVideo_LoopRecorder_addCamera_name); } catch(const ::Ice::Exception& ex) { result->abort(ex); } return result; } ::std::string IceProxy::RecordVideo::LoopRecorder::end_addCamera(const ::Ice::AsyncResultPtr& result) { ::Ice::AsyncResult::_check(result, this, iceC_RecordVideo_LoopRecorder_addCamera_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; } ::Ice::AsyncResultPtr IceProxy::RecordVideo::LoopRecorder::_iceI_begin_removeCamera(const ::std::string& iceP_index, const ::Ice::Context& context, const ::IceInternal::CallbackBasePtr& del, const ::Ice::LocalObjectPtr& cookie, bool sync) { ::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(this, iceC_RecordVideo_LoopRecorder_removeCamera_name, del, cookie, sync); try { result->prepare(iceC_RecordVideo_LoopRecorder_removeCamera_name, ::Ice::Normal, context); ::Ice::OutputStream* ostr = result->startWriteParams(::Ice::DefaultFormat); ostr->write(iceP_index); result->endWriteParams(); result->invoke(iceC_RecordVideo_LoopRecorder_removeCamera_name); } catch(const ::Ice::Exception& ex) { result->abort(ex); } return result; } void IceProxy::RecordVideo::LoopRecorder::end_removeCamera(const ::Ice::AsyncResultPtr& result) { _end(result, iceC_RecordVideo_LoopRecorder_removeCamera_name); } ::Ice::AsyncResultPtr IceProxy::RecordVideo::LoopRecorder::_iceI_begin_clearCamera(const ::Ice::Context& context, const ::IceInternal::CallbackBasePtr& del, const ::Ice::LocalObjectPtr& cookie, bool sync) { ::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(this, iceC_RecordVideo_LoopRecorder_clearCamera_name, del, cookie, sync); try { result->prepare(iceC_RecordVideo_LoopRecorder_clearCamera_name, ::Ice::Normal, context); result->writeEmptyParams(); result->invoke(iceC_RecordVideo_LoopRecorder_clearCamera_name); } catch(const ::Ice::Exception& ex) { result->abort(ex); } return result; } void IceProxy::RecordVideo::LoopRecorder::end_clearCamera(const ::Ice::AsyncResultPtr& result) { _end(result, iceC_RecordVideo_LoopRecorder_clearCamera_name); } ::Ice::AsyncResultPtr IceProxy::RecordVideo::LoopRecorder::_iceI_begin_feedDog(const ::std::string& iceP_index, const ::Ice::Context& context, const ::IceInternal::CallbackBasePtr& del, const ::Ice::LocalObjectPtr& cookie, bool sync) { ::IceInternal::OutgoingAsyncPtr result = new ::IceInternal::CallbackOutgoing(this, iceC_RecordVideo_LoopRecorder_feedDog_name, del, cookie, sync); try { result->prepare(iceC_RecordVideo_LoopRecorder_feedDog_name, ::Ice::Normal, context); ::Ice::OutputStream* ostr = result->startWriteParams(::Ice::DefaultFormat); ostr->write(iceP_index); result->endWriteParams(); result->invoke(iceC_RecordVideo_LoopRecorder_feedDog_name); } catch(const ::Ice::Exception& ex) { result->abort(ex); } return result; } void IceProxy::RecordVideo::LoopRecorder::end_feedDog(const ::Ice::AsyncResultPtr& result) { _end(result, iceC_RecordVideo_LoopRecorder_feedDog_name); } ::IceProxy::Ice::Object* IceProxy::RecordVideo::LoopRecorder::_newInstance() const { return new LoopRecorder; } const ::std::string& IceProxy::RecordVideo::LoopRecorder::ice_staticId() { return ::RecordVideo::LoopRecorder::ice_staticId(); } RecordVideo::Recorder::~Recorder() { } ::Ice::Object* RecordVideo::upCast(::RecordVideo::Recorder* p) { return p; } namespace { const ::std::string iceC_RecordVideo_Recorder_ids[2] = { "::Ice::Object", "::RecordVideo::Recorder" }; } bool RecordVideo::Recorder::ice_isA(const ::std::string& s, const ::Ice::Current&) const { return ::std::binary_search(iceC_RecordVideo_Recorder_ids, iceC_RecordVideo_Recorder_ids + 2, s); } ::std::vector< ::std::string> RecordVideo::Recorder::ice_ids(const ::Ice::Current&) const { return ::std::vector< ::std::string>(&iceC_RecordVideo_Recorder_ids[0], &iceC_RecordVideo_Recorder_ids[2]); } const ::std::string& RecordVideo::Recorder::ice_id(const ::Ice::Current&) const { return ice_staticId(); } const ::std::string& RecordVideo::Recorder::ice_staticId() { #ifdef ICE_HAS_THREAD_SAFE_LOCAL_STATIC static const ::std::string typeId = "::RecordVideo::Recorder"; return typeId; #else return iceC_RecordVideo_Recorder_ids[1]; #endif } bool RecordVideo::Recorder::_iceD_recordVideo(::IceInternal::Incoming& inS, const ::Ice::Current& current) { _iceCheckMode(::Ice::Normal, current.mode); ::Ice::InputStream* istr = inS.startReadParams(); ::std::string iceP_rtsp; ::Ice::Long iceP_ms; istr->read(iceP_rtsp); istr->read(iceP_ms); inS.endReadParams(); ::std::string ret = this->recordVideo(iceP_rtsp, iceP_ms, current); ::Ice::OutputStream* ostr = inS.startWriteParams(); ostr->write(ret); inS.endWriteParams(); return true; } namespace { const ::std::string iceC_RecordVideo_Recorder_all[] = { "ice_id", "ice_ids", "ice_isA", "ice_ping", "recordVideo" }; } bool RecordVideo::Recorder::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current) { ::std::pair r = ::std::equal_range(iceC_RecordVideo_Recorder_all, iceC_RecordVideo_Recorder_all + 5, current.operation); if(r.first == r.second) { throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); } switch(r.first - iceC_RecordVideo_Recorder_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 RecordVideo::Recorder::_iceWriteImpl(::Ice::OutputStream* ostr) const { ostr->startSlice(ice_staticId(), -1, true); Ice::StreamWriter< ::RecordVideo::Recorder, ::Ice::OutputStream>::write(ostr, *this); ostr->endSlice(); } void RecordVideo::Recorder::_iceReadImpl(::Ice::InputStream* istr) { istr->startSlice(); Ice::StreamReader< ::RecordVideo::Recorder, ::Ice::InputStream>::read(istr, *this); istr->endSlice(); } void RecordVideo::_icePatchObjectPtr(RecorderPtr& handle, const ::Ice::ObjectPtr& v) { handle = ::RecordVideo::RecorderPtr::dynamicCast(v); if(v && !handle) { IceInternal::Ex::throwUOE(::RecordVideo::Recorder::ice_staticId(), v); } } RecordVideo::ImageGrabber::~ImageGrabber() { } ::Ice::Object* RecordVideo::upCast(::RecordVideo::ImageGrabber* p) { return p; } namespace { const ::std::string iceC_RecordVideo_ImageGrabber_ids[2] = { "::Ice::Object", "::RecordVideo::ImageGrabber" }; } bool RecordVideo::ImageGrabber::ice_isA(const ::std::string& s, const ::Ice::Current&) const { return ::std::binary_search(iceC_RecordVideo_ImageGrabber_ids, iceC_RecordVideo_ImageGrabber_ids + 2, s); } ::std::vector< ::std::string> RecordVideo::ImageGrabber::ice_ids(const ::Ice::Current&) const { return ::std::vector< ::std::string>(&iceC_RecordVideo_ImageGrabber_ids[0], &iceC_RecordVideo_ImageGrabber_ids[2]); } const ::std::string& RecordVideo::ImageGrabber::ice_id(const ::Ice::Current&) const { return ice_staticId(); } const ::std::string& RecordVideo::ImageGrabber::ice_staticId() { #ifdef ICE_HAS_THREAD_SAFE_LOCAL_STATIC static const ::std::string typeId = "::RecordVideo::ImageGrabber"; return typeId; #else return iceC_RecordVideo_ImageGrabber_ids[1]; #endif } bool RecordVideo::ImageGrabber::_iceD_grabImage(::IceInternal::Incoming& inS, const ::Ice::Current& current) { _iceCheckMode(::Ice::Normal, current.mode); ::Ice::InputStream* istr = inS.startReadParams(); ::Ice::Int iceP_index; ::std::string iceP_time; istr->read(iceP_index); istr->read(iceP_time); inS.endReadParams(); ::RecordVideo::ByteSequence ret = this->grabImage(iceP_index, iceP_time, current); ::Ice::OutputStream* ostr = inS.startWriteParams(); ostr->write(ret); inS.endWriteParams(); return true; } bool RecordVideo::ImageGrabber::_iceD_grabImageUrl(::IceInternal::Incoming& inS, const ::Ice::Current& current) { _iceCheckMode(::Ice::Normal, current.mode); ::Ice::InputStream* istr = inS.startReadParams(); ::Ice::Int iceP_index; ::std::string iceP_time; istr->read(iceP_index); istr->read(iceP_time); inS.endReadParams(); ::std::string ret = this->grabImageUrl(iceP_index, iceP_time, current); ::Ice::OutputStream* ostr = inS.startWriteParams(); ostr->write(ret); inS.endWriteParams(); return true; } namespace { const ::std::string iceC_RecordVideo_ImageGrabber_all[] = { "grabImage", "grabImageUrl", "ice_id", "ice_ids", "ice_isA", "ice_ping" }; } bool RecordVideo::ImageGrabber::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current) { ::std::pair r = ::std::equal_range(iceC_RecordVideo_ImageGrabber_all, iceC_RecordVideo_ImageGrabber_all + 6, current.operation); if(r.first == r.second) { throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); } switch(r.first - iceC_RecordVideo_ImageGrabber_all) { case 0: { return _iceD_grabImage(in, current); } case 1: { return _iceD_grabImageUrl(in, current); } case 2: { return _iceD_ice_id(in, current); } case 3: { return _iceD_ice_ids(in, current); } case 4: { return _iceD_ice_isA(in, current); } case 5: { return _iceD_ice_ping(in, current); } default: { assert(false); throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); } } } void RecordVideo::ImageGrabber::_iceWriteImpl(::Ice::OutputStream* ostr) const { ostr->startSlice(ice_staticId(), -1, true); Ice::StreamWriter< ::RecordVideo::ImageGrabber, ::Ice::OutputStream>::write(ostr, *this); ostr->endSlice(); } void RecordVideo::ImageGrabber::_iceReadImpl(::Ice::InputStream* istr) { istr->startSlice(); Ice::StreamReader< ::RecordVideo::ImageGrabber, ::Ice::InputStream>::read(istr, *this); istr->endSlice(); } void RecordVideo::_icePatchObjectPtr(ImageGrabberPtr& handle, const ::Ice::ObjectPtr& v) { handle = ::RecordVideo::ImageGrabberPtr::dynamicCast(v); if(v && !handle) { IceInternal::Ex::throwUOE(::RecordVideo::ImageGrabber::ice_staticId(), v); } } RecordVideo::LoopRecorder::~LoopRecorder() { } ::Ice::Object* RecordVideo::upCast(::RecordVideo::LoopRecorder* p) { return p; } namespace { const ::std::string iceC_RecordVideo_LoopRecorder_ids[2] = { "::Ice::Object", "::RecordVideo::LoopRecorder" }; } bool RecordVideo::LoopRecorder::ice_isA(const ::std::string& s, const ::Ice::Current&) const { return ::std::binary_search(iceC_RecordVideo_LoopRecorder_ids, iceC_RecordVideo_LoopRecorder_ids + 2, s); } ::std::vector< ::std::string> RecordVideo::LoopRecorder::ice_ids(const ::Ice::Current&) const { return ::std::vector< ::std::string>(&iceC_RecordVideo_LoopRecorder_ids[0], &iceC_RecordVideo_LoopRecorder_ids[2]); } const ::std::string& RecordVideo::LoopRecorder::ice_id(const ::Ice::Current&) const { return ice_staticId(); } const ::std::string& RecordVideo::LoopRecorder::ice_staticId() { #ifdef ICE_HAS_THREAD_SAFE_LOCAL_STATIC static const ::std::string typeId = "::RecordVideo::LoopRecorder"; return typeId; #else return iceC_RecordVideo_LoopRecorder_ids[1]; #endif } bool RecordVideo::LoopRecorder::_iceD_addCamera(::IceInternal::Incoming& inS, const ::Ice::Current& current) { _iceCheckMode(::Ice::Normal, current.mode); ::Ice::InputStream* istr = inS.startReadParams(); ::std::string iceP_index; ::std::string iceP_rtsp; istr->read(iceP_index); istr->read(iceP_rtsp); inS.endReadParams(); ::std::string ret = this->addCamera(iceP_index, iceP_rtsp, current); ::Ice::OutputStream* ostr = inS.startWriteParams(); ostr->write(ret); inS.endWriteParams(); return true; } bool RecordVideo::LoopRecorder::_iceD_removeCamera(::IceInternal::Incoming& inS, const ::Ice::Current& current) { _iceCheckMode(::Ice::Normal, current.mode); ::Ice::InputStream* istr = inS.startReadParams(); ::std::string iceP_index; istr->read(iceP_index); inS.endReadParams(); this->removeCamera(iceP_index, current); inS.writeEmptyParams(); return true; } bool RecordVideo::LoopRecorder::_iceD_clearCamera(::IceInternal::Incoming& inS, const ::Ice::Current& current) { _iceCheckMode(::Ice::Normal, current.mode); inS.readEmptyParams(); this->clearCamera(current); inS.writeEmptyParams(); return true; } bool RecordVideo::LoopRecorder::_iceD_feedDog(::IceInternal::Incoming& inS, const ::Ice::Current& current) { _iceCheckMode(::Ice::Normal, current.mode); ::Ice::InputStream* istr = inS.startReadParams(); ::std::string iceP_index; istr->read(iceP_index); inS.endReadParams(); this->feedDog(iceP_index, current); inS.writeEmptyParams(); return true; } namespace { const ::std::string iceC_RecordVideo_LoopRecorder_all[] = { "addCamera", "clearCamera", "feedDog", "ice_id", "ice_ids", "ice_isA", "ice_ping", "removeCamera" }; } bool RecordVideo::LoopRecorder::_iceDispatch(::IceInternal::Incoming& in, const ::Ice::Current& current) { ::std::pair r = ::std::equal_range(iceC_RecordVideo_LoopRecorder_all, iceC_RecordVideo_LoopRecorder_all + 8, current.operation); if(r.first == r.second) { throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); } switch(r.first - iceC_RecordVideo_LoopRecorder_all) { case 0: { return _iceD_addCamera(in, current); } case 1: { return _iceD_clearCamera(in, current); } case 2: { return _iceD_feedDog(in, current); } case 3: { return _iceD_ice_id(in, current); } case 4: { return _iceD_ice_ids(in, current); } case 5: { return _iceD_ice_isA(in, current); } case 6: { return _iceD_ice_ping(in, current); } case 7: { return _iceD_removeCamera(in, current); } default: { assert(false); throw ::Ice::OperationNotExistException(__FILE__, __LINE__, current.id, current.facet, current.operation); } } } void RecordVideo::LoopRecorder::_iceWriteImpl(::Ice::OutputStream* ostr) const { ostr->startSlice(ice_staticId(), -1, true); Ice::StreamWriter< ::RecordVideo::LoopRecorder, ::Ice::OutputStream>::write(ostr, *this); ostr->endSlice(); } void RecordVideo::LoopRecorder::_iceReadImpl(::Ice::InputStream* istr) { istr->startSlice(); Ice::StreamReader< ::RecordVideo::LoopRecorder, ::Ice::InputStream>::read(istr, *this); istr->endSlice(); } void RecordVideo::_icePatchObjectPtr(LoopRecorderPtr& handle, const ::Ice::ObjectPtr& v) { handle = ::RecordVideo::LoopRecorderPtr::dynamicCast(v); if(v && !handle) { IceInternal::Ex::throwUOE(::RecordVideo::LoopRecorder::ice_staticId(), v); } } namespace Ice { } #endif