diff options
author | Bernard Normier <bernard@zeroc.com> | 2006-10-25 20:59:01 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2006-10-25 20:59:01 +0000 |
commit | b51bbbbdb61ff4e71cd99e2b626e00f701ecb880 (patch) | |
tree | 62de660937598471b96644e9999b0b3e01173b69 /py/modules/IcePy/Communicator.cpp | |
parent | update for bug 1500 (diff) | |
download | ice-b51bbbbdb61ff4e71cd99e2b626e00f701ecb880.tar.bz2 ice-b51bbbbdb61ff4e71cd99e2b626e00f701ecb880.tar.xz ice-b51bbbbdb61ff4e71cd99e2b626e00f701ecb880.zip |
Added implicit context implementation
Diffstat (limited to 'py/modules/IcePy/Communicator.cpp')
-rw-r--r-- | py/modules/IcePy/Communicator.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/py/modules/IcePy/Communicator.cpp b/py/modules/IcePy/Communicator.cpp index 2871800a2a3..caf3d9f2cea 100644 --- a/py/modules/IcePy/Communicator.cpp +++ b/py/modules/IcePy/Communicator.cpp @@ -12,6 +12,7 @@ #endif #include <IceUtil/DisableWarnings.h> #include <Communicator.h> +#include <ImplicitContext.h> #include <Logger.h> #include <ObjectAdapter.h> #include <ObjectFactory.h> @@ -727,6 +728,23 @@ communicatorGetDefaultContext(CommunicatorObject* self) extern "C" #endif static PyObject* +communicatorGetImplicitContext(CommunicatorObject* self) +{ + Ice::ImplicitContextPtr implicitContext = (*self->communicator)->getImplicitContext(); + + if(implicitContext == 0) + { + return 0; + } + + return createImplicitContext(implicitContext); +} + + +#ifdef WIN32 +extern "C" +#endif +static PyObject* communicatorCreateObjectAdapter(CommunicatorObject* self, PyObject* args) { char* name; @@ -1027,6 +1045,8 @@ static PyMethodDef CommunicatorMethods[] = PyDoc_STR(STRCAST("setDefaultContext(ctx) -> None")) }, { STRCAST("getDefaultContext"), (PyCFunction)communicatorGetDefaultContext, METH_NOARGS, PyDoc_STR(STRCAST("getDefaultContext() -> Ice.Context")) }, + { STRCAST("getImplicitContext"), (PyCFunction)communicatorGetImplicitContext, METH_NOARGS, + PyDoc_STR(STRCAST("getImplicitContext() -> Ice.ImplicitContext")) }, { STRCAST("getProperties"), (PyCFunction)communicatorGetProperties, METH_NOARGS, PyDoc_STR(STRCAST("getProperties() -> Ice.Properties")) }, { STRCAST("getLogger"), (PyCFunction)communicatorGetLogger, METH_NOARGS, |