summaryrefslogtreecommitdiff
path: root/py/modules/IcePy/ObjectAdapter.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2006-12-19 13:51:23 +0000
committerDwayne Boone <dwayne@zeroc.com>2006-12-19 13:51:23 +0000
commite0562bc3eaf0e0e3b1894eb7d8ec937008f74cfb (patch)
tree218884f4d0ef7873e17cf4beb71dba26ec65535a /py/modules/IcePy/ObjectAdapter.cpp
parentLoad properties with UTF-8 encoding (diff)
downloadice-e0562bc3eaf0e0e3b1894eb7d8ec937008f74cfb.tar.bz2
ice-e0562bc3eaf0e0e3b1894eb7d8ec937008f74cfb.tar.xz
ice-e0562bc3eaf0e0e3b1894eb7d8ec937008f74cfb.zip
Added missing implementation of ObjectAdapter::createIndirectProxy
Diffstat (limited to 'py/modules/IcePy/ObjectAdapter.cpp')
-rw-r--r--py/modules/IcePy/ObjectAdapter.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/py/modules/IcePy/ObjectAdapter.cpp b/py/modules/IcePy/ObjectAdapter.cpp
index b8041bc60d2..7281e55dbf6 100644
--- a/py/modules/IcePy/ObjectAdapter.cpp
+++ b/py/modules/IcePy/ObjectAdapter.cpp
@@ -1237,6 +1237,40 @@ adapterCreateDirectProxy(ObjectAdapterObject* self, PyObject* args)
extern "C"
#endif
static PyObject*
+adapterCreateIndirectProxy(ObjectAdapterObject* self, PyObject* args)
+{
+ PyObject* identityType = lookupType("Ice.Identity");
+ PyObject* id;
+ if(!PyArg_ParseTuple(args, STRCAST("O!"), identityType, &id))
+ {
+ return NULL;
+ }
+
+ Ice::Identity ident;
+ if(!getIdentity(id, ident))
+ {
+ return NULL;
+ }
+
+ assert(self->adapter);
+ Ice::ObjectPrx proxy;
+ try
+ {
+ proxy = (*self->adapter)->createIndirectProxy(ident);
+ }
+ catch(const Ice::Exception& ex)
+ {
+ setPythonException(ex);
+ return NULL;
+ }
+
+ return createProxy(proxy, (*self->adapter)->getCommunicator());
+}
+
+#ifdef WIN32
+extern "C"
+#endif
+static PyObject*
adapterCreateReverseProxy(ObjectAdapterObject* self, PyObject* args)
{
PyObject* identityType = lookupType("Ice.Identity");
@@ -1344,6 +1378,8 @@ static PyMethodDef AdapterMethods[] =
PyDoc_STR(STRCAST("createProxy(identity) -> Ice.ObjectPrx")) },
{ STRCAST("createDirectProxy"), (PyCFunction)adapterCreateDirectProxy, METH_VARARGS,
PyDoc_STR(STRCAST("createDirectProxy(identity) -> Ice.ObjectPrx")) },
+ { STRCAST("createIndirectProxy"), (PyCFunction)adapterCreateIndirectProxy, METH_VARARGS,
+ PyDoc_STR(STRCAST("createIndirectProxy(identity) -> Ice.ObjectPrx")) },
{ STRCAST("createReverseProxy"), (PyCFunction)adapterCreateReverseProxy, METH_VARARGS,
PyDoc_STR(STRCAST("createReverseProxy(identity) -> Ice.ObjectPrx")) },
{ STRCAST("setLocator"), (PyCFunction)adapterSetLocator, METH_VARARGS,