diff options
author | Benoit Foucher <benoit@zeroc.com> | 2005-10-05 09:29:15 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2005-10-05 09:29:15 +0000 |
commit | 40cb2933948079d126293d88f1ba3a3ed70eb55f (patch) | |
tree | fe74c8abdb7ae83e37bb1fc5bff308dca4b5de85 /cpp/src/IceGrid/AdminI.cpp | |
parent | bug 475 - removing IcePack (diff) | |
download | ice-40cb2933948079d126293d88f1ba3a3ed70eb55f.tar.bz2 ice-40cb2933948079d126293d88f1ba3a3ed70eb55f.tar.xz ice-40cb2933948079d126293d88f1ba3a3ed70eb55f.zip |
Added support for enabling/disabling servers.
Diffstat (limited to 'cpp/src/IceGrid/AdminI.cpp')
-rw-r--r-- | cpp/src/IceGrid/AdminI.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cpp/src/IceGrid/AdminI.cpp b/cpp/src/IceGrid/AdminI.cpp index 505886a1c09..6fd687e655c 100644 --- a/cpp/src/IceGrid/AdminI.cpp +++ b/cpp/src/IceGrid/AdminI.cpp @@ -301,32 +301,32 @@ AdminI::getAllServerIds(const Current&) const return _database->getAllServers(); } -ServerActivation -AdminI::getServerActivation(const ::std::string& id, const Ice::Current&) const +void +AdminI::enableServer(const string& id, bool enable, const Ice::Current&) { ServerProxyWrapper proxy(_database, id); try { - return proxy->getActivationMode(); + proxy->setEnabled(enable); } catch(const Ice::Exception& ex) { proxy.handleException(ex); - return Manual; } } -void -AdminI::setServerActivation(const ::std::string& id, ServerActivation mode, const Ice::Current&) +bool +AdminI::isServerEnabled(const ::std::string& id, const Ice::Current&) const { ServerProxyWrapper proxy(_database, id); try { - proxy->setActivationMode(mode); + return proxy->isEnabled(); } catch(const Ice::Exception& ex) { proxy.handleException(ex); + return true; // Keeps the compiler happy. } } |