summaryrefslogtreecommitdiff
path: root/py/modules/IcePy/Communicator.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2007-01-08 17:39:03 +0000
committerDwayne Boone <dwayne@zeroc.com>2007-01-08 17:39:03 +0000
commitb9c51083302aa66a840d9a6f176671ad5f37dadd (patch)
tree02e1f15cad1e539c2cacbf692ffae0cd40029ebf /py/modules/IcePy/Communicator.cpp
parent- Fixing bug 800. (diff)
downloadice-b9c51083302aa66a840d9a6f176671ad5f37dadd.tar.bz2
ice-b9c51083302aa66a840d9a6f176671ad5f37dadd.tar.xz
ice-b9c51083302aa66a840d9a6f176671ad5f37dadd.zip
Added Communicator::isShutdown() and ObjectAdapter::isDeactivated()
Diffstat (limited to 'py/modules/IcePy/Communicator.cpp')
-rw-r--r--py/modules/IcePy/Communicator.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/py/modules/IcePy/Communicator.cpp b/py/modules/IcePy/Communicator.cpp
index 91c6225be19..eecccee8944 100644
--- a/py/modules/IcePy/Communicator.cpp
+++ b/py/modules/IcePy/Communicator.cpp
@@ -371,6 +371,27 @@ communicatorWaitForShutdown(CommunicatorObject* self, PyObject* args)
extern "C"
#endif
static PyObject*
+communicatorIsShutdown(CommunicatorObject* self)
+{
+ assert(self->communicator);
+ try
+ {
+ (*self->communicator)->isShutdown();
+ }
+ catch(const Ice::Exception& ex)
+ {
+ setPythonException(ex);
+ return NULL;
+ }
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+#ifdef WIN32
+extern "C"
+#endif
+static PyObject*
communicatorStringToProxy(CommunicatorObject* self, PyObject* args)
{
char* str;
@@ -1048,6 +1069,8 @@ static PyMethodDef CommunicatorMethods[] =
PyDoc_STR(STRCAST("shutdown() -> None")) },
{ STRCAST("waitForShutdown"), (PyCFunction)communicatorWaitForShutdown, METH_VARARGS,
PyDoc_STR(STRCAST("waitForShutdown() -> None")) },
+ { STRCAST("isShutdown"), (PyCFunction)communicatorIsShutdown, METH_NOARGS,
+ PyDoc_STR(STRCAST("isShutdown() -> None")) },
{ STRCAST("stringToProxy"), (PyCFunction)communicatorStringToProxy, METH_VARARGS,
PyDoc_STR(STRCAST("stringToProxy(str) -> Ice.ObjectPrx")) },
{ STRCAST("proxyToString"), (PyCFunction)communicatorProxyToString, METH_VARARGS,