📄 patch.cpp
字号:
catch(const ::Ice::LocalException& __ex)
{
throw ::IceInternal::NonRepeatable(__ex);
}
}
static const ::std::string __Patch__UpdateServer__GetFileInfo_name = "GetFileInfo";
void
IceDelegateM::Patch::UpdateServer::GetFileInfo(::std::string& fileName, ::Ice::Long& fileSize, ::std::string& updateVersion, ::Patch::ByteSeq& pFileHash, const ::Ice::Context& __context)
{
::IceInternal::Outgoing __og(__connection.get(), __reference.get(), __Patch__UpdateServer__GetFileInfo_name, ::Ice::Idempotent, __context, __compress);
bool __ok = __og.invoke();
try
{
::IceInternal::BasicStream* __is = __og.is();
if(!__ok)
{
try
{
__is->throwException();
}
catch(const ::Ice::UserException& __ex)
{
throw ::Ice::UnknownUserException(__FILE__, __LINE__, __ex.ice_name());
}
}
__is->read(fileName);
__is->read(fileSize);
__is->read(updateVersion);
__is->read(pFileHash);
}
catch(const ::Ice::LocalException& __ex)
{
throw ::IceInternal::NonRepeatable(__ex);
}
}
static const ::std::string __Patch__UpdateServer__GetDataFromFile_name = "GetDataFromFile";
void
IceDelegateM::Patch::UpdateServer::GetDataFromFile(::Ice::Int iFilePos, ::Patch::ByteSeq& pBuf, ::Patch::ByteSeq& hashValue, ::Ice::Int& iReadSize, const ::Ice::Context& __context)
{
::IceInternal::Outgoing __og(__connection.get(), __reference.get(), __Patch__UpdateServer__GetDataFromFile_name, ::Ice::Idempotent, __context, __compress);
try
{
::IceInternal::BasicStream* __os = __og.os();
__os->write(iFilePos);
}
catch(const ::Ice::LocalException& __ex)
{
__og.abort(__ex);
}
bool __ok = __og.invoke();
try
{
::IceInternal::BasicStream* __is = __og.is();
if(!__ok)
{
try
{
__is->throwException();
}
catch(const ::Patch::myException&)
{
throw;
}
catch(const ::Ice::UserException& __ex)
{
throw ::Ice::UnknownUserException(__FILE__, __LINE__, __ex.ice_name());
}
}
__is->read(pBuf);
__is->read(hashValue);
__is->read(iReadSize);
}
catch(const ::Ice::LocalException& __ex)
{
throw ::IceInternal::NonRepeatable(__ex);
}
}
static const ::std::string __Patch__UpdateServer__shutdown_name = "shutdown";
bool
IceDelegateM::Patch::UpdateServer::shutdown(const ::Ice::Context& __context)
{
::IceInternal::Outgoing __og(__connection.get(), __reference.get(), __Patch__UpdateServer__shutdown_name, ::Ice::Idempotent, __context, __compress);
bool __ok = __og.invoke();
try
{
::IceInternal::BasicStream* __is = __og.is();
if(!__ok)
{
try
{
__is->throwException();
}
catch(const ::Ice::UserException& __ex)
{
throw ::Ice::UnknownUserException(__FILE__, __LINE__, __ex.ice_name());
}
}
bool __ret;
__is->read(__ret);
return __ret;
}
catch(const ::Ice::LocalException& __ex)
{
throw ::IceInternal::NonRepeatable(__ex);
}
}
bool
IceDelegateD::Patch::UpdateServer::Init(const ::Ice::Context& __context)
{
::Ice::Current __current;
__initCurrent(__current, "Init", ::Ice::Normal, __context);
while(true)
{
::IceInternal::Direct __direct(__current);
::Patch::UpdateServer* __servant = dynamic_cast< ::Patch::UpdateServer*>(__direct.servant().get());
if(!__servant)
{
::Ice::OperationNotExistException __opEx(__FILE__, __LINE__);
__opEx.id = __current.id;
__opEx.facet = __current.facet;
__opEx.operation = __current.operation;
throw __opEx;
}
try
{
return __servant->Init(__current);
}
catch(const ::Ice::LocalException& __ex)
{
throw ::IceInternal::NonRepeatable(__ex);
}
}
}
bool
IceDelegateD::Patch::UpdateServer::isUpdate(const ::std::string& curVersion, const ::Ice::Context& __context)
{
::Ice::Current __current;
__initCurrent(__current, "isUpdate", ::Ice::Nonmutating, __context);
while(true)
{
::IceInternal::Direct __direct(__current);
::Patch::UpdateServer* __servant = dynamic_cast< ::Patch::UpdateServer*>(__direct.servant().get());
if(!__servant)
{
::Ice::OperationNotExistException __opEx(__FILE__, __LINE__);
__opEx.id = __current.id;
__opEx.facet = __current.facet;
__opEx.operation = __current.operation;
throw __opEx;
}
try
{
return __servant->isUpdate(curVersion, __current);
}
catch(const ::Ice::LocalException& __ex)
{
throw ::IceInternal::NonRepeatable(__ex);
}
}
}
void
IceDelegateD::Patch::UpdateServer::GetFileInfo(::std::string& fileName, ::Ice::Long& fileSize, ::std::string& updateVersion, ::Patch::ByteSeq& pFileHash, const ::Ice::Context& __context)
{
::Ice::Current __current;
__initCurrent(__current, "GetFileInfo", ::Ice::Idempotent, __context);
while(true)
{
::IceInternal::Direct __direct(__current);
::Patch::UpdateServer* __servant = dynamic_cast< ::Patch::UpdateServer*>(__direct.servant().get());
if(!__servant)
{
::Ice::OperationNotExistException __opEx(__FILE__, __LINE__);
__opEx.id = __current.id;
__opEx.facet = __current.facet;
__opEx.operation = __current.operation;
throw __opEx;
}
try
{
__servant->GetFileInfo(fileName, fileSize, updateVersion, pFileHash, __current);
return;
}
catch(const ::Ice::LocalException& __ex)
{
throw ::IceInternal::NonRepeatable(__ex);
}
}
}
void
IceDelegateD::Patch::UpdateServer::GetDataFromFile(::Ice::Int, ::Patch::ByteSeq&, ::Patch::ByteSeq&, ::Ice::Int&, const ::Ice::Context&)
{
throw ::Ice::CollocationOptimizationException(__FILE__, __LINE__);
}
bool
IceDelegateD::Patch::UpdateServer::shutdown(const ::Ice::Context& __context)
{
::Ice::Current __current;
__initCurrent(__current, "shutdown", ::Ice::Idempotent, __context);
while(true)
{
::IceInternal::Direct __direct(__current);
::Patch::UpdateServer* __servant = dynamic_cast< ::Patch::UpdateServer*>(__direct.servant().get());
if(!__servant)
{
::Ice::OperationNotExistException __opEx(__FILE__, __LINE__);
__opEx.id = __current.id;
__opEx.facet = __current.facet;
__opEx.operation = __current.operation;
throw __opEx;
}
try
{
return __servant->shutdown(__current);
}
catch(const ::Ice::LocalException& __ex)
{
throw ::IceInternal::NonRepeatable(__ex);
}
}
}
::Ice::ObjectPtr
Patch::UpdateServer::ice_clone() const
{
throw ::Ice::CloneNotImplementedException(__FILE__, __LINE__);
}
static const ::std::string __Patch__UpdateServer_ids[2] =
{
"::Ice::Object",
"::Patch::UpdateServer"
};
bool
Patch::UpdateServer::ice_isA(const ::std::string& _s, const ::Ice::Current&) const
{
return ::std::binary_search(__Patch__UpdateServer_ids, __Patch__UpdateServer_ids + 2, _s);
}
::std::vector< ::std::string>
Patch::UpdateServer::ice_ids(const ::Ice::Current&) const
{
return ::std::vector< ::std::string>(&__Patch__UpdateServer_ids[0], &__Patch__UpdateServer_ids[2]);
}
const ::std::string&
Patch::UpdateServer::ice_id(const ::Ice::Current&) const
{
return __Patch__UpdateServer_ids[1];
}
const ::std::string&
Patch::UpdateServer::ice_staticId()
{
return __Patch__UpdateServer_ids[1];
}
::IceInternal::DispatchStatus
Patch::UpdateServer::___Init(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)
{
__checkMode(::Ice::Normal, __current.mode);
::IceInternal::BasicStream* __os = __inS.os();
try
{
bool __ret = Init(__current);
__os->write(__ret);
}
catch(const ::Patch::myException& __ex)
{
__os->write(__ex);
return ::IceInternal::DispatchUserException;
}
return ::IceInternal::DispatchOK;
}
::IceInternal::DispatchStatus
Patch::UpdateServer::___isUpdate(::IceInternal::Incoming& __inS, const ::Ice::Current& __current) const
{
__checkMode(::Ice::Nonmutating, __current.mode);
::IceInternal::BasicStream* __is = __inS.is();
::IceInternal::BasicStream* __os = __inS.os();
::std::string curVersion;
__is->read(curVersion);
bool __ret = isUpdate(curVersion, __current);
__os->write(__ret);
return ::IceInternal::DispatchOK;
}
::IceInternal::DispatchStatus
Patch::UpdateServer::___GetFileInfo(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)
{
__checkMode(::Ice::Idempotent, __current.mode);
::IceInternal::BasicStream* __os = __inS.os();
::std::string fileName;
::Ice::Long fileSize;
::std::string updateVersion;
::Patch::ByteSeq pFileHash;
GetFileInfo(fileName, fileSize, updateVersion, pFileHash, __current);
__os->write(fileName);
__os->write(fileSize);
__os->write(updateVersion);
__os->write(pFileHash);
return ::IceInternal::DispatchOK;
}
::IceInternal::DispatchStatus
Patch::UpdateServer::___GetDataFromFile(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)
{
__checkMode(::Ice::Idempotent, __current.mode);
::IceInternal::BasicStream* __is = __inS.is();
::Ice::Int iFilePos;
__is->read(iFilePos);
::Patch::AMD_UpdateServer_GetDataFromFilePtr __cb = new IceAsync::Patch::AMD_UpdateServer_GetDataFromFile(__inS);
try
{
GetDataFromFile_async(__cb, iFilePos, __current);
}
catch(const ::Ice::Exception& __ex)
{
__cb->ice_exception(__ex);
}
catch(const ::std::exception& __ex)
{
__cb->ice_exception(__ex);
}
catch(...)
{
__cb->ice_exception();
}
return ::IceInternal::DispatchAsync;
}
::IceInternal::DispatchStatus
Patch::UpdateServer::___shutdown(::IceInternal::Incoming& __inS, const ::Ice::Current& __current)
{
__checkMode(::Ice::Idempotent, __current.mode);
::IceInternal::BasicStream* __os = __inS.os();
bool __ret = shutdown(__current);
__os->write(__ret);
return ::IceInternal::DispatchOK;
}
static ::std::string __Patch__UpdateServer_all[] =
{
"GetDataFromFile",
"GetFileInfo",
"Init",
"ice_id",
"ice_ids",
"ice_isA",
"ice_ping",
"isUpdate",
"shutdown"
};
::IceInternal::DispatchStatus
Patch::UpdateServer::__dispatch(::IceInternal::Incoming& in, const ::Ice::Current& current)
{
::std::pair< ::std::string*, ::std::string*> r = ::std::equal_range(__Patch__UpdateServer_all, __Patch__UpdateServer_all + 9, current.operation);
if(r.first == r.second)
{
return ::IceInternal::DispatchOperationNotExist;
}
switch(r.first - __Patch__UpdateServer_all)
{
case 0:
{
return ___GetDataFromFile(in, current);
}
case 1:
{
return ___GetFileInfo(in, current);
}
case 2:
{
return ___Init(in, current);
}
case 3:
{
return ___ice_id(in, current);
}
case 4:
{
return ___ice_ids(in, current);
}
case 5:
{
return ___ice_isA(in, current);
}
case 6:
{
return ___ice_ping(in, current);
}
case 7:
{
return ___isUpdate(in, current);
}
case 8:
{
return ___shutdown(in, current);
}
}
assert(false);
return ::IceInternal::DispatchOperationNotExist;
}
void
Patch::UpdateServer::__write(::IceInternal::BasicStream* __os) const
{
__os->writeTypeId(ice_staticId());
__os->startWriteSlice();
__os->endWriteSlice();
#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
Object::__write(__os);
#else
::Ice::Object::__write(__os);
#endif
}
void
Patch::UpdateServer::__read(::IceInternal::BasicStream* __is, bool __rid)
{
if(__rid)
{
::std::string myId;
__is->readTypeId(myId);
}
__is->startReadSlice();
__is->endReadSlice();
#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
Object::__read(__is, true);
#else
::Ice::Object::__read(__is, true);
#endif
}
void
Patch::UpdateServer::__write(const ::Ice::OutputStreamPtr&) const
{
Ice::MarshalException ex(__FILE__, __LINE__);
ex.reason = "type Patch::UpdateServer was not generated with stream support";
throw ex;
}
void
Patch::UpdateServer::__read(const ::Ice::InputStreamPtr&, bool)
{
Ice::MarshalException ex(__FILE__, __LINE__);
ex.reason = "type Patch::UpdateServer was not generated with stream support";
throw ex;
}
void
Patch::__patch__UpdateServerPtr(void* __addr, ::Ice::ObjectPtr& v)
{
::Patch::UpdateServerPtr* p = static_cast< ::Patch::UpdateServerPtr*>(__addr);
assert(p);
*p = ::Patch::UpdateServerPtr::dynamicCast(v);
if(v && !*p)
{
::Ice::NoObjectFactoryException e(__FILE__, __LINE__);
e.type = ::Patch::UpdateServer::ice_staticId();
throw e;
}
}
bool
Patch::operator==(const ::Patch::UpdateServer& l, const ::Patch::UpdateServer& r)
{
return static_cast<const ::Ice::Object&>(l) == static_cast<const ::Ice::Object&>(r);
}
bool
Patch::operator!=(const ::Patch::UpdateServer& l, const ::Patch::UpdateServer& r)
{
return static_cast<const ::Ice::Object&>(l) != static_cast<const ::Ice::Object&>(r);
}
bool
Patch::operator<(const ::Patch::UpdateServer& l, const ::Patch::UpdateServer& r)
{
return static_cast<const ::Ice::Object&>(l) < static_cast<const ::Ice::Object&>(r);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -