diff options
49 files changed, 4177 insertions, 859 deletions
diff --git a/cpp/src/Slice/PythonUtil.cpp b/cpp/src/Slice/PythonUtil.cpp index c1d8cb26d96..5c92d4bd235 100644 --- a/cpp/src/Slice/PythonUtil.cpp +++ b/cpp/src/Slice/PythonUtil.cpp @@ -680,31 +680,76 @@ Slice::Python::CodeVisitor::visitClassDefStart(const ClassDefPtr& p) } } - _out << sp << nl << "def " << fixedOpName << "(self"; + comment = (*oli)->comment(); + if(!comment.empty()) + { + comment = "'''" + editComment(comment) + "'''"; + } + + _out << sp; + if(!comment.empty()) + { + _out << nl << comment; + } + _out << nl << "def " << fixedOpName << "(self"; if(!inParams.empty()) { _out << ", " << inParams; } _out << ", _ctx=None):"; _out.inc(); + _out << nl << "return _M_" << abs << "._op_" << (*oli)->name() << ".invoke(self, ((" << inParams; + if(!inParams.empty() && inParams.find(',') == string::npos) + { + _out << ", "; + } + _out << "), _ctx))"; + _out.dec(); - comment = (*oli)->comment(); + // + // Async operations. + // + _out << sp; if(!comment.empty()) { - _out << nl << "'''" << editComment(comment) << "'''"; + _out << nl << comment; } - - _out << nl << "return _M_" << abs << "._op_" << (*oli)->name() << ".invoke(self, ((" << inParams; + _out << nl << "def begin_" << (*oli)->name() << "(self"; + if(!inParams.empty()) + { + _out << ", " << inParams; + } + _out << ", _response=None, _ex=None, _sent=None, _ctx=None):"; + _out.inc(); + _out << nl << "return _M_" << abs << "._op_" << (*oli)->name() << ".begin(self, ((" << inParams; if(!inParams.empty() && inParams.find(',') == string::npos) { _out << ", "; } - _out << "), _ctx))"; + _out << "), _response, _ex, _sent, _ctx))"; + _out.dec(); + + _out << sp; + if(!comment.empty()) + { + _out << nl << comment; + } + _out << nl << "def end_" << (*oli)->name() << "(self, _r):"; + _out.inc(); + _out << nl << "return _M_" << abs << "._op_" << (*oli)->name() << ".end(self, _r)"; _out.dec(); + // + // Old AMI operations. + // if(p->hasMetaData("ami") || (*oli)->hasMetaData("ami")) { - _out << sp << nl << "def " << fixedOpName << "_async(self, _cb"; + _out << sp; + if(!comment.empty()) + { + _out << nl << comment; + } + _out << nl << "def " << fixedOpName << "_async(self, _cb"; if(!inParams.empty()) { _out << ", " << inParams; @@ -712,11 +757,6 @@ Slice::Python::CodeVisitor::visitClassDefStart(const ClassDefPtr& p) _out << ", _ctx=None):"; _out.inc(); - if(!comment.empty()) - { - _out << nl << "'''" << editComment(comment) << "'''"; - } - _out << nl << "return _M_" << abs << "._op_" << (*oli)->name() << ".invokeAsync(self, (_cb, (" << inParams; if(!inParams.empty() && inParams.find(',') == string::npos) diff --git a/cpp/test/Ice/exceptions/AllTests.cpp b/cpp/test/Ice/exceptions/AllTests.cpp index 1e36c4dae0e..32bc0f641c2 100644 --- a/cpp/test/Ice/exceptions/AllTests.cpp +++ b/cpp/test/Ice/exceptions/AllTests.cpp @@ -1716,7 +1716,7 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated) cout << "ok" << endl; - cout << "catching unknown non-Ice exception with AMI... " << flush; + cout << "catching unknown non-Ice exception with new AMI mapping... " << flush; { CallbackPtr cb = new Callback; diff --git a/cpp/test/Ice/operations/OnewaysNewAMI.cpp b/cpp/test/Ice/operations/OnewaysNewAMI.cpp index c8f6517edb6..81c94753bb6 100644 --- a/cpp/test/Ice/operations/OnewaysNewAMI.cpp +++ b/cpp/test/Ice/operations/OnewaysNewAMI.cpp @@ -65,10 +65,6 @@ public: { } - void opByte(Ice::Byte b, Ice::Byte b1) - { - } - void sent(bool) { called(); diff --git a/cpp/test/Ice/slicing/objects/Test.ice b/cpp/test/Ice/slicing/objects/Test.ice index c8e4a27fbba..6397c434802 100644 --- a/cpp/test/Ice/slicing/objects/Test.ice +++ b/cpp/test/Ice/slicing/objects/Test.ice @@ -67,7 +67,7 @@ exception DerivedException extends BaseException D1 pd1; }; -class Forward; // Forward-declared class defined in another compilation unit +class Forward; /* Forward-declared class defined in another compilation unit */ ["ami"] interface TestIntf { diff --git a/cs/test/Ice/exceptions/AllTests.cs b/cs/test/Ice/exceptions/AllTests.cs index a2673716910..f737bb17f5d 100644 --- a/cs/test/Ice/exceptions/AllTests.cs +++ b/cs/test/Ice/exceptions/AllTests.cs @@ -1654,7 +1654,7 @@ public class AllTests Console.WriteLine("ok"); - Console.Write("catching unknown non-Ice exception with AMI... "); + Console.Write("catching unknown non-Ice exception with new AMI mapping... "); Console.Out.Flush(); { diff --git a/java/test/Ice/ami/AllTests.java b/java/test/Ice/ami/AllTests.java index 549bb9e41b3..e97a959268c 100644 --- a/java/test/Ice/ami/AllTests.java +++ b/java/test/Ice/ami/AllTests.java @@ -439,7 +439,6 @@ public class AllTests { FlushExCallback() { - _thread = Thread.currentThread().getId(); } public void @@ -480,8 +479,6 @@ public class AllTests { test(false); } - - long _thread; } enum ThrowType { LocalException, OtherException }; diff --git a/java/test/Ice/exceptions/AllTests.java b/java/test/Ice/exceptions/AllTests.java index 8fec6291ebd..afc68f037d2 100644 --- a/java/test/Ice/exceptions/AllTests.java +++ b/java/test/Ice/exceptions/AllTests.java @@ -2144,7 +2144,7 @@ public class AllTests out.println("ok"); - out.print("catching unknown non-Ice exception with AMI... "); + out.print("catching unknown non-Ice exception with new AMI mapping... "); out.flush(); { diff --git a/java/test/Ice/operations/OnewaysNewAMI.java b/java/test/Ice/operations/OnewaysNewAMI.java index 6e7ffa0f85b..fdcf7522f83 100644 --- a/java/test/Ice/operations/OnewaysNewAMI.java +++ b/java/test/Ice/operations/OnewaysNewAMI.java @@ -76,7 +76,7 @@ class OnewaysNewAMI { test(false); } - }; + } static void onewaysNewAMI(test.Util.Application app, MyClassPrx proxy) diff --git a/java/test/Ice/operations/TwowaysNewAMI.java b/java/test/Ice/operations/TwowaysNewAMI.java index e6805d85fbc..b7e90680162 100644 --- a/java/test/Ice/operations/TwowaysNewAMI.java +++ b/java/test/Ice/operations/TwowaysNewAMI.java @@ -207,32 +207,6 @@ class TwowaysNewAMI private Callback callback = new Callback(); } - /* - private static class opVoidExI extends Ice.ResponseDelegate - { - public void - ice_response() - { - test(false); - } - - public void - ice_exception(Ice.LocalException ex) - { - test(ex instanceof Ice.NoEndpointException); - callback.called(); - } - - public void - check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - */ - private static class opByteI extends Callback_MyClass_opByte { @Override @@ -257,32 +231,6 @@ class TwowaysNewAMI private Callback callback = new Callback(); } - /* - private static class opByteExI extends Callback_MyClass_opByte - { - public void - ice_response(byte r, byte b) - { - test(false); - } - - public void - ice_exception(Ice.LocalException ex) - { - test(ex instanceof Ice.NoEndpointException); - callback.called(); - } - - public void - check() - { - callback.check(); - } - - private Callback callback = new Callback(); - } - */ - private static class opBoolI extends Callback_MyClass_opBool { @Override @@ -1135,66 +1083,6 @@ class TwowaysNewAMI private Callback callback = new Callback(); } - /* - private static class opContextEqualI extends Callback_MyClass_opContext - { - Callback_MyClass_opContextEqualI(java.util.Map<String, String> d) - { - _d = d; - } - - @Override - public void response(java.util.Map r) - { - test(r.equals(_d)); - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private java.util.Map<String, String> _d; - private Callback callback = new Callback(); - } - - private static class opContextNotEqualI extends Callback_MyClass_opContext - { - Callback_MyClass_opContextNotEqualI(java.util.Map<String, String> d) - { - _d = d; - } - - @Override - public void response(java.util.Map r) - { - test(!r.equals(_d)); - callback.called(); - } - - @Override - public void exception(Ice.LocalException ex) - { - test(false); - } - - public void check() - { - callback.check(); - } - - private java.util.Map<String, String> _d; - private Callback callback = new Callback(); - } - */ - private static class opDerivedI extends Callback_MyDerivedClass_opDerived { @Override diff --git a/py/allTests.py b/py/allTests.py index 3e6d9c28a50..3fec3d9d6d2 100755 --- a/py/allTests.py +++ b/py/allTests.py @@ -44,7 +44,8 @@ tests = [ ("Ice/timeout", ["core"]), ("Ice/servantLocator", ["core"]), ("Ice/blobject", ["core"]), - ("Ice/defaultServant", ["core"]) + ("Ice/defaultServant", ["core"]), + ("Ice/ami", ["core"]) ] if __name__ == "__main__": diff --git a/py/demo/Ice/async/Client.py b/py/demo/Ice/async/Client.py index 00aec3329f9..5060086e531 100755 --- a/py/demo/Ice/async/Client.py +++ b/py/demo/Ice/async/Client.py @@ -13,11 +13,11 @@ import sys, os, traceback, threading, Ice Ice.loadSlice('Hello.ice') import Demo -class AMI_Hello_sayHelloI: - def ice_response(self): +class Callback: + def response(self): pass - def ice_exception(self, ex): + def exception(self, ex): if isinstance(ex, Demo.RequestCanceledException): print "Demo.RequestCanceledException" else: @@ -54,7 +54,8 @@ class Client(Ice.Application): if c == 'i': hello.sayHello(0) elif c == 'd': - hello.sayHello_async(AMI_Hello_sayHelloI(), 5000) + cb = Callback() + hello.begin_sayHello(5000, cb.response, cb.exception) elif c == 's': hello.shutdown() elif c == 'x': diff --git a/py/demo/Ice/async/Hello.ice b/py/demo/Ice/async/Hello.ice index f3bbe38d5b0..90ea8ed422d 100644 --- a/py/demo/Ice/async/Hello.ice +++ b/py/demo/Ice/async/Hello.ice @@ -19,7 +19,7 @@ exception RequestCanceledException interface Hello { - ["ami", "amd"] idempotent void sayHello(int delay) + ["amd"] idempotent void sayHello(int delay) throws RequestCanceledException; void shutdown(); diff --git a/py/modules/IcePy/.depend b/py/modules/IcePy/.depend index 779f28aec33..a2fda9360ae 100644 --- a/py/modules/IcePy/.depend +++ b/py/modules/IcePy/.depend @@ -1,5 +1,5 @@ -Communicator$(OBJEXT): Communicator.cpp $(ice_cpp_dir)/include/IceUtil/DisableWarnings.h Communicator.h Config.h $(ice_cpp_dir)/include/Ice/CommunicatorF.h $(ice_cpp_dir)/include/Ice/LocalObjectF.h $(ice_cpp_dir)/include/IceUtil/Shared.h $(ice_cpp_dir)/include/IceUtil/Config.h $(ice_cpp_dir)/include/Ice/Handle.h $(ice_cpp_dir)/include/IceUtil/Handle.h $(ice_cpp_dir)/include/IceUtil/Exception.h $(ice_cpp_dir)/include/Ice/Config.h $(ice_cpp_dir)/include/Ice/ProxyHandle.h $(ice_cpp_dir)/include/Ice/ProxyF.h $(ice_cpp_dir)/include/Ice/ObjectF.h $(ice_cpp_dir)/include/Ice/Exception.h $(ice_cpp_dir)/include/Ice/LocalObject.h $(ice_cpp_dir)/include/IceUtil/ScopedArray.h $(ice_cpp_dir)/include/Ice/UndefSysMacros.h ImplicitContext.h $(ice_cpp_dir)/include/Ice/ImplicitContext.h $(ice_cpp_dir)/include/Ice/Proxy.h $(ice_cpp_dir)/include/IceUtil/Mutex.h $(ice_cpp_dir)/include/IceUtil/Lock.h $(ice_cpp_dir)/include/IceUtil/ThreadException.h $(ice_cpp_dir)/include/IceUtil/Time.h $(ice_cpp_dir)/include/IceUtil/MutexProtocol.h $(ice_cpp_dir)/include/Ice/ProxyFactoryF.h $(ice_cpp_dir)/include/Ice/ConnectionIF.h $(ice_cpp_dir)/include/Ice/RequestHandlerF.h $(ice_cpp_dir)/include/Ice/EndpointIF.h $(ice_cpp_dir)/include/Ice/EndpointF.h $(ice_cpp_dir)/include/Ice/EndpointTypes.h $(ice_cpp_dir)/include/Ice/ObjectAdapterF.h $(ice_cpp_dir)/include/Ice/ReferenceF.h $(ice_cpp_dir)/include/Ice/OutgoingAsync.h $(ice_cpp_dir)/include/IceUtil/Monitor.h $(ice_cpp_dir)/include/IceUtil/Cond.h $(ice_cpp_dir)/include/IceUtil/Timer.h $(ice_cpp_dir)/include/IceUtil/Thread.h $(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h $(ice_cpp_dir)/include/Ice/InstanceF.h $(ice_cpp_dir)/include/Ice/Current.h $(ice_cpp_dir)/include/Ice/ConnectionF.h $(ice_cpp_dir)/include/Ice/Identity.h $(ice_cpp_dir)/include/Ice/BasicStream.h $(ice_cpp_dir)/include/Ice/ObjectFactoryF.h $(ice_cpp_dir)/include/Ice/Buffer.h $(ice_cpp_dir)/include/Ice/Protocol.h $(ice_cpp_dir)/include/Ice/StreamF.h $(ice_cpp_dir)/include/Ice/LocalException.h $(ice_cpp_dir)/include/Ice/BuiltinSequences.h $(ice_cpp_dir)/include/Ice/Stream.h $(ice_cpp_dir)/include/Ice/Object.h $(ice_cpp_dir)/include/Ice/GCShared.h $(ice_cpp_dir)/include/Ice/GCCountMap.h $(ice_cpp_dir)/include/Ice/IncomingAsyncF.h Logger.h Util.h $(ice_cpp_dir)/include/Ice/Logger.h ObjectAdapter.h ObjectFactory.h $(ice_cpp_dir)/include/Ice/ObjectFactory.h Operation.h Properties.h $(ice_cpp_dir)/include/Ice/PropertiesF.h Proxy.h ThreadNotification.h $(ice_cpp_dir)/include/Ice/Initialize.h $(ice_cpp_dir)/include/Ice/LoggerF.h $(ice_cpp_dir)/include/Ice/StatsF.h $(ice_cpp_dir)/include/Ice/Dispatcher.h $(ice_cpp_dir)/include/Ice/StringConverter.h $(ice_cpp_dir)/include/Ice/Plugin.h $(ice_cpp_dir)/include/IceUtil/Unicode.h $(ice_cpp_dir)/include/Ice/Communicator.h $(ice_cpp_dir)/include/Ice/Outgoing.h $(ice_cpp_dir)/include/Ice/Incoming.h $(ice_cpp_dir)/include/Ice/ServantLocatorF.h $(ice_cpp_dir)/include/Ice/ServantManagerF.h $(ice_cpp_dir)/include/Ice/Direct.h $(ice_cpp_dir)/include/Ice/RouterF.h $(ice_cpp_dir)/include/Ice/LocatorF.h $(ice_cpp_dir)/include/Ice/PluginF.h $(ice_cpp_dir)/include/Ice/ImplicitContextF.h $(ice_cpp_dir)/include/Ice/Properties.h $(ice_cpp_dir)/include/Ice/Locator.h $(ice_cpp_dir)/include/Ice/IncomingAsync.h $(ice_cpp_dir)/include/Ice/FactoryTableInit.h $(ice_cpp_dir)/include/Ice/FactoryTable.h $(ice_cpp_dir)/include/Ice/UserExceptionFactory.h $(ice_cpp_dir)/include/Ice/ProcessF.h $(ice_cpp_dir)/include/Ice/ObjectAdapter.h $(ice_cpp_dir)/include/Ice/FacetMap.h $(ice_cpp_dir)/include/Ice/Endpoint.h $(ice_cpp_dir)/include/Ice/Router.h -Connection$(OBJEXT): Connection.cpp Connection.h Config.h $(ice_cpp_dir)/include/Ice/ConnectionF.h $(ice_cpp_dir)/include/Ice/LocalObjectF.h $(ice_cpp_dir)/include/IceUtil/Shared.h $(ice_cpp_dir)/include/IceUtil/Config.h $(ice_cpp_dir)/include/Ice/Handle.h $(ice_cpp_dir)/include/IceUtil/Handle.h $(ice_cpp_dir)/include/IceUtil/Exception.h $(ice_cpp_dir)/include/Ice/Config.h $(ice_cpp_dir)/include/Ice/ProxyHandle.h $(ice_cpp_dir)/include/Ice/ProxyF.h $(ice_cpp_dir)/include/Ice/ObjectF.h $(ice_cpp_dir)/include/Ice/Exception.h $(ice_cpp_dir)/include/Ice/LocalObject.h $(ice_cpp_dir)/include/IceUtil/ScopedArray.h $(ice_cpp_dir)/include/Ice/UndefSysMacros.h $(ice_cpp_dir)/include/Ice/CommunicatorF.h ConnectionInfo.h $(ice_cpp_dir)/include/Ice/Connection.h $(ice_cpp_dir)/include/Ice/Proxy.h $(ice_cpp_dir)/include/IceUtil/Mutex.h $(ice_cpp_dir)/include/IceUtil/Lock.h $(ice_cpp_dir)/include/IceUtil/ThreadException.h $(ice_cpp_dir)/include/IceUtil/Time.h $(ice_cpp_dir)/include/IceUtil/MutexProtocol.h $(ice_cpp_dir)/include/Ice/ProxyFactoryF.h $(ice_cpp_dir)/include/Ice/ConnectionIF.h $(ice_cpp_dir)/include/Ice/RequestHandlerF.h $(ice_cpp_dir)/include/Ice/EndpointIF.h $(ice_cpp_dir)/include/Ice/EndpointF.h $(ice_cpp_dir)/include/Ice/EndpointTypes.h $(ice_cpp_dir)/include/Ice/ObjectAdapterF.h $(ice_cpp_dir)/include/Ice/ReferenceF.h $(ice_cpp_dir)/include/Ice/OutgoingAsync.h $(ice_cpp_dir)/include/IceUtil/Monitor.h $(ice_cpp_dir)/include/IceUtil/Cond.h $(ice_cpp_dir)/include/IceUtil/Timer.h $(ice_cpp_dir)/include/IceUtil/Thread.h $(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h $(ice_cpp_dir)/include/Ice/InstanceF.h $(ice_cpp_dir)/include/Ice/Current.h $(ice_cpp_dir)/include/Ice/Identity.h $(ice_cpp_dir)/include/Ice/BasicStream.h $(ice_cpp_dir)/include/Ice/ObjectFactoryF.h $(ice_cpp_dir)/include/Ice/Buffer.h $(ice_cpp_dir)/include/Ice/Protocol.h $(ice_cpp_dir)/include/Ice/StreamF.h $(ice_cpp_dir)/include/Ice/Endpoint.h $(ice_cpp_dir)/include/Ice/BuiltinSequences.h $(ice_cpp_dir)/include/Ice/Stream.h $(ice_cpp_dir)/include/Ice/Object.h $(ice_cpp_dir)/include/Ice/GCShared.h $(ice_cpp_dir)/include/Ice/GCCountMap.h $(ice_cpp_dir)/include/Ice/IncomingAsyncF.h Endpoint.h ObjectAdapter.h Proxy.h Util.h +Communicator$(OBJEXT): Communicator.cpp $(ice_cpp_dir)/include/IceUtil/DisableWarnings.h Communicator.h Config.h $(ice_cpp_dir)/include/Ice/CommunicatorF.h $(ice_cpp_dir)/include/Ice/LocalObjectF.h $(ice_cpp_dir)/include/IceUtil/Shared.h $(ice_cpp_dir)/include/IceUtil/Config.h $(ice_cpp_dir)/include/Ice/Handle.h $(ice_cpp_dir)/include/IceUtil/Handle.h $(ice_cpp_dir)/include/IceUtil/Exception.h $(ice_cpp_dir)/include/Ice/Config.h $(ice_cpp_dir)/include/Ice/ProxyHandle.h $(ice_cpp_dir)/include/Ice/ProxyF.h $(ice_cpp_dir)/include/Ice/ObjectF.h $(ice_cpp_dir)/include/Ice/Exception.h $(ice_cpp_dir)/include/Ice/LocalObject.h $(ice_cpp_dir)/include/IceUtil/ScopedArray.h $(ice_cpp_dir)/include/Ice/UndefSysMacros.h ImplicitContext.h $(ice_cpp_dir)/include/Ice/ImplicitContext.h $(ice_cpp_dir)/include/Ice/Proxy.h $(ice_cpp_dir)/include/IceUtil/Mutex.h $(ice_cpp_dir)/include/IceUtil/Lock.h $(ice_cpp_dir)/include/IceUtil/ThreadException.h $(ice_cpp_dir)/include/IceUtil/Time.h $(ice_cpp_dir)/include/IceUtil/MutexProtocol.h $(ice_cpp_dir)/include/Ice/ProxyFactoryF.h $(ice_cpp_dir)/include/Ice/ConnectionIF.h $(ice_cpp_dir)/include/Ice/RequestHandlerF.h $(ice_cpp_dir)/include/Ice/EndpointIF.h $(ice_cpp_dir)/include/Ice/EndpointF.h $(ice_cpp_dir)/include/Ice/EndpointTypes.h $(ice_cpp_dir)/include/Ice/ObjectAdapterF.h $(ice_cpp_dir)/include/Ice/ReferenceF.h $(ice_cpp_dir)/include/Ice/OutgoingAsync.h $(ice_cpp_dir)/include/IceUtil/Monitor.h $(ice_cpp_dir)/include/IceUtil/Cond.h $(ice_cpp_dir)/include/IceUtil/Timer.h $(ice_cpp_dir)/include/IceUtil/Thread.h $(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h $(ice_cpp_dir)/include/Ice/InstanceF.h $(ice_cpp_dir)/include/Ice/Current.h $(ice_cpp_dir)/include/Ice/ConnectionF.h $(ice_cpp_dir)/include/Ice/Identity.h $(ice_cpp_dir)/include/Ice/BasicStream.h $(ice_cpp_dir)/include/Ice/ObjectFactoryF.h $(ice_cpp_dir)/include/Ice/Buffer.h $(ice_cpp_dir)/include/Ice/Protocol.h $(ice_cpp_dir)/include/Ice/StreamF.h $(ice_cpp_dir)/include/Ice/LocalException.h $(ice_cpp_dir)/include/Ice/BuiltinSequences.h $(ice_cpp_dir)/include/Ice/Stream.h $(ice_cpp_dir)/include/Ice/Object.h $(ice_cpp_dir)/include/Ice/GCShared.h $(ice_cpp_dir)/include/Ice/GCCountMap.h $(ice_cpp_dir)/include/Ice/IncomingAsyncF.h Logger.h Util.h $(ice_cpp_dir)/include/Ice/Logger.h ObjectAdapter.h ObjectFactory.h $(ice_cpp_dir)/include/Ice/ObjectFactory.h Operation.h Properties.h $(ice_cpp_dir)/include/Ice/PropertiesF.h Proxy.h ThreadNotification.h $(ice_cpp_dir)/include/Ice/Initialize.h $(ice_cpp_dir)/include/Ice/LoggerF.h $(ice_cpp_dir)/include/Ice/StatsF.h $(ice_cpp_dir)/include/Ice/Dispatcher.h $(ice_cpp_dir)/include/Ice/StringConverter.h $(ice_cpp_dir)/include/Ice/Plugin.h $(ice_cpp_dir)/include/IceUtil/Unicode.h $(ice_cpp_dir)/include/Ice/CommunicatorAsync.h $(ice_cpp_dir)/include/Ice/Communicator.h $(ice_cpp_dir)/include/Ice/Outgoing.h $(ice_cpp_dir)/include/Ice/Incoming.h $(ice_cpp_dir)/include/Ice/ServantLocatorF.h $(ice_cpp_dir)/include/Ice/ServantManagerF.h $(ice_cpp_dir)/include/Ice/Direct.h $(ice_cpp_dir)/include/Ice/RouterF.h $(ice_cpp_dir)/include/Ice/LocatorF.h $(ice_cpp_dir)/include/Ice/PluginF.h $(ice_cpp_dir)/include/Ice/ImplicitContextF.h $(ice_cpp_dir)/include/Ice/Properties.h $(ice_cpp_dir)/include/Ice/Locator.h $(ice_cpp_dir)/include/Ice/IncomingAsync.h $(ice_cpp_dir)/include/Ice/FactoryTableInit.h $(ice_cpp_dir)/include/Ice/FactoryTable.h $(ice_cpp_dir)/include/Ice/UserExceptionFactory.h $(ice_cpp_dir)/include/Ice/ProcessF.h $(ice_cpp_dir)/include/Ice/ObjectAdapter.h $(ice_cpp_dir)/include/Ice/FacetMap.h $(ice_cpp_dir)/include/Ice/Endpoint.h $(ice_cpp_dir)/include/Ice/Router.h +Connection$(OBJEXT): Connection.cpp Connection.h Config.h $(ice_cpp_dir)/include/Ice/ConnectionF.h $(ice_cpp_dir)/include/Ice/LocalObjectF.h $(ice_cpp_dir)/include/IceUtil/Shared.h $(ice_cpp_dir)/include/IceUtil/Config.h $(ice_cpp_dir)/include/Ice/Handle.h $(ice_cpp_dir)/include/IceUtil/Handle.h $(ice_cpp_dir)/include/IceUtil/Exception.h $(ice_cpp_dir)/include/Ice/Config.h $(ice_cpp_dir)/include/Ice/ProxyHandle.h $(ice_cpp_dir)/include/Ice/ProxyF.h $(ice_cpp_dir)/include/Ice/ObjectF.h $(ice_cpp_dir)/include/Ice/Exception.h $(ice_cpp_dir)/include/Ice/LocalObject.h $(ice_cpp_dir)/include/IceUtil/ScopedArray.h $(ice_cpp_dir)/include/Ice/UndefSysMacros.h $(ice_cpp_dir)/include/Ice/CommunicatorF.h ConnectionInfo.h $(ice_cpp_dir)/include/Ice/Connection.h $(ice_cpp_dir)/include/Ice/Proxy.h $(ice_cpp_dir)/include/IceUtil/Mutex.h $(ice_cpp_dir)/include/IceUtil/Lock.h $(ice_cpp_dir)/include/IceUtil/ThreadException.h $(ice_cpp_dir)/include/IceUtil/Time.h $(ice_cpp_dir)/include/IceUtil/MutexProtocol.h $(ice_cpp_dir)/include/Ice/ProxyFactoryF.h $(ice_cpp_dir)/include/Ice/ConnectionIF.h $(ice_cpp_dir)/include/Ice/RequestHandlerF.h $(ice_cpp_dir)/include/Ice/EndpointIF.h $(ice_cpp_dir)/include/Ice/EndpointF.h $(ice_cpp_dir)/include/Ice/EndpointTypes.h $(ice_cpp_dir)/include/Ice/ObjectAdapterF.h $(ice_cpp_dir)/include/Ice/ReferenceF.h $(ice_cpp_dir)/include/Ice/OutgoingAsync.h $(ice_cpp_dir)/include/IceUtil/Monitor.h $(ice_cpp_dir)/include/IceUtil/Cond.h $(ice_cpp_dir)/include/IceUtil/Timer.h $(ice_cpp_dir)/include/IceUtil/Thread.h $(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h $(ice_cpp_dir)/include/Ice/InstanceF.h $(ice_cpp_dir)/include/Ice/Current.h $(ice_cpp_dir)/include/Ice/Identity.h $(ice_cpp_dir)/include/Ice/BasicStream.h $(ice_cpp_dir)/include/Ice/ObjectFactoryF.h $(ice_cpp_dir)/include/Ice/Buffer.h $(ice_cpp_dir)/include/Ice/Protocol.h $(ice_cpp_dir)/include/Ice/StreamF.h $(ice_cpp_dir)/include/Ice/Endpoint.h $(ice_cpp_dir)/include/Ice/BuiltinSequences.h $(ice_cpp_dir)/include/Ice/Stream.h $(ice_cpp_dir)/include/Ice/Object.h $(ice_cpp_dir)/include/Ice/GCShared.h $(ice_cpp_dir)/include/Ice/GCCountMap.h $(ice_cpp_dir)/include/Ice/IncomingAsyncF.h Endpoint.h ObjectAdapter.h Operation.h Proxy.h Util.h $(ice_cpp_dir)/include/Ice/ConnectionAsync.h ConnectionInfo$(OBJEXT): ConnectionInfo.cpp ConnectionInfo.h Config.h $(ice_cpp_dir)/include/Ice/Connection.h $(ice_cpp_dir)/include/Ice/LocalObjectF.h $(ice_cpp_dir)/include/IceUtil/Shared.h $(ice_cpp_dir)/include/IceUtil/Config.h $(ice_cpp_dir)/include/Ice/Handle.h $(ice_cpp_dir)/include/IceUtil/Handle.h $(ice_cpp_dir)/include/IceUtil/Exception.h $(ice_cpp_dir)/include/Ice/Config.h $(ice_cpp_dir)/include/Ice/ProxyHandle.h $(ice_cpp_dir)/include/Ice/ProxyF.h $(ice_cpp_dir)/include/Ice/ObjectF.h $(ice_cpp_dir)/include/Ice/Exception.h $(ice_cpp_dir)/include/Ice/LocalObject.h $(ice_cpp_dir)/include/Ice/Proxy.h $(ice_cpp_dir)/include/IceUtil/Mutex.h $(ice_cpp_dir)/include/IceUtil/Lock.h $(ice_cpp_dir)/include/IceUtil/ThreadException.h $(ice_cpp_dir)/include/IceUtil/Time.h $(ice_cpp_dir)/include/IceUtil/MutexProtocol.h $(ice_cpp_dir)/include/Ice/ProxyFactoryF.h $(ice_cpp_dir)/include/Ice/ConnectionIF.h $(ice_cpp_dir)/include/Ice/RequestHandlerF.h $(ice_cpp_dir)/include/Ice/EndpointIF.h $(ice_cpp_dir)/include/Ice/EndpointF.h $(ice_cpp_dir)/include/IceUtil/ScopedArray.h $(ice_cpp_dir)/include/Ice/UndefSysMacros.h $(ice_cpp_dir)/include/Ice/EndpointTypes.h $(ice_cpp_dir)/include/Ice/ObjectAdapterF.h $(ice_cpp_dir)/include/Ice/ReferenceF.h $(ice_cpp_dir)/include/Ice/OutgoingAsync.h $(ice_cpp_dir)/include/IceUtil/Monitor.h $(ice_cpp_dir)/include/IceUtil/Cond.h $(ice_cpp_dir)/include/IceUtil/Timer.h $(ice_cpp_dir)/include/IceUtil/Thread.h $(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h $(ice_cpp_dir)/include/Ice/InstanceF.h $(ice_cpp_dir)/include/Ice/CommunicatorF.h $(ice_cpp_dir)/include/Ice/Current.h $(ice_cpp_dir)/include/Ice/ConnectionF.h $(ice_cpp_dir)/include/Ice/Identity.h $(ice_cpp_dir)/include/Ice/BasicStream.h $(ice_cpp_dir)/include/Ice/ObjectFactoryF.h $(ice_cpp_dir)/include/Ice/Buffer.h $(ice_cpp_dir)/include/Ice/Protocol.h $(ice_cpp_dir)/include/Ice/StreamF.h $(ice_cpp_dir)/include/Ice/Endpoint.h $(ice_cpp_dir)/include/Ice/BuiltinSequences.h $(ice_cpp_dir)/include/Ice/Stream.h $(ice_cpp_dir)/include/Ice/Object.h $(ice_cpp_dir)/include/Ice/GCShared.h $(ice_cpp_dir)/include/Ice/GCCountMap.h $(ice_cpp_dir)/include/Ice/IncomingAsyncF.h EndpointInfo.h Util.h Current$(OBJEXT): Current.cpp Current.h Config.h $(ice_cpp_dir)/include/Ice/Current.h $(ice_cpp_dir)/include/Ice/LocalObjectF.h $(ice_cpp_dir)/include/IceUtil/Shared.h $(ice_cpp_dir)/include/IceUtil/Config.h $(ice_cpp_dir)/include/Ice/Handle.h $(ice_cpp_dir)/include/IceUtil/Handle.h $(ice_cpp_dir)/include/IceUtil/Exception.h $(ice_cpp_dir)/include/Ice/Config.h $(ice_cpp_dir)/include/Ice/ProxyHandle.h $(ice_cpp_dir)/include/Ice/ProxyF.h $(ice_cpp_dir)/include/Ice/ObjectF.h $(ice_cpp_dir)/include/Ice/Exception.h $(ice_cpp_dir)/include/Ice/LocalObject.h $(ice_cpp_dir)/include/IceUtil/ScopedArray.h $(ice_cpp_dir)/include/Ice/ObjectAdapterF.h $(ice_cpp_dir)/include/Ice/UndefSysMacros.h $(ice_cpp_dir)/include/Ice/ConnectionF.h $(ice_cpp_dir)/include/Ice/Identity.h Connection.h $(ice_cpp_dir)/include/Ice/CommunicatorF.h ObjectAdapter.h Util.h $(ice_cpp_dir)/include/Ice/BuiltinSequences.h $(ice_cpp_dir)/include/Ice/Proxy.h $(ice_cpp_dir)/include/IceUtil/Mutex.h $(ice_cpp_dir)/include/IceUtil/Lock.h $(ice_cpp_dir)/include/IceUtil/ThreadException.h $(ice_cpp_dir)/include/IceUtil/Time.h $(ice_cpp_dir)/include/IceUtil/MutexProtocol.h $(ice_cpp_dir)/include/Ice/ProxyFactoryF.h $(ice_cpp_dir)/include/Ice/ConnectionIF.h $(ice_cpp_dir)/include/Ice/RequestHandlerF.h $(ice_cpp_dir)/include/Ice/EndpointIF.h $(ice_cpp_dir)/include/Ice/EndpointF.h $(ice_cpp_dir)/include/Ice/EndpointTypes.h $(ice_cpp_dir)/include/Ice/ReferenceF.h $(ice_cpp_dir)/include/Ice/OutgoingAsync.h $(ice_cpp_dir)/include/IceUtil/Monitor.h $(ice_cpp_dir)/include/IceUtil/Cond.h $(ice_cpp_dir)/include/IceUtil/Timer.h $(ice_cpp_dir)/include/IceUtil/Thread.h $(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h $(ice_cpp_dir)/include/Ice/InstanceF.h $(ice_cpp_dir)/include/Ice/BasicStream.h $(ice_cpp_dir)/include/Ice/ObjectFactoryF.h $(ice_cpp_dir)/include/Ice/Buffer.h $(ice_cpp_dir)/include/Ice/Protocol.h $(ice_cpp_dir)/include/Ice/StreamF.h $(ice_cpp_dir)/include/Ice/Stream.h $(ice_cpp_dir)/include/Ice/Object.h $(ice_cpp_dir)/include/Ice/GCShared.h $(ice_cpp_dir)/include/Ice/GCCountMap.h $(ice_cpp_dir)/include/Ice/IncomingAsyncF.h $(ice_cpp_dir)/include/Ice/ObjectAdapter.h $(ice_cpp_dir)/include/Ice/ServantLocatorF.h $(ice_cpp_dir)/include/Ice/LocatorF.h $(ice_cpp_dir)/include/Ice/FacetMap.h $(ice_cpp_dir)/include/Ice/Endpoint.h Endpoint$(OBJEXT): Endpoint.cpp Endpoint.h Config.h $(ice_cpp_dir)/include/Ice/Endpoint.h $(ice_cpp_dir)/include/Ice/LocalObjectF.h $(ice_cpp_dir)/include/IceUtil/Shared.h $(ice_cpp_dir)/include/IceUtil/Config.h $(ice_cpp_dir)/include/Ice/Handle.h $(ice_cpp_dir)/include/IceUtil/Handle.h $(ice_cpp_dir)/include/IceUtil/Exception.h $(ice_cpp_dir)/include/Ice/Config.h $(ice_cpp_dir)/include/Ice/ProxyHandle.h $(ice_cpp_dir)/include/Ice/ProxyF.h $(ice_cpp_dir)/include/Ice/ObjectF.h $(ice_cpp_dir)/include/Ice/Exception.h $(ice_cpp_dir)/include/Ice/LocalObject.h $(ice_cpp_dir)/include/Ice/Proxy.h $(ice_cpp_dir)/include/IceUtil/Mutex.h $(ice_cpp_dir)/include/IceUtil/Lock.h $(ice_cpp_dir)/include/IceUtil/ThreadException.h $(ice_cpp_dir)/include/IceUtil/Time.h $(ice_cpp_dir)/include/IceUtil/MutexProtocol.h $(ice_cpp_dir)/include/Ice/ProxyFactoryF.h $(ice_cpp_dir)/include/Ice/ConnectionIF.h $(ice_cpp_dir)/include/Ice/RequestHandlerF.h $(ice_cpp_dir)/include/Ice/EndpointIF.h $(ice_cpp_dir)/include/Ice/EndpointF.h $(ice_cpp_dir)/include/IceUtil/ScopedArray.h $(ice_cpp_dir)/include/Ice/UndefSysMacros.h $(ice_cpp_dir)/include/Ice/EndpointTypes.h $(ice_cpp_dir)/include/Ice/ObjectAdapterF.h $(ice_cpp_dir)/include/Ice/ReferenceF.h $(ice_cpp_dir)/include/Ice/OutgoingAsync.h $(ice_cpp_dir)/include/IceUtil/Monitor.h $(ice_cpp_dir)/include/IceUtil/Cond.h $(ice_cpp_dir)/include/IceUtil/Timer.h $(ice_cpp_dir)/include/IceUtil/Thread.h $(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h $(ice_cpp_dir)/include/Ice/InstanceF.h $(ice_cpp_dir)/include/Ice/CommunicatorF.h $(ice_cpp_dir)/include/Ice/Current.h $(ice_cpp_dir)/include/Ice/ConnectionF.h $(ice_cpp_dir)/include/Ice/Identity.h $(ice_cpp_dir)/include/Ice/BasicStream.h $(ice_cpp_dir)/include/Ice/ObjectFactoryF.h $(ice_cpp_dir)/include/Ice/Buffer.h $(ice_cpp_dir)/include/Ice/Protocol.h $(ice_cpp_dir)/include/Ice/StreamF.h $(ice_cpp_dir)/include/Ice/BuiltinSequences.h $(ice_cpp_dir)/include/Ice/Stream.h $(ice_cpp_dir)/include/Ice/Object.h $(ice_cpp_dir)/include/Ice/GCShared.h $(ice_cpp_dir)/include/Ice/GCCountMap.h $(ice_cpp_dir)/include/Ice/IncomingAsyncF.h EndpointInfo.h Util.h @@ -9,7 +9,7 @@ Init$(OBJEXT): Init.cpp Communicator.h Config.h $(ice_cpp_dir)/include/Ice/Commu Logger$(OBJEXT): Logger.cpp Logger.h Config.h Util.h $(ice_cpp_dir)/include/Ice/BuiltinSequences.h $(ice_cpp_dir)/include/Ice/LocalObjectF.h $(ice_cpp_dir)/include/IceUtil/Shared.h $(ice_cpp_dir)/include/IceUtil/Config.h $(ice_cpp_dir)/include/Ice/Handle.h $(ice_cpp_dir)/include/IceUtil/Handle.h $(ice_cpp_dir)/include/IceUtil/Exception.h $(ice_cpp_dir)/include/Ice/Config.h $(ice_cpp_dir)/include/Ice/ProxyHandle.h $(ice_cpp_dir)/include/Ice/ProxyF.h $(ice_cpp_dir)/include/Ice/ObjectF.h $(ice_cpp_dir)/include/Ice/Exception.h $(ice_cpp_dir)/include/Ice/LocalObject.h $(ice_cpp_dir)/include/Ice/Proxy.h $(ice_cpp_dir)/include/IceUtil/Mutex.h $(ice_cpp_dir)/include/IceUtil/Lock.h $(ice_cpp_dir)/include/IceUtil/ThreadException.h $(ice_cpp_dir)/include/IceUtil/Time.h $(ice_cpp_dir)/include/IceUtil/MutexProtocol.h $(ice_cpp_dir)/include/Ice/ProxyFactoryF.h $(ice_cpp_dir)/include/Ice/ConnectionIF.h $(ice_cpp_dir)/include/Ice/RequestHandlerF.h $(ice_cpp_dir)/include/Ice/EndpointIF.h $(ice_cpp_dir)/include/Ice/EndpointF.h $(ice_cpp_dir)/include/IceUtil/ScopedArray.h $(ice_cpp_dir)/include/Ice/UndefSysMacros.h $(ice_cpp_dir)/include/Ice/EndpointTypes.h $(ice_cpp_dir)/include/Ice/ObjectAdapterF.h $(ice_cpp_dir)/include/Ice/ReferenceF.h $(ice_cpp_dir)/include/Ice/OutgoingAsync.h $(ice_cpp_dir)/include/IceUtil/Monitor.h $(ice_cpp_dir)/include/IceUtil/Cond.h $(ice_cpp_dir)/include/IceUtil/Timer.h $(ice_cpp_dir)/include/IceUtil/Thread.h $(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h $(ice_cpp_dir)/include/Ice/InstanceF.h $(ice_cpp_dir)/include/Ice/CommunicatorF.h $(ice_cpp_dir)/include/Ice/Current.h $(ice_cpp_dir)/include/Ice/ConnectionF.h $(ice_cpp_dir)/include/Ice/Identity.h $(ice_cpp_dir)/include/Ice/BasicStream.h $(ice_cpp_dir)/include/Ice/ObjectFactoryF.h $(ice_cpp_dir)/include/Ice/Buffer.h $(ice_cpp_dir)/include/Ice/Protocol.h $(ice_cpp_dir)/include/Ice/StreamF.h $(ice_cpp_dir)/include/Ice/Stream.h $(ice_cpp_dir)/include/Ice/Object.h $(ice_cpp_dir)/include/Ice/GCShared.h $(ice_cpp_dir)/include/Ice/GCCountMap.h $(ice_cpp_dir)/include/Ice/IncomingAsyncF.h $(ice_cpp_dir)/include/Ice/Logger.h $(ice_cpp_dir)/include/Ice/Initialize.h $(ice_cpp_dir)/include/Ice/PropertiesF.h $(ice_cpp_dir)/include/Ice/LoggerF.h $(ice_cpp_dir)/include/Ice/StatsF.h $(ice_cpp_dir)/include/Ice/Dispatcher.h $(ice_cpp_dir)/include/Ice/StringConverter.h $(ice_cpp_dir)/include/Ice/Plugin.h $(ice_cpp_dir)/include/IceUtil/Unicode.h ObjectAdapter$(OBJEXT): ObjectAdapter.cpp ObjectAdapter.h Config.h $(ice_cpp_dir)/include/Ice/ObjectAdapterF.h $(ice_cpp_dir)/include/Ice/LocalObjectF.h $(ice_cpp_dir)/include/IceUtil/Shared.h $(ice_cpp_dir)/include/IceUtil/Config.h $(ice_cpp_dir)/include/Ice/Handle.h $(ice_cpp_dir)/include/IceUtil/Handle.h $(ice_cpp_dir)/include/IceUtil/Exception.h $(ice_cpp_dir)/include/Ice/Config.h $(ice_cpp_dir)/include/Ice/ProxyHandle.h $(ice_cpp_dir)/include/Ice/ProxyF.h $(ice_cpp_dir)/include/Ice/ObjectF.h $(ice_cpp_dir)/include/Ice/Exception.h $(ice_cpp_dir)/include/Ice/LocalObject.h $(ice_cpp_dir)/include/IceUtil/ScopedArray.h $(ice_cpp_dir)/include/Ice/UndefSysMacros.h Communicator.h $(ice_cpp_dir)/include/Ice/CommunicatorF.h Current.h $(ice_cpp_dir)/include/Ice/Current.h $(ice_cpp_dir)/include/Ice/ConnectionF.h $(ice_cpp_dir)/include/Ice/Identity.h Endpoint.h $(ice_cpp_dir)/include/Ice/Endpoint.h $(ice_cpp_dir)/include/Ice/Proxy.h $(ice_cpp_dir)/include/IceUtil/Mutex.h $(ice_cpp_dir)/include/IceUtil/Lock.h $(ice_cpp_dir)/include/IceUtil/ThreadException.h $(ice_cpp_dir)/include/IceUtil/Time.h $(ice_cpp_dir)/include/IceUtil/MutexProtocol.h $(ice_cpp_dir)/include/Ice/ProxyFactoryF.h $(ice_cpp_dir)/include/Ice/ConnectionIF.h $(ice_cpp_dir)/include/Ice/RequestHandlerF.h $(ice_cpp_dir)/include/Ice/EndpointIF.h $(ice_cpp_dir)/include/Ice/EndpointF.h $(ice_cpp_dir)/include/Ice/EndpointTypes.h $(ice_cpp_dir)/include/Ice/ReferenceF.h $(ice_cpp_dir)/include/Ice/OutgoingAsync.h $(ice_cpp_dir)/include/IceUtil/Monitor.h $(ice_cpp_dir)/include/IceUtil/Cond.h $(ice_cpp_dir)/include/IceUtil/Timer.h $(ice_cpp_dir)/include/IceUtil/Thread.h $(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h $(ice_cpp_dir)/include/Ice/InstanceF.h $(ice_cpp_dir)/include/Ice/BasicStream.h $(ice_cpp_dir)/include/Ice/ObjectFactoryF.h $(ice_cpp_dir)/include/Ice/Buffer.h $(ice_cpp_dir)/include/Ice/Protocol.h $(ice_cpp_dir)/include/Ice/StreamF.h $(ice_cpp_dir)/include/Ice/BuiltinSequences.h $(ice_cpp_dir)/include/Ice/Stream.h $(ice_cpp_dir)/include/Ice/Object.h $(ice_cpp_dir)/include/Ice/GCShared.h $(ice_cpp_dir)/include/Ice/GCCountMap.h $(ice_cpp_dir)/include/Ice/IncomingAsyncF.h Operation.h Proxy.h Types.h Util.h $(ice_cpp_dir)/include/IceUtil/OutputUtil.h $(ice_cpp_dir)/include/Ice/Communicator.h $(ice_cpp_dir)/include/Ice/Outgoing.h $(ice_cpp_dir)/include/Ice/Incoming.h $(ice_cpp_dir)/include/Ice/ServantLocatorF.h $(ice_cpp_dir)/include/Ice/ServantManagerF.h $(ice_cpp_dir)/include/Ice/Direct.h $(ice_cpp_dir)/include/Ice/LoggerF.h $(ice_cpp_dir)/include/Ice/StatsF.h $(ice_cpp_dir)/include/Ice/RouterF.h $(ice_cpp_dir)/include/Ice/LocatorF.h $(ice_cpp_dir)/include/Ice/PluginF.h $(ice_cpp_dir)/include/Ice/ImplicitContextF.h $(ice_cpp_dir)/include/Ice/Properties.h $(ice_cpp_dir)/include/Ice/LocalException.h $(ice_cpp_dir)/include/Ice/Locator.h $(ice_cpp_dir)/include/Ice/IncomingAsync.h $(ice_cpp_dir)/include/Ice/FactoryTableInit.h $(ice_cpp_dir)/include/Ice/FactoryTable.h $(ice_cpp_dir)/include/Ice/UserExceptionFactory.h $(ice_cpp_dir)/include/Ice/ProcessF.h $(ice_cpp_dir)/include/Ice/ObjectAdapter.h $(ice_cpp_dir)/include/Ice/FacetMap.h $(ice_cpp_dir)/include/Ice/Router.h $(ice_cpp_dir)/include/Ice/ServantLocator.h ObjectFactory$(OBJEXT): ObjectFactory.cpp ObjectFactory.h Config.h $(ice_cpp_dir)/include/Ice/ObjectF.h $(ice_cpp_dir)/include/IceUtil/Shared.h $(ice_cpp_dir)/include/IceUtil/Config.h $(ice_cpp_dir)/include/Ice/Handle.h $(ice_cpp_dir)/include/IceUtil/Handle.h $(ice_cpp_dir)/include/IceUtil/Exception.h $(ice_cpp_dir)/include/Ice/Config.h $(ice_cpp_dir)/include/Ice/ProxyHandle.h $(ice_cpp_dir)/include/Ice/ObjectFactory.h $(ice_cpp_dir)/include/Ice/LocalObjectF.h $(ice_cpp_dir)/include/Ice/ProxyF.h $(ice_cpp_dir)/include/Ice/Exception.h $(ice_cpp_dir)/include/Ice/LocalObject.h $(ice_cpp_dir)/include/IceUtil/ScopedArray.h $(ice_cpp_dir)/include/Ice/UndefSysMacros.h $(ice_cpp_dir)/include/IceUtil/Mutex.h $(ice_cpp_dir)/include/IceUtil/Lock.h $(ice_cpp_dir)/include/IceUtil/ThreadException.h $(ice_cpp_dir)/include/IceUtil/Time.h $(ice_cpp_dir)/include/IceUtil/MutexProtocol.h Types.h Util.h $(ice_cpp_dir)/include/Ice/BuiltinSequences.h $(ice_cpp_dir)/include/Ice/Proxy.h $(ice_cpp_dir)/include/Ice/ProxyFactoryF.h $(ice_cpp_dir)/include/Ice/ConnectionIF.h $(ice_cpp_dir)/include/Ice/RequestHandlerF.h $(ice_cpp_dir)/include/Ice/EndpointIF.h $(ice_cpp_dir)/include/Ice/EndpointF.h $(ice_cpp_dir)/include/Ice/EndpointTypes.h $(ice_cpp_dir)/include/Ice/ObjectAdapterF.h $(ice_cpp_dir)/include/Ice/ReferenceF.h $(ice_cpp_dir)/include/Ice/OutgoingAsync.h $(ice_cpp_dir)/include/IceUtil/Monitor.h $(ice_cpp_dir)/include/IceUtil/Cond.h $(ice_cpp_dir)/include/IceUtil/Timer.h $(ice_cpp_dir)/include/IceUtil/Thread.h $(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h $(ice_cpp_dir)/include/Ice/InstanceF.h $(ice_cpp_dir)/include/Ice/CommunicatorF.h $(ice_cpp_dir)/include/Ice/Current.h $(ice_cpp_dir)/include/Ice/ConnectionF.h $(ice_cpp_dir)/include/Ice/Identity.h $(ice_cpp_dir)/include/Ice/BasicStream.h $(ice_cpp_dir)/include/Ice/ObjectFactoryF.h $(ice_cpp_dir)/include/Ice/Buffer.h $(ice_cpp_dir)/include/Ice/Protocol.h $(ice_cpp_dir)/include/Ice/StreamF.h $(ice_cpp_dir)/include/Ice/Stream.h $(ice_cpp_dir)/include/Ice/Object.h $(ice_cpp_dir)/include/Ice/GCShared.h $(ice_cpp_dir)/include/Ice/GCCountMap.h $(ice_cpp_dir)/include/Ice/IncomingAsyncF.h $(ice_cpp_dir)/include/IceUtil/OutputUtil.h $(ice_cpp_dir)/include/Ice/LocalException.h -Operation$(OBJEXT): Operation.cpp Operation.h Config.h $(ice_cpp_dir)/include/Ice/Current.h $(ice_cpp_dir)/include/Ice/LocalObjectF.h $(ice_cpp_dir)/include/IceUtil/Shared.h $(ice_cpp_dir)/include/IceUtil/Config.h $(ice_cpp_dir)/include/Ice/Handle.h $(ice_cpp_dir)/include/IceUtil/Handle.h $(ice_cpp_dir)/include/IceUtil/Exception.h $(ice_cpp_dir)/include/Ice/Config.h $(ice_cpp_dir)/include/Ice/ProxyHandle.h $(ice_cpp_dir)/include/Ice/ProxyF.h $(ice_cpp_dir)/include/Ice/ObjectF.h $(ice_cpp_dir)/include/Ice/Exception.h $(ice_cpp_dir)/include/Ice/LocalObject.h $(ice_cpp_dir)/include/IceUtil/ScopedArray.h $(ice_cpp_dir)/include/Ice/ObjectAdapterF.h $(ice_cpp_dir)/include/Ice/UndefSysMacros.h $(ice_cpp_dir)/include/Ice/ConnectionF.h $(ice_cpp_dir)/include/Ice/Identity.h $(ice_cpp_dir)/include/Ice/Object.h $(ice_cpp_dir)/include/IceUtil/Mutex.h $(ice_cpp_dir)/include/IceUtil/Lock.h $(ice_cpp_dir)/include/IceUtil/ThreadException.h $(ice_cpp_dir)/include/IceUtil/Time.h $(ice_cpp_dir)/include/IceUtil/MutexProtocol.h $(ice_cpp_dir)/include/Ice/GCShared.h $(ice_cpp_dir)/include/Ice/GCCountMap.h $(ice_cpp_dir)/include/Ice/IncomingAsyncF.h $(ice_cpp_dir)/include/Ice/StreamF.h Current.h Proxy.h $(ice_cpp_dir)/include/Ice/CommunicatorF.h Types.h Util.h $(ice_cpp_dir)/include/Ice/BuiltinSequences.h $(ice_cpp_dir)/include/Ice/Proxy.h $(ice_cpp_dir)/include/Ice/ProxyFactoryF.h $(ice_cpp_dir)/include/Ice/ConnectionIF.h $(ice_cpp_dir)/include/Ice/RequestHandlerF.h $(ice_cpp_dir)/include/Ice/EndpointIF.h $(ice_cpp_dir)/include/Ice/EndpointF.h $(ice_cpp_dir)/include/Ice/EndpointTypes.h $(ice_cpp_dir)/include/Ice/ReferenceF.h $(ice_cpp_dir)/include/Ice/OutgoingAsync.h $(ice_cpp_dir)/include/IceUtil/Monitor.h $(ice_cpp_dir)/include/IceUtil/Cond.h $(ice_cpp_dir)/include/IceUtil/Timer.h $(ice_cpp_dir)/include/IceUtil/Thread.h $(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h $(ice_cpp_dir)/include/Ice/InstanceF.h $(ice_cpp_dir)/include/Ice/BasicStream.h $(ice_cpp_dir)/include/Ice/ObjectFactoryF.h $(ice_cpp_dir)/include/Ice/Buffer.h $(ice_cpp_dir)/include/Ice/Protocol.h $(ice_cpp_dir)/include/Ice/Stream.h $(ice_cpp_dir)/include/IceUtil/OutputUtil.h $(ice_cpp_dir)/include/Ice/Communicator.h $(ice_cpp_dir)/include/Ice/Outgoing.h $(ice_cpp_dir)/include/Ice/Incoming.h $(ice_cpp_dir)/include/Ice/ServantLocatorF.h $(ice_cpp_dir)/include/Ice/ServantManagerF.h $(ice_cpp_dir)/include/Ice/Direct.h $(ice_cpp_dir)/include/Ice/LoggerF.h $(ice_cpp_dir)/include/Ice/StatsF.h $(ice_cpp_dir)/include/Ice/RouterF.h $(ice_cpp_dir)/include/Ice/LocatorF.h $(ice_cpp_dir)/include/Ice/PluginF.h $(ice_cpp_dir)/include/Ice/ImplicitContextF.h $(ice_cpp_dir)/include/Ice/Properties.h $(ice_cpp_dir)/include/Ice/IncomingAsync.h $(ice_cpp_dir)/include/Ice/Initialize.h $(ice_cpp_dir)/include/Ice/PropertiesF.h $(ice_cpp_dir)/include/Ice/Dispatcher.h $(ice_cpp_dir)/include/Ice/StringConverter.h $(ice_cpp_dir)/include/Ice/Plugin.h $(ice_cpp_dir)/include/IceUtil/Unicode.h $(ice_cpp_dir)/include/Ice/LocalException.h $(ice_cpp_dir)/include/Ice/Logger.h $(ice_cpp_dir)/include/Ice/ObjectAdapter.h $(ice_cpp_dir)/include/Ice/FacetMap.h $(ice_cpp_dir)/include/Ice/Endpoint.h $(ice_cpp_dir)/include/Slice/PythonUtil.h $(ice_cpp_dir)/include/Slice/Parser.h +Operation$(OBJEXT): Operation.cpp Operation.h Config.h $(ice_cpp_dir)/include/Ice/Current.h $(ice_cpp_dir)/include/Ice/LocalObjectF.h $(ice_cpp_dir)/include/IceUtil/Shared.h $(ice_cpp_dir)/include/IceUtil/Config.h $(ice_cpp_dir)/include/Ice/Handle.h $(ice_cpp_dir)/include/IceUtil/Handle.h $(ice_cpp_dir)/include/IceUtil/Exception.h $(ice_cpp_dir)/include/Ice/Config.h $(ice_cpp_dir)/include/Ice/ProxyHandle.h $(ice_cpp_dir)/include/Ice/ProxyF.h $(ice_cpp_dir)/include/Ice/ObjectF.h $(ice_cpp_dir)/include/Ice/Exception.h $(ice_cpp_dir)/include/Ice/LocalObject.h $(ice_cpp_dir)/include/IceUtil/ScopedArray.h $(ice_cpp_dir)/include/Ice/ObjectAdapterF.h $(ice_cpp_dir)/include/Ice/UndefSysMacros.h $(ice_cpp_dir)/include/Ice/ConnectionF.h $(ice_cpp_dir)/include/Ice/Identity.h $(ice_cpp_dir)/include/Ice/Object.h $(ice_cpp_dir)/include/IceUtil/Mutex.h $(ice_cpp_dir)/include/IceUtil/Lock.h $(ice_cpp_dir)/include/IceUtil/ThreadException.h $(ice_cpp_dir)/include/IceUtil/Time.h $(ice_cpp_dir)/include/IceUtil/MutexProtocol.h $(ice_cpp_dir)/include/Ice/GCShared.h $(ice_cpp_dir)/include/Ice/GCCountMap.h $(ice_cpp_dir)/include/Ice/IncomingAsyncF.h $(ice_cpp_dir)/include/Ice/StreamF.h $(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h Current.h Proxy.h $(ice_cpp_dir)/include/Ice/CommunicatorF.h Types.h Util.h $(ice_cpp_dir)/include/Ice/BuiltinSequences.h $(ice_cpp_dir)/include/Ice/Proxy.h $(ice_cpp_dir)/include/Ice/ProxyFactoryF.h $(ice_cpp_dir)/include/Ice/ConnectionIF.h $(ice_cpp_dir)/include/Ice/RequestHandlerF.h $(ice_cpp_dir)/include/Ice/EndpointIF.h $(ice_cpp_dir)/include/Ice/EndpointF.h $(ice_cpp_dir)/include/Ice/EndpointTypes.h $(ice_cpp_dir)/include/Ice/ReferenceF.h $(ice_cpp_dir)/include/Ice/OutgoingAsync.h $(ice_cpp_dir)/include/IceUtil/Monitor.h $(ice_cpp_dir)/include/IceUtil/Cond.h $(ice_cpp_dir)/include/IceUtil/Timer.h $(ice_cpp_dir)/include/IceUtil/Thread.h $(ice_cpp_dir)/include/Ice/InstanceF.h $(ice_cpp_dir)/include/Ice/BasicStream.h $(ice_cpp_dir)/include/Ice/ObjectFactoryF.h $(ice_cpp_dir)/include/Ice/Buffer.h $(ice_cpp_dir)/include/Ice/Protocol.h $(ice_cpp_dir)/include/Ice/Stream.h $(ice_cpp_dir)/include/IceUtil/OutputUtil.h $(ice_cpp_dir)/include/Ice/Communicator.h $(ice_cpp_dir)/include/Ice/Outgoing.h $(ice_cpp_dir)/include/Ice/Incoming.h $(ice_cpp_dir)/include/Ice/ServantLocatorF.h $(ice_cpp_dir)/include/Ice/ServantManagerF.h $(ice_cpp_dir)/include/Ice/Direct.h $(ice_cpp_dir)/include/Ice/LoggerF.h $(ice_cpp_dir)/include/Ice/StatsF.h $(ice_cpp_dir)/include/Ice/RouterF.h $(ice_cpp_dir)/include/Ice/LocatorF.h $(ice_cpp_dir)/include/Ice/PluginF.h $(ice_cpp_dir)/include/Ice/ImplicitContextF.h $(ice_cpp_dir)/include/Ice/Properties.h $(ice_cpp_dir)/include/Ice/IncomingAsync.h $(ice_cpp_dir)/include/Ice/Initialize.h $(ice_cpp_dir)/include/Ice/PropertiesF.h $(ice_cpp_dir)/include/Ice/Dispatcher.h $(ice_cpp_dir)/include/Ice/StringConverter.h $(ice_cpp_dir)/include/Ice/Plugin.h $(ice_cpp_dir)/include/IceUtil/Unicode.h $(ice_cpp_dir)/include/Ice/LocalException.h $(ice_cpp_dir)/include/Ice/Logger.h $(ice_cpp_dir)/include/Ice/ObjectAdapter.h $(ice_cpp_dir)/include/Ice/FacetMap.h $(ice_cpp_dir)/include/Ice/Endpoint.h $(ice_cpp_dir)/include/Slice/PythonUtil.h $(ice_cpp_dir)/include/Slice/Parser.h Properties$(OBJEXT): Properties.cpp Properties.h Config.h $(ice_cpp_dir)/include/Ice/PropertiesF.h $(ice_cpp_dir)/include/Ice/LocalObjectF.h $(ice_cpp_dir)/include/IceUtil/Shared.h $(ice_cpp_dir)/include/IceUtil/Config.h $(ice_cpp_dir)/include/Ice/Handle.h $(ice_cpp_dir)/include/IceUtil/Handle.h $(ice_cpp_dir)/include/IceUtil/Exception.h $(ice_cpp_dir)/include/Ice/Config.h $(ice_cpp_dir)/include/Ice/ProxyHandle.h $(ice_cpp_dir)/include/Ice/ProxyF.h $(ice_cpp_dir)/include/Ice/ObjectF.h $(ice_cpp_dir)/include/Ice/Exception.h $(ice_cpp_dir)/include/Ice/LocalObject.h $(ice_cpp_dir)/include/Ice/Proxy.h $(ice_cpp_dir)/include/IceUtil/Mutex.h $(ice_cpp_dir)/include/IceUtil/Lock.h $(ice_cpp_dir)/include/IceUtil/ThreadException.h $(ice_cpp_dir)/include/IceUtil/Time.h $(ice_cpp_dir)/include/IceUtil/MutexProtocol.h $(ice_cpp_dir)/include/Ice/ProxyFactoryF.h $(ice_cpp_dir)/include/Ice/ConnectionIF.h $(ice_cpp_dir)/include/Ice/RequestHandlerF.h $(ice_cpp_dir)/include/Ice/EndpointIF.h $(ice_cpp_dir)/include/Ice/EndpointF.h $(ice_cpp_dir)/include/IceUtil/ScopedArray.h $(ice_cpp_dir)/include/Ice/UndefSysMacros.h $(ice_cpp_dir)/include/Ice/EndpointTypes.h $(ice_cpp_dir)/include/Ice/ObjectAdapterF.h $(ice_cpp_dir)/include/Ice/ReferenceF.h $(ice_cpp_dir)/include/Ice/OutgoingAsync.h $(ice_cpp_dir)/include/IceUtil/Monitor.h $(ice_cpp_dir)/include/IceUtil/Cond.h $(ice_cpp_dir)/include/IceUtil/Timer.h $(ice_cpp_dir)/include/IceUtil/Thread.h $(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h $(ice_cpp_dir)/include/Ice/InstanceF.h $(ice_cpp_dir)/include/Ice/CommunicatorF.h $(ice_cpp_dir)/include/Ice/Current.h $(ice_cpp_dir)/include/Ice/ConnectionF.h $(ice_cpp_dir)/include/Ice/Identity.h $(ice_cpp_dir)/include/Ice/BasicStream.h $(ice_cpp_dir)/include/Ice/ObjectFactoryF.h $(ice_cpp_dir)/include/Ice/Buffer.h $(ice_cpp_dir)/include/Ice/Protocol.h $(ice_cpp_dir)/include/Ice/StreamF.h $(ice_cpp_dir)/include/Ice/Object.h $(ice_cpp_dir)/include/Ice/GCShared.h $(ice_cpp_dir)/include/Ice/GCCountMap.h $(ice_cpp_dir)/include/Ice/IncomingAsyncF.h Util.h $(ice_cpp_dir)/include/Ice/BuiltinSequences.h $(ice_cpp_dir)/include/Ice/Stream.h $(ice_cpp_dir)/include/Ice/Initialize.h $(ice_cpp_dir)/include/Ice/LoggerF.h $(ice_cpp_dir)/include/Ice/StatsF.h $(ice_cpp_dir)/include/Ice/Dispatcher.h $(ice_cpp_dir)/include/Ice/StringConverter.h $(ice_cpp_dir)/include/Ice/Plugin.h $(ice_cpp_dir)/include/IceUtil/Unicode.h $(ice_cpp_dir)/include/Ice/Properties.h $(ice_cpp_dir)/include/Ice/Outgoing.h $(ice_cpp_dir)/include/Ice/Incoming.h $(ice_cpp_dir)/include/Ice/ServantLocatorF.h $(ice_cpp_dir)/include/Ice/ServantManagerF.h $(ice_cpp_dir)/include/Ice/Direct.h Proxy$(OBJEXT): Proxy.cpp $(ice_cpp_dir)/include/IceUtil/DisableWarnings.h Proxy.h Config.h $(ice_cpp_dir)/include/Ice/ProxyF.h $(ice_cpp_dir)/include/IceUtil/Shared.h $(ice_cpp_dir)/include/IceUtil/Config.h $(ice_cpp_dir)/include/Ice/Config.h $(ice_cpp_dir)/include/Ice/ProxyHandle.h $(ice_cpp_dir)/include/IceUtil/Handle.h $(ice_cpp_dir)/include/IceUtil/Exception.h $(ice_cpp_dir)/include/Ice/Handle.h $(ice_cpp_dir)/include/Ice/CommunicatorF.h $(ice_cpp_dir)/include/Ice/LocalObjectF.h $(ice_cpp_dir)/include/Ice/ObjectF.h $(ice_cpp_dir)/include/Ice/Exception.h $(ice_cpp_dir)/include/Ice/LocalObject.h $(ice_cpp_dir)/include/IceUtil/ScopedArray.h $(ice_cpp_dir)/include/Ice/UndefSysMacros.h Communicator.h Connection.h $(ice_cpp_dir)/include/Ice/ConnectionF.h Util.h $(ice_cpp_dir)/include/Ice/BuiltinSequences.h $(ice_cpp_dir)/include/Ice/Proxy.h $(ice_cpp_dir)/include/IceUtil/Mutex.h $(ice_cpp_dir)/include/IceUtil/Lock.h $(ice_cpp_dir)/include/IceUtil/ThreadException.h $(ice_cpp_dir)/include/IceUtil/Time.h $(ice_cpp_dir)/include/IceUtil/MutexProtocol.h $(ice_cpp_dir)/include/Ice/ProxyFactoryF.h $(ice_cpp_dir)/include/Ice/ConnectionIF.h $(ice_cpp_dir)/include/Ice/RequestHandlerF.h $(ice_cpp_dir)/include/Ice/EndpointIF.h $(ice_cpp_dir)/include/Ice/EndpointF.h $(ice_cpp_dir)/include/Ice/EndpointTypes.h $(ice_cpp_dir)/include/Ice/ObjectAdapterF.h $(ice_cpp_dir)/include/Ice/ReferenceF.h $(ice_cpp_dir)/include/Ice/OutgoingAsync.h $(ice_cpp_dir)/include/IceUtil/Monitor.h $(ice_cpp_dir)/include/IceUtil/Cond.h $(ice_cpp_dir)/include/IceUtil/Timer.h $(ice_cpp_dir)/include/IceUtil/Thread.h $(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h $(ice_cpp_dir)/include/Ice/InstanceF.h $(ice_cpp_dir)/include/Ice/Current.h $(ice_cpp_dir)/include/Ice/Identity.h $(ice_cpp_dir)/include/Ice/BasicStream.h $(ice_cpp_dir)/include/Ice/ObjectFactoryF.h $(ice_cpp_dir)/include/Ice/Buffer.h $(ice_cpp_dir)/include/Ice/Protocol.h $(ice_cpp_dir)/include/Ice/StreamF.h $(ice_cpp_dir)/include/Ice/Stream.h $(ice_cpp_dir)/include/Ice/Object.h $(ice_cpp_dir)/include/Ice/GCShared.h $(ice_cpp_dir)/include/Ice/GCCountMap.h $(ice_cpp_dir)/include/Ice/IncomingAsyncF.h Operation.h Endpoint.h $(ice_cpp_dir)/include/Ice/Endpoint.h $(ice_cpp_dir)/include/Ice/Communicator.h $(ice_cpp_dir)/include/Ice/Outgoing.h $(ice_cpp_dir)/include/Ice/Incoming.h $(ice_cpp_dir)/include/Ice/ServantLocatorF.h $(ice_cpp_dir)/include/Ice/ServantManagerF.h $(ice_cpp_dir)/include/Ice/Direct.h $(ice_cpp_dir)/include/Ice/LoggerF.h $(ice_cpp_dir)/include/Ice/StatsF.h $(ice_cpp_dir)/include/Ice/RouterF.h $(ice_cpp_dir)/include/Ice/LocatorF.h $(ice_cpp_dir)/include/Ice/PluginF.h $(ice_cpp_dir)/include/Ice/ImplicitContextF.h $(ice_cpp_dir)/include/Ice/Properties.h $(ice_cpp_dir)/include/Ice/LocalException.h $(ice_cpp_dir)/include/Ice/Locator.h $(ice_cpp_dir)/include/Ice/IncomingAsync.h $(ice_cpp_dir)/include/Ice/FactoryTableInit.h $(ice_cpp_dir)/include/Ice/FactoryTable.h $(ice_cpp_dir)/include/Ice/UserExceptionFactory.h $(ice_cpp_dir)/include/Ice/ProcessF.h $(ice_cpp_dir)/include/Ice/Router.h Slice$(OBJEXT): Slice.cpp Slice.h Config.h Util.h $(ice_cpp_dir)/include/Ice/BuiltinSequences.h $(ice_cpp_dir)/include/Ice/LocalObjectF.h $(ice_cpp_dir)/include/IceUtil/Shared.h $(ice_cpp_dir)/include/IceUtil/Config.h $(ice_cpp_dir)/include/Ice/Handle.h $(ice_cpp_dir)/include/IceUtil/Handle.h $(ice_cpp_dir)/include/IceUtil/Exception.h $(ice_cpp_dir)/include/Ice/Config.h $(ice_cpp_dir)/include/Ice/ProxyHandle.h $(ice_cpp_dir)/include/Ice/ProxyF.h $(ice_cpp_dir)/include/Ice/ObjectF.h $(ice_cpp_dir)/include/Ice/Exception.h $(ice_cpp_dir)/include/Ice/LocalObject.h $(ice_cpp_dir)/include/Ice/Proxy.h $(ice_cpp_dir)/include/IceUtil/Mutex.h $(ice_cpp_dir)/include/IceUtil/Lock.h $(ice_cpp_dir)/include/IceUtil/ThreadException.h $(ice_cpp_dir)/include/IceUtil/Time.h $(ice_cpp_dir)/include/IceUtil/MutexProtocol.h $(ice_cpp_dir)/include/Ice/ProxyFactoryF.h $(ice_cpp_dir)/include/Ice/ConnectionIF.h $(ice_cpp_dir)/include/Ice/RequestHandlerF.h $(ice_cpp_dir)/include/Ice/EndpointIF.h $(ice_cpp_dir)/include/Ice/EndpointF.h $(ice_cpp_dir)/include/IceUtil/ScopedArray.h $(ice_cpp_dir)/include/Ice/UndefSysMacros.h $(ice_cpp_dir)/include/Ice/EndpointTypes.h $(ice_cpp_dir)/include/Ice/ObjectAdapterF.h $(ice_cpp_dir)/include/Ice/ReferenceF.h $(ice_cpp_dir)/include/Ice/OutgoingAsync.h $(ice_cpp_dir)/include/IceUtil/Monitor.h $(ice_cpp_dir)/include/IceUtil/Cond.h $(ice_cpp_dir)/include/IceUtil/Timer.h $(ice_cpp_dir)/include/IceUtil/Thread.h $(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h $(ice_cpp_dir)/include/Ice/InstanceF.h $(ice_cpp_dir)/include/Ice/CommunicatorF.h $(ice_cpp_dir)/include/Ice/Current.h $(ice_cpp_dir)/include/Ice/ConnectionF.h $(ice_cpp_dir)/include/Ice/Identity.h $(ice_cpp_dir)/include/Ice/BasicStream.h $(ice_cpp_dir)/include/Ice/ObjectFactoryF.h $(ice_cpp_dir)/include/Ice/Buffer.h $(ice_cpp_dir)/include/Ice/Protocol.h $(ice_cpp_dir)/include/Ice/StreamF.h $(ice_cpp_dir)/include/Ice/Stream.h $(ice_cpp_dir)/include/Ice/Object.h $(ice_cpp_dir)/include/Ice/GCShared.h $(ice_cpp_dir)/include/Ice/GCCountMap.h $(ice_cpp_dir)/include/Ice/IncomingAsyncF.h $(ice_cpp_dir)/include/Slice/Preprocessor.h $(ice_cpp_dir)/include/Slice/PythonUtil.h $(ice_cpp_dir)/include/Slice/Parser.h $(ice_cpp_dir)/include/IceUtil/OutputUtil.h $(ice_cpp_dir)/include/IceUtil/Options.h $(ice_cpp_dir)/include/IceUtil/RecMutex.h diff --git a/py/modules/IcePy/.depend.mak b/py/modules/IcePy/.depend.mak index 73def7f6c12..7bbdcaaad85 100644 --- a/py/modules/IcePy/.depend.mak +++ b/py/modules/IcePy/.depend.mak @@ -1,5 +1,5 @@ -Communicator$(OBJEXT): Communicator.cpp "$(ice_cpp_dir)/include/IceUtil/DisableWarnings.h" Communicator.h Config.h "$(ice_cpp_dir)/include/Ice/CommunicatorF.h" "$(ice_cpp_dir)/include/Ice/LocalObjectF.h" "$(ice_cpp_dir)/include/IceUtil/Shared.h" "$(ice_cpp_dir)/include/IceUtil/Config.h" "$(ice_cpp_dir)/include/Ice/Handle.h" "$(ice_cpp_dir)/include/IceUtil/Handle.h" "$(ice_cpp_dir)/include/IceUtil/Exception.h" "$(ice_cpp_dir)/include/Ice/Config.h" "$(ice_cpp_dir)/include/Ice/ProxyHandle.h" "$(ice_cpp_dir)/include/Ice/ProxyF.h" "$(ice_cpp_dir)/include/Ice/ObjectF.h" "$(ice_cpp_dir)/include/Ice/Exception.h" "$(ice_cpp_dir)/include/Ice/LocalObject.h" "$(ice_cpp_dir)/include/IceUtil/ScopedArray.h" "$(ice_cpp_dir)/include/Ice/UndefSysMacros.h" ImplicitContext.h "$(ice_cpp_dir)/include/Ice/ImplicitContext.h" "$(ice_cpp_dir)/include/Ice/Proxy.h" "$(ice_cpp_dir)/include/IceUtil/Mutex.h" "$(ice_cpp_dir)/include/IceUtil/Lock.h" "$(ice_cpp_dir)/include/IceUtil/ThreadException.h" "$(ice_cpp_dir)/include/IceUtil/Time.h" "$(ice_cpp_dir)/include/IceUtil/MutexProtocol.h" "$(ice_cpp_dir)/include/Ice/ProxyFactoryF.h" "$(ice_cpp_dir)/include/Ice/ConnectionIF.h" "$(ice_cpp_dir)/include/Ice/RequestHandlerF.h" "$(ice_cpp_dir)/include/Ice/EndpointIF.h" "$(ice_cpp_dir)/include/Ice/EndpointF.h" "$(ice_cpp_dir)/include/Ice/EndpointTypes.h" "$(ice_cpp_dir)/include/Ice/ObjectAdapterF.h" "$(ice_cpp_dir)/include/Ice/ReferenceF.h" "$(ice_cpp_dir)/include/Ice/OutgoingAsync.h" "$(ice_cpp_dir)/include/IceUtil/Monitor.h" "$(ice_cpp_dir)/include/IceUtil/Cond.h" "$(ice_cpp_dir)/include/IceUtil/Timer.h" "$(ice_cpp_dir)/include/IceUtil/Thread.h" "$(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h" "$(ice_cpp_dir)/include/Ice/InstanceF.h" "$(ice_cpp_dir)/include/Ice/Current.h" "$(ice_cpp_dir)/include/Ice/ConnectionF.h" "$(ice_cpp_dir)/include/Ice/Identity.h" "$(ice_cpp_dir)/include/Ice/BasicStream.h" "$(ice_cpp_dir)/include/Ice/ObjectFactoryF.h" "$(ice_cpp_dir)/include/Ice/Buffer.h" "$(ice_cpp_dir)/include/Ice/Protocol.h" "$(ice_cpp_dir)/include/Ice/StreamF.h" "$(ice_cpp_dir)/include/Ice/LocalException.h" "$(ice_cpp_dir)/include/Ice/BuiltinSequences.h" "$(ice_cpp_dir)/include/Ice/Stream.h" "$(ice_cpp_dir)/include/Ice/Object.h" "$(ice_cpp_dir)/include/Ice/GCShared.h" "$(ice_cpp_dir)/include/Ice/GCCountMap.h" "$(ice_cpp_dir)/include/Ice/IncomingAsyncF.h" Logger.h Util.h "$(ice_cpp_dir)/include/Ice/Logger.h" ObjectAdapter.h ObjectFactory.h "$(ice_cpp_dir)/include/Ice/ObjectFactory.h" Operation.h Properties.h "$(ice_cpp_dir)/include/Ice/PropertiesF.h" Proxy.h ThreadNotification.h "$(ice_cpp_dir)/include/Ice/Initialize.h" "$(ice_cpp_dir)/include/Ice/LoggerF.h" "$(ice_cpp_dir)/include/Ice/StatsF.h" "$(ice_cpp_dir)/include/Ice/Dispatcher.h" "$(ice_cpp_dir)/include/Ice/StringConverter.h" "$(ice_cpp_dir)/include/Ice/Plugin.h" "$(ice_cpp_dir)/include/IceUtil/Unicode.h" "$(ice_cpp_dir)/include/Ice/Communicator.h" "$(ice_cpp_dir)/include/Ice/Outgoing.h" "$(ice_cpp_dir)/include/Ice/Incoming.h" "$(ice_cpp_dir)/include/Ice/ServantLocatorF.h" "$(ice_cpp_dir)/include/Ice/ServantManagerF.h" "$(ice_cpp_dir)/include/Ice/Direct.h" "$(ice_cpp_dir)/include/Ice/RouterF.h" "$(ice_cpp_dir)/include/Ice/LocatorF.h" "$(ice_cpp_dir)/include/Ice/PluginF.h" "$(ice_cpp_dir)/include/Ice/ImplicitContextF.h" "$(ice_cpp_dir)/include/Ice/Properties.h" "$(ice_cpp_dir)/include/Ice/Locator.h" "$(ice_cpp_dir)/include/Ice/IncomingAsync.h" "$(ice_cpp_dir)/include/Ice/FactoryTableInit.h" "$(ice_cpp_dir)/include/Ice/FactoryTable.h" "$(ice_cpp_dir)/include/Ice/UserExceptionFactory.h" "$(ice_cpp_dir)/include/Ice/ProcessF.h" "$(ice_cpp_dir)/include/Ice/ObjectAdapter.h" "$(ice_cpp_dir)/include/Ice/FacetMap.h" "$(ice_cpp_dir)/include/Ice/Endpoint.h" "$(ice_cpp_dir)/include/Ice/Router.h" -Connection$(OBJEXT): Connection.cpp Connection.h Config.h "$(ice_cpp_dir)/include/Ice/ConnectionF.h" "$(ice_cpp_dir)/include/Ice/LocalObjectF.h" "$(ice_cpp_dir)/include/IceUtil/Shared.h" "$(ice_cpp_dir)/include/IceUtil/Config.h" "$(ice_cpp_dir)/include/Ice/Handle.h" "$(ice_cpp_dir)/include/IceUtil/Handle.h" "$(ice_cpp_dir)/include/IceUtil/Exception.h" "$(ice_cpp_dir)/include/Ice/Config.h" "$(ice_cpp_dir)/include/Ice/ProxyHandle.h" "$(ice_cpp_dir)/include/Ice/ProxyF.h" "$(ice_cpp_dir)/include/Ice/ObjectF.h" "$(ice_cpp_dir)/include/Ice/Exception.h" "$(ice_cpp_dir)/include/Ice/LocalObject.h" "$(ice_cpp_dir)/include/IceUtil/ScopedArray.h" "$(ice_cpp_dir)/include/Ice/UndefSysMacros.h" "$(ice_cpp_dir)/include/Ice/CommunicatorF.h" ConnectionInfo.h "$(ice_cpp_dir)/include/Ice/Connection.h" "$(ice_cpp_dir)/include/Ice/Proxy.h" "$(ice_cpp_dir)/include/IceUtil/Mutex.h" "$(ice_cpp_dir)/include/IceUtil/Lock.h" "$(ice_cpp_dir)/include/IceUtil/ThreadException.h" "$(ice_cpp_dir)/include/IceUtil/Time.h" "$(ice_cpp_dir)/include/IceUtil/MutexProtocol.h" "$(ice_cpp_dir)/include/Ice/ProxyFactoryF.h" "$(ice_cpp_dir)/include/Ice/ConnectionIF.h" "$(ice_cpp_dir)/include/Ice/RequestHandlerF.h" "$(ice_cpp_dir)/include/Ice/EndpointIF.h" "$(ice_cpp_dir)/include/Ice/EndpointF.h" "$(ice_cpp_dir)/include/Ice/EndpointTypes.h" "$(ice_cpp_dir)/include/Ice/ObjectAdapterF.h" "$(ice_cpp_dir)/include/Ice/ReferenceF.h" "$(ice_cpp_dir)/include/Ice/OutgoingAsync.h" "$(ice_cpp_dir)/include/IceUtil/Monitor.h" "$(ice_cpp_dir)/include/IceUtil/Cond.h" "$(ice_cpp_dir)/include/IceUtil/Timer.h" "$(ice_cpp_dir)/include/IceUtil/Thread.h" "$(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h" "$(ice_cpp_dir)/include/Ice/InstanceF.h" "$(ice_cpp_dir)/include/Ice/Current.h" "$(ice_cpp_dir)/include/Ice/Identity.h" "$(ice_cpp_dir)/include/Ice/BasicStream.h" "$(ice_cpp_dir)/include/Ice/ObjectFactoryF.h" "$(ice_cpp_dir)/include/Ice/Buffer.h" "$(ice_cpp_dir)/include/Ice/Protocol.h" "$(ice_cpp_dir)/include/Ice/StreamF.h" "$(ice_cpp_dir)/include/Ice/Endpoint.h" "$(ice_cpp_dir)/include/Ice/BuiltinSequences.h" "$(ice_cpp_dir)/include/Ice/Stream.h" "$(ice_cpp_dir)/include/Ice/Object.h" "$(ice_cpp_dir)/include/Ice/GCShared.h" "$(ice_cpp_dir)/include/Ice/GCCountMap.h" "$(ice_cpp_dir)/include/Ice/IncomingAsyncF.h" Endpoint.h ObjectAdapter.h Proxy.h Util.h +Communicator$(OBJEXT): Communicator.cpp "$(ice_cpp_dir)/include/IceUtil/DisableWarnings.h" Communicator.h Config.h "$(ice_cpp_dir)/include/Ice/CommunicatorF.h" "$(ice_cpp_dir)/include/Ice/LocalObjectF.h" "$(ice_cpp_dir)/include/IceUtil/Shared.h" "$(ice_cpp_dir)/include/IceUtil/Config.h" "$(ice_cpp_dir)/include/Ice/Handle.h" "$(ice_cpp_dir)/include/IceUtil/Handle.h" "$(ice_cpp_dir)/include/IceUtil/Exception.h" "$(ice_cpp_dir)/include/Ice/Config.h" "$(ice_cpp_dir)/include/Ice/ProxyHandle.h" "$(ice_cpp_dir)/include/Ice/ProxyF.h" "$(ice_cpp_dir)/include/Ice/ObjectF.h" "$(ice_cpp_dir)/include/Ice/Exception.h" "$(ice_cpp_dir)/include/Ice/LocalObject.h" "$(ice_cpp_dir)/include/IceUtil/ScopedArray.h" "$(ice_cpp_dir)/include/Ice/UndefSysMacros.h" ImplicitContext.h "$(ice_cpp_dir)/include/Ice/ImplicitContext.h" "$(ice_cpp_dir)/include/Ice/Proxy.h" "$(ice_cpp_dir)/include/IceUtil/Mutex.h" "$(ice_cpp_dir)/include/IceUtil/Lock.h" "$(ice_cpp_dir)/include/IceUtil/ThreadException.h" "$(ice_cpp_dir)/include/IceUtil/Time.h" "$(ice_cpp_dir)/include/IceUtil/MutexProtocol.h" "$(ice_cpp_dir)/include/Ice/ProxyFactoryF.h" "$(ice_cpp_dir)/include/Ice/ConnectionIF.h" "$(ice_cpp_dir)/include/Ice/RequestHandlerF.h" "$(ice_cpp_dir)/include/Ice/EndpointIF.h" "$(ice_cpp_dir)/include/Ice/EndpointF.h" "$(ice_cpp_dir)/include/Ice/EndpointTypes.h" "$(ice_cpp_dir)/include/Ice/ObjectAdapterF.h" "$(ice_cpp_dir)/include/Ice/ReferenceF.h" "$(ice_cpp_dir)/include/Ice/OutgoingAsync.h" "$(ice_cpp_dir)/include/IceUtil/Monitor.h" "$(ice_cpp_dir)/include/IceUtil/Cond.h" "$(ice_cpp_dir)/include/IceUtil/Timer.h" "$(ice_cpp_dir)/include/IceUtil/Thread.h" "$(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h" "$(ice_cpp_dir)/include/Ice/InstanceF.h" "$(ice_cpp_dir)/include/Ice/Current.h" "$(ice_cpp_dir)/include/Ice/ConnectionF.h" "$(ice_cpp_dir)/include/Ice/Identity.h" "$(ice_cpp_dir)/include/Ice/BasicStream.h" "$(ice_cpp_dir)/include/Ice/ObjectFactoryF.h" "$(ice_cpp_dir)/include/Ice/Buffer.h" "$(ice_cpp_dir)/include/Ice/Protocol.h" "$(ice_cpp_dir)/include/Ice/StreamF.h" "$(ice_cpp_dir)/include/Ice/LocalException.h" "$(ice_cpp_dir)/include/Ice/BuiltinSequences.h" "$(ice_cpp_dir)/include/Ice/Stream.h" "$(ice_cpp_dir)/include/Ice/Object.h" "$(ice_cpp_dir)/include/Ice/GCShared.h" "$(ice_cpp_dir)/include/Ice/GCCountMap.h" "$(ice_cpp_dir)/include/Ice/IncomingAsyncF.h" Logger.h Util.h "$(ice_cpp_dir)/include/Ice/Logger.h" ObjectAdapter.h ObjectFactory.h "$(ice_cpp_dir)/include/Ice/ObjectFactory.h" Operation.h Properties.h "$(ice_cpp_dir)/include/Ice/PropertiesF.h" Proxy.h ThreadNotification.h "$(ice_cpp_dir)/include/Ice/Initialize.h" "$(ice_cpp_dir)/include/Ice/LoggerF.h" "$(ice_cpp_dir)/include/Ice/StatsF.h" "$(ice_cpp_dir)/include/Ice/Dispatcher.h" "$(ice_cpp_dir)/include/Ice/StringConverter.h" "$(ice_cpp_dir)/include/Ice/Plugin.h" "$(ice_cpp_dir)/include/IceUtil/Unicode.h" "$(ice_cpp_dir)/include/Ice/CommunicatorAsync.h" "$(ice_cpp_dir)/include/Ice/Communicator.h" "$(ice_cpp_dir)/include/Ice/Outgoing.h" "$(ice_cpp_dir)/include/Ice/Incoming.h" "$(ice_cpp_dir)/include/Ice/ServantLocatorF.h" "$(ice_cpp_dir)/include/Ice/ServantManagerF.h" "$(ice_cpp_dir)/include/Ice/Direct.h" "$(ice_cpp_dir)/include/Ice/RouterF.h" "$(ice_cpp_dir)/include/Ice/LocatorF.h" "$(ice_cpp_dir)/include/Ice/PluginF.h" "$(ice_cpp_dir)/include/Ice/ImplicitContextF.h" "$(ice_cpp_dir)/include/Ice/Properties.h" "$(ice_cpp_dir)/include/Ice/Locator.h" "$(ice_cpp_dir)/include/Ice/IncomingAsync.h" "$(ice_cpp_dir)/include/Ice/FactoryTableInit.h" "$(ice_cpp_dir)/include/Ice/FactoryTable.h" "$(ice_cpp_dir)/include/Ice/UserExceptionFactory.h" "$(ice_cpp_dir)/include/Ice/ProcessF.h" "$(ice_cpp_dir)/include/Ice/ObjectAdapter.h" "$(ice_cpp_dir)/include/Ice/FacetMap.h" "$(ice_cpp_dir)/include/Ice/Endpoint.h" "$(ice_cpp_dir)/include/Ice/Router.h" +Connection$(OBJEXT): Connection.cpp Connection.h Config.h "$(ice_cpp_dir)/include/Ice/ConnectionF.h" "$(ice_cpp_dir)/include/Ice/LocalObjectF.h" "$(ice_cpp_dir)/include/IceUtil/Shared.h" "$(ice_cpp_dir)/include/IceUtil/Config.h" "$(ice_cpp_dir)/include/Ice/Handle.h" "$(ice_cpp_dir)/include/IceUtil/Handle.h" "$(ice_cpp_dir)/include/IceUtil/Exception.h" "$(ice_cpp_dir)/include/Ice/Config.h" "$(ice_cpp_dir)/include/Ice/ProxyHandle.h" "$(ice_cpp_dir)/include/Ice/ProxyF.h" "$(ice_cpp_dir)/include/Ice/ObjectF.h" "$(ice_cpp_dir)/include/Ice/Exception.h" "$(ice_cpp_dir)/include/Ice/LocalObject.h" "$(ice_cpp_dir)/include/IceUtil/ScopedArray.h" "$(ice_cpp_dir)/include/Ice/UndefSysMacros.h" "$(ice_cpp_dir)/include/Ice/CommunicatorF.h" ConnectionInfo.h "$(ice_cpp_dir)/include/Ice/Connection.h" "$(ice_cpp_dir)/include/Ice/Proxy.h" "$(ice_cpp_dir)/include/IceUtil/Mutex.h" "$(ice_cpp_dir)/include/IceUtil/Lock.h" "$(ice_cpp_dir)/include/IceUtil/ThreadException.h" "$(ice_cpp_dir)/include/IceUtil/Time.h" "$(ice_cpp_dir)/include/IceUtil/MutexProtocol.h" "$(ice_cpp_dir)/include/Ice/ProxyFactoryF.h" "$(ice_cpp_dir)/include/Ice/ConnectionIF.h" "$(ice_cpp_dir)/include/Ice/RequestHandlerF.h" "$(ice_cpp_dir)/include/Ice/EndpointIF.h" "$(ice_cpp_dir)/include/Ice/EndpointF.h" "$(ice_cpp_dir)/include/Ice/EndpointTypes.h" "$(ice_cpp_dir)/include/Ice/ObjectAdapterF.h" "$(ice_cpp_dir)/include/Ice/ReferenceF.h" "$(ice_cpp_dir)/include/Ice/OutgoingAsync.h" "$(ice_cpp_dir)/include/IceUtil/Monitor.h" "$(ice_cpp_dir)/include/IceUtil/Cond.h" "$(ice_cpp_dir)/include/IceUtil/Timer.h" "$(ice_cpp_dir)/include/IceUtil/Thread.h" "$(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h" "$(ice_cpp_dir)/include/Ice/InstanceF.h" "$(ice_cpp_dir)/include/Ice/Current.h" "$(ice_cpp_dir)/include/Ice/Identity.h" "$(ice_cpp_dir)/include/Ice/BasicStream.h" "$(ice_cpp_dir)/include/Ice/ObjectFactoryF.h" "$(ice_cpp_dir)/include/Ice/Buffer.h" "$(ice_cpp_dir)/include/Ice/Protocol.h" "$(ice_cpp_dir)/include/Ice/StreamF.h" "$(ice_cpp_dir)/include/Ice/Endpoint.h" "$(ice_cpp_dir)/include/Ice/BuiltinSequences.h" "$(ice_cpp_dir)/include/Ice/Stream.h" "$(ice_cpp_dir)/include/Ice/Object.h" "$(ice_cpp_dir)/include/Ice/GCShared.h" "$(ice_cpp_dir)/include/Ice/GCCountMap.h" "$(ice_cpp_dir)/include/Ice/IncomingAsyncF.h" Endpoint.h ObjectAdapter.h Operation.h Proxy.h Util.h "$(ice_cpp_dir)/include/Ice/ConnectionAsync.h" ConnectionInfo$(OBJEXT): ConnectionInfo.cpp ConnectionInfo.h Config.h "$(ice_cpp_dir)/include/Ice/Connection.h" "$(ice_cpp_dir)/include/Ice/LocalObjectF.h" "$(ice_cpp_dir)/include/IceUtil/Shared.h" "$(ice_cpp_dir)/include/IceUtil/Config.h" "$(ice_cpp_dir)/include/Ice/Handle.h" "$(ice_cpp_dir)/include/IceUtil/Handle.h" "$(ice_cpp_dir)/include/IceUtil/Exception.h" "$(ice_cpp_dir)/include/Ice/Config.h" "$(ice_cpp_dir)/include/Ice/ProxyHandle.h" "$(ice_cpp_dir)/include/Ice/ProxyF.h" "$(ice_cpp_dir)/include/Ice/ObjectF.h" "$(ice_cpp_dir)/include/Ice/Exception.h" "$(ice_cpp_dir)/include/Ice/LocalObject.h" "$(ice_cpp_dir)/include/Ice/Proxy.h" "$(ice_cpp_dir)/include/IceUtil/Mutex.h" "$(ice_cpp_dir)/include/IceUtil/Lock.h" "$(ice_cpp_dir)/include/IceUtil/ThreadException.h" "$(ice_cpp_dir)/include/IceUtil/Time.h" "$(ice_cpp_dir)/include/IceUtil/MutexProtocol.h" "$(ice_cpp_dir)/include/Ice/ProxyFactoryF.h" "$(ice_cpp_dir)/include/Ice/ConnectionIF.h" "$(ice_cpp_dir)/include/Ice/RequestHandlerF.h" "$(ice_cpp_dir)/include/Ice/EndpointIF.h" "$(ice_cpp_dir)/include/Ice/EndpointF.h" "$(ice_cpp_dir)/include/IceUtil/ScopedArray.h" "$(ice_cpp_dir)/include/Ice/UndefSysMacros.h" "$(ice_cpp_dir)/include/Ice/EndpointTypes.h" "$(ice_cpp_dir)/include/Ice/ObjectAdapterF.h" "$(ice_cpp_dir)/include/Ice/ReferenceF.h" "$(ice_cpp_dir)/include/Ice/OutgoingAsync.h" "$(ice_cpp_dir)/include/IceUtil/Monitor.h" "$(ice_cpp_dir)/include/IceUtil/Cond.h" "$(ice_cpp_dir)/include/IceUtil/Timer.h" "$(ice_cpp_dir)/include/IceUtil/Thread.h" "$(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h" "$(ice_cpp_dir)/include/Ice/InstanceF.h" "$(ice_cpp_dir)/include/Ice/CommunicatorF.h" "$(ice_cpp_dir)/include/Ice/Current.h" "$(ice_cpp_dir)/include/Ice/ConnectionF.h" "$(ice_cpp_dir)/include/Ice/Identity.h" "$(ice_cpp_dir)/include/Ice/BasicStream.h" "$(ice_cpp_dir)/include/Ice/ObjectFactoryF.h" "$(ice_cpp_dir)/include/Ice/Buffer.h" "$(ice_cpp_dir)/include/Ice/Protocol.h" "$(ice_cpp_dir)/include/Ice/StreamF.h" "$(ice_cpp_dir)/include/Ice/Endpoint.h" "$(ice_cpp_dir)/include/Ice/BuiltinSequences.h" "$(ice_cpp_dir)/include/Ice/Stream.h" "$(ice_cpp_dir)/include/Ice/Object.h" "$(ice_cpp_dir)/include/Ice/GCShared.h" "$(ice_cpp_dir)/include/Ice/GCCountMap.h" "$(ice_cpp_dir)/include/Ice/IncomingAsyncF.h" EndpointInfo.h Util.h Current$(OBJEXT): Current.cpp Current.h Config.h "$(ice_cpp_dir)/include/Ice/Current.h" "$(ice_cpp_dir)/include/Ice/LocalObjectF.h" "$(ice_cpp_dir)/include/IceUtil/Shared.h" "$(ice_cpp_dir)/include/IceUtil/Config.h" "$(ice_cpp_dir)/include/Ice/Handle.h" "$(ice_cpp_dir)/include/IceUtil/Handle.h" "$(ice_cpp_dir)/include/IceUtil/Exception.h" "$(ice_cpp_dir)/include/Ice/Config.h" "$(ice_cpp_dir)/include/Ice/ProxyHandle.h" "$(ice_cpp_dir)/include/Ice/ProxyF.h" "$(ice_cpp_dir)/include/Ice/ObjectF.h" "$(ice_cpp_dir)/include/Ice/Exception.h" "$(ice_cpp_dir)/include/Ice/LocalObject.h" "$(ice_cpp_dir)/include/IceUtil/ScopedArray.h" "$(ice_cpp_dir)/include/Ice/ObjectAdapterF.h" "$(ice_cpp_dir)/include/Ice/UndefSysMacros.h" "$(ice_cpp_dir)/include/Ice/ConnectionF.h" "$(ice_cpp_dir)/include/Ice/Identity.h" Connection.h "$(ice_cpp_dir)/include/Ice/CommunicatorF.h" ObjectAdapter.h Util.h "$(ice_cpp_dir)/include/Ice/BuiltinSequences.h" "$(ice_cpp_dir)/include/Ice/Proxy.h" "$(ice_cpp_dir)/include/IceUtil/Mutex.h" "$(ice_cpp_dir)/include/IceUtil/Lock.h" "$(ice_cpp_dir)/include/IceUtil/ThreadException.h" "$(ice_cpp_dir)/include/IceUtil/Time.h" "$(ice_cpp_dir)/include/IceUtil/MutexProtocol.h" "$(ice_cpp_dir)/include/Ice/ProxyFactoryF.h" "$(ice_cpp_dir)/include/Ice/ConnectionIF.h" "$(ice_cpp_dir)/include/Ice/RequestHandlerF.h" "$(ice_cpp_dir)/include/Ice/EndpointIF.h" "$(ice_cpp_dir)/include/Ice/EndpointF.h" "$(ice_cpp_dir)/include/Ice/EndpointTypes.h" "$(ice_cpp_dir)/include/Ice/ReferenceF.h" "$(ice_cpp_dir)/include/Ice/OutgoingAsync.h" "$(ice_cpp_dir)/include/IceUtil/Monitor.h" "$(ice_cpp_dir)/include/IceUtil/Cond.h" "$(ice_cpp_dir)/include/IceUtil/Timer.h" "$(ice_cpp_dir)/include/IceUtil/Thread.h" "$(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h" "$(ice_cpp_dir)/include/Ice/InstanceF.h" "$(ice_cpp_dir)/include/Ice/BasicStream.h" "$(ice_cpp_dir)/include/Ice/ObjectFactoryF.h" "$(ice_cpp_dir)/include/Ice/Buffer.h" "$(ice_cpp_dir)/include/Ice/Protocol.h" "$(ice_cpp_dir)/include/Ice/StreamF.h" "$(ice_cpp_dir)/include/Ice/Stream.h" "$(ice_cpp_dir)/include/Ice/Object.h" "$(ice_cpp_dir)/include/Ice/GCShared.h" "$(ice_cpp_dir)/include/Ice/GCCountMap.h" "$(ice_cpp_dir)/include/Ice/IncomingAsyncF.h" "$(ice_cpp_dir)/include/Ice/ObjectAdapter.h" "$(ice_cpp_dir)/include/Ice/ServantLocatorF.h" "$(ice_cpp_dir)/include/Ice/LocatorF.h" "$(ice_cpp_dir)/include/Ice/FacetMap.h" "$(ice_cpp_dir)/include/Ice/Endpoint.h" Endpoint$(OBJEXT): Endpoint.cpp Endpoint.h Config.h "$(ice_cpp_dir)/include/Ice/Endpoint.h" "$(ice_cpp_dir)/include/Ice/LocalObjectF.h" "$(ice_cpp_dir)/include/IceUtil/Shared.h" "$(ice_cpp_dir)/include/IceUtil/Config.h" "$(ice_cpp_dir)/include/Ice/Handle.h" "$(ice_cpp_dir)/include/IceUtil/Handle.h" "$(ice_cpp_dir)/include/IceUtil/Exception.h" "$(ice_cpp_dir)/include/Ice/Config.h" "$(ice_cpp_dir)/include/Ice/ProxyHandle.h" "$(ice_cpp_dir)/include/Ice/ProxyF.h" "$(ice_cpp_dir)/include/Ice/ObjectF.h" "$(ice_cpp_dir)/include/Ice/Exception.h" "$(ice_cpp_dir)/include/Ice/LocalObject.h" "$(ice_cpp_dir)/include/Ice/Proxy.h" "$(ice_cpp_dir)/include/IceUtil/Mutex.h" "$(ice_cpp_dir)/include/IceUtil/Lock.h" "$(ice_cpp_dir)/include/IceUtil/ThreadException.h" "$(ice_cpp_dir)/include/IceUtil/Time.h" "$(ice_cpp_dir)/include/IceUtil/MutexProtocol.h" "$(ice_cpp_dir)/include/Ice/ProxyFactoryF.h" "$(ice_cpp_dir)/include/Ice/ConnectionIF.h" "$(ice_cpp_dir)/include/Ice/RequestHandlerF.h" "$(ice_cpp_dir)/include/Ice/EndpointIF.h" "$(ice_cpp_dir)/include/Ice/EndpointF.h" "$(ice_cpp_dir)/include/IceUtil/ScopedArray.h" "$(ice_cpp_dir)/include/Ice/UndefSysMacros.h" "$(ice_cpp_dir)/include/Ice/EndpointTypes.h" "$(ice_cpp_dir)/include/Ice/ObjectAdapterF.h" "$(ice_cpp_dir)/include/Ice/ReferenceF.h" "$(ice_cpp_dir)/include/Ice/OutgoingAsync.h" "$(ice_cpp_dir)/include/IceUtil/Monitor.h" "$(ice_cpp_dir)/include/IceUtil/Cond.h" "$(ice_cpp_dir)/include/IceUtil/Timer.h" "$(ice_cpp_dir)/include/IceUtil/Thread.h" "$(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h" "$(ice_cpp_dir)/include/Ice/InstanceF.h" "$(ice_cpp_dir)/include/Ice/CommunicatorF.h" "$(ice_cpp_dir)/include/Ice/Current.h" "$(ice_cpp_dir)/include/Ice/ConnectionF.h" "$(ice_cpp_dir)/include/Ice/Identity.h" "$(ice_cpp_dir)/include/Ice/BasicStream.h" "$(ice_cpp_dir)/include/Ice/ObjectFactoryF.h" "$(ice_cpp_dir)/include/Ice/Buffer.h" "$(ice_cpp_dir)/include/Ice/Protocol.h" "$(ice_cpp_dir)/include/Ice/StreamF.h" "$(ice_cpp_dir)/include/Ice/BuiltinSequences.h" "$(ice_cpp_dir)/include/Ice/Stream.h" "$(ice_cpp_dir)/include/Ice/Object.h" "$(ice_cpp_dir)/include/Ice/GCShared.h" "$(ice_cpp_dir)/include/Ice/GCCountMap.h" "$(ice_cpp_dir)/include/Ice/IncomingAsyncF.h" EndpointInfo.h Util.h @@ -9,7 +9,7 @@ Init$(OBJEXT): Init.cpp Communicator.h Config.h "$(ice_cpp_dir)/include/Ice/Comm Logger$(OBJEXT): Logger.cpp Logger.h Config.h Util.h "$(ice_cpp_dir)/include/Ice/BuiltinSequences.h" "$(ice_cpp_dir)/include/Ice/LocalObjectF.h" "$(ice_cpp_dir)/include/IceUtil/Shared.h" "$(ice_cpp_dir)/include/IceUtil/Config.h" "$(ice_cpp_dir)/include/Ice/Handle.h" "$(ice_cpp_dir)/include/IceUtil/Handle.h" "$(ice_cpp_dir)/include/IceUtil/Exception.h" "$(ice_cpp_dir)/include/Ice/Config.h" "$(ice_cpp_dir)/include/Ice/ProxyHandle.h" "$(ice_cpp_dir)/include/Ice/ProxyF.h" "$(ice_cpp_dir)/include/Ice/ObjectF.h" "$(ice_cpp_dir)/include/Ice/Exception.h" "$(ice_cpp_dir)/include/Ice/LocalObject.h" "$(ice_cpp_dir)/include/Ice/Proxy.h" "$(ice_cpp_dir)/include/IceUtil/Mutex.h" "$(ice_cpp_dir)/include/IceUtil/Lock.h" "$(ice_cpp_dir)/include/IceUtil/ThreadException.h" "$(ice_cpp_dir)/include/IceUtil/Time.h" "$(ice_cpp_dir)/include/IceUtil/MutexProtocol.h" "$(ice_cpp_dir)/include/Ice/ProxyFactoryF.h" "$(ice_cpp_dir)/include/Ice/ConnectionIF.h" "$(ice_cpp_dir)/include/Ice/RequestHandlerF.h" "$(ice_cpp_dir)/include/Ice/EndpointIF.h" "$(ice_cpp_dir)/include/Ice/EndpointF.h" "$(ice_cpp_dir)/include/IceUtil/ScopedArray.h" "$(ice_cpp_dir)/include/Ice/UndefSysMacros.h" "$(ice_cpp_dir)/include/Ice/EndpointTypes.h" "$(ice_cpp_dir)/include/Ice/ObjectAdapterF.h" "$(ice_cpp_dir)/include/Ice/ReferenceF.h" "$(ice_cpp_dir)/include/Ice/OutgoingAsync.h" "$(ice_cpp_dir)/include/IceUtil/Monitor.h" "$(ice_cpp_dir)/include/IceUtil/Cond.h" "$(ice_cpp_dir)/include/IceUtil/Timer.h" "$(ice_cpp_dir)/include/IceUtil/Thread.h" "$(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h" "$(ice_cpp_dir)/include/Ice/InstanceF.h" "$(ice_cpp_dir)/include/Ice/CommunicatorF.h" "$(ice_cpp_dir)/include/Ice/Current.h" "$(ice_cpp_dir)/include/Ice/ConnectionF.h" "$(ice_cpp_dir)/include/Ice/Identity.h" "$(ice_cpp_dir)/include/Ice/BasicStream.h" "$(ice_cpp_dir)/include/Ice/ObjectFactoryF.h" "$(ice_cpp_dir)/include/Ice/Buffer.h" "$(ice_cpp_dir)/include/Ice/Protocol.h" "$(ice_cpp_dir)/include/Ice/StreamF.h" "$(ice_cpp_dir)/include/Ice/Stream.h" "$(ice_cpp_dir)/include/Ice/Object.h" "$(ice_cpp_dir)/include/Ice/GCShared.h" "$(ice_cpp_dir)/include/Ice/GCCountMap.h" "$(ice_cpp_dir)/include/Ice/IncomingAsyncF.h" "$(ice_cpp_dir)/include/Ice/Logger.h" "$(ice_cpp_dir)/include/Ice/Initialize.h" "$(ice_cpp_dir)/include/Ice/PropertiesF.h" "$(ice_cpp_dir)/include/Ice/LoggerF.h" "$(ice_cpp_dir)/include/Ice/StatsF.h" "$(ice_cpp_dir)/include/Ice/Dispatcher.h" "$(ice_cpp_dir)/include/Ice/StringConverter.h" "$(ice_cpp_dir)/include/Ice/Plugin.h" "$(ice_cpp_dir)/include/IceUtil/Unicode.h" ObjectAdapter$(OBJEXT): ObjectAdapter.cpp ObjectAdapter.h Config.h "$(ice_cpp_dir)/include/Ice/ObjectAdapterF.h" "$(ice_cpp_dir)/include/Ice/LocalObjectF.h" "$(ice_cpp_dir)/include/IceUtil/Shared.h" "$(ice_cpp_dir)/include/IceUtil/Config.h" "$(ice_cpp_dir)/include/Ice/Handle.h" "$(ice_cpp_dir)/include/IceUtil/Handle.h" "$(ice_cpp_dir)/include/IceUtil/Exception.h" "$(ice_cpp_dir)/include/Ice/Config.h" "$(ice_cpp_dir)/include/Ice/ProxyHandle.h" "$(ice_cpp_dir)/include/Ice/ProxyF.h" "$(ice_cpp_dir)/include/Ice/ObjectF.h" "$(ice_cpp_dir)/include/Ice/Exception.h" "$(ice_cpp_dir)/include/Ice/LocalObject.h" "$(ice_cpp_dir)/include/IceUtil/ScopedArray.h" "$(ice_cpp_dir)/include/Ice/UndefSysMacros.h" Communicator.h "$(ice_cpp_dir)/include/Ice/CommunicatorF.h" Current.h "$(ice_cpp_dir)/include/Ice/Current.h" "$(ice_cpp_dir)/include/Ice/ConnectionF.h" "$(ice_cpp_dir)/include/Ice/Identity.h" Endpoint.h "$(ice_cpp_dir)/include/Ice/Endpoint.h" "$(ice_cpp_dir)/include/Ice/Proxy.h" "$(ice_cpp_dir)/include/IceUtil/Mutex.h" "$(ice_cpp_dir)/include/IceUtil/Lock.h" "$(ice_cpp_dir)/include/IceUtil/ThreadException.h" "$(ice_cpp_dir)/include/IceUtil/Time.h" "$(ice_cpp_dir)/include/IceUtil/MutexProtocol.h" "$(ice_cpp_dir)/include/Ice/ProxyFactoryF.h" "$(ice_cpp_dir)/include/Ice/ConnectionIF.h" "$(ice_cpp_dir)/include/Ice/RequestHandlerF.h" "$(ice_cpp_dir)/include/Ice/EndpointIF.h" "$(ice_cpp_dir)/include/Ice/EndpointF.h" "$(ice_cpp_dir)/include/Ice/EndpointTypes.h" "$(ice_cpp_dir)/include/Ice/ReferenceF.h" "$(ice_cpp_dir)/include/Ice/OutgoingAsync.h" "$(ice_cpp_dir)/include/IceUtil/Monitor.h" "$(ice_cpp_dir)/include/IceUtil/Cond.h" "$(ice_cpp_dir)/include/IceUtil/Timer.h" "$(ice_cpp_dir)/include/IceUtil/Thread.h" "$(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h" "$(ice_cpp_dir)/include/Ice/InstanceF.h" "$(ice_cpp_dir)/include/Ice/BasicStream.h" "$(ice_cpp_dir)/include/Ice/ObjectFactoryF.h" "$(ice_cpp_dir)/include/Ice/Buffer.h" "$(ice_cpp_dir)/include/Ice/Protocol.h" "$(ice_cpp_dir)/include/Ice/StreamF.h" "$(ice_cpp_dir)/include/Ice/BuiltinSequences.h" "$(ice_cpp_dir)/include/Ice/Stream.h" "$(ice_cpp_dir)/include/Ice/Object.h" "$(ice_cpp_dir)/include/Ice/GCShared.h" "$(ice_cpp_dir)/include/Ice/GCCountMap.h" "$(ice_cpp_dir)/include/Ice/IncomingAsyncF.h" Operation.h Proxy.h Types.h Util.h "$(ice_cpp_dir)/include/IceUtil/OutputUtil.h" "$(ice_cpp_dir)/include/Ice/Communicator.h" "$(ice_cpp_dir)/include/Ice/Outgoing.h" "$(ice_cpp_dir)/include/Ice/Incoming.h" "$(ice_cpp_dir)/include/Ice/ServantLocatorF.h" "$(ice_cpp_dir)/include/Ice/ServantManagerF.h" "$(ice_cpp_dir)/include/Ice/Direct.h" "$(ice_cpp_dir)/include/Ice/LoggerF.h" "$(ice_cpp_dir)/include/Ice/StatsF.h" "$(ice_cpp_dir)/include/Ice/RouterF.h" "$(ice_cpp_dir)/include/Ice/LocatorF.h" "$(ice_cpp_dir)/include/Ice/PluginF.h" "$(ice_cpp_dir)/include/Ice/ImplicitContextF.h" "$(ice_cpp_dir)/include/Ice/Properties.h" "$(ice_cpp_dir)/include/Ice/LocalException.h" "$(ice_cpp_dir)/include/Ice/Locator.h" "$(ice_cpp_dir)/include/Ice/IncomingAsync.h" "$(ice_cpp_dir)/include/Ice/FactoryTableInit.h" "$(ice_cpp_dir)/include/Ice/FactoryTable.h" "$(ice_cpp_dir)/include/Ice/UserExceptionFactory.h" "$(ice_cpp_dir)/include/Ice/ProcessF.h" "$(ice_cpp_dir)/include/Ice/ObjectAdapter.h" "$(ice_cpp_dir)/include/Ice/FacetMap.h" "$(ice_cpp_dir)/include/Ice/Router.h" "$(ice_cpp_dir)/include/Ice/ServantLocator.h" ObjectFactory$(OBJEXT): ObjectFactory.cpp ObjectFactory.h Config.h "$(ice_cpp_dir)/include/Ice/ObjectF.h" "$(ice_cpp_dir)/include/IceUtil/Shared.h" "$(ice_cpp_dir)/include/IceUtil/Config.h" "$(ice_cpp_dir)/include/Ice/Handle.h" "$(ice_cpp_dir)/include/IceUtil/Handle.h" "$(ice_cpp_dir)/include/IceUtil/Exception.h" "$(ice_cpp_dir)/include/Ice/Config.h" "$(ice_cpp_dir)/include/Ice/ProxyHandle.h" "$(ice_cpp_dir)/include/Ice/ObjectFactory.h" "$(ice_cpp_dir)/include/Ice/LocalObjectF.h" "$(ice_cpp_dir)/include/Ice/ProxyF.h" "$(ice_cpp_dir)/include/Ice/Exception.h" "$(ice_cpp_dir)/include/Ice/LocalObject.h" "$(ice_cpp_dir)/include/IceUtil/ScopedArray.h" "$(ice_cpp_dir)/include/Ice/UndefSysMacros.h" "$(ice_cpp_dir)/include/IceUtil/Mutex.h" "$(ice_cpp_dir)/include/IceUtil/Lock.h" "$(ice_cpp_dir)/include/IceUtil/ThreadException.h" "$(ice_cpp_dir)/include/IceUtil/Time.h" "$(ice_cpp_dir)/include/IceUtil/MutexProtocol.h" Types.h Util.h "$(ice_cpp_dir)/include/Ice/BuiltinSequences.h" "$(ice_cpp_dir)/include/Ice/Proxy.h" "$(ice_cpp_dir)/include/Ice/ProxyFactoryF.h" "$(ice_cpp_dir)/include/Ice/ConnectionIF.h" "$(ice_cpp_dir)/include/Ice/RequestHandlerF.h" "$(ice_cpp_dir)/include/Ice/EndpointIF.h" "$(ice_cpp_dir)/include/Ice/EndpointF.h" "$(ice_cpp_dir)/include/Ice/EndpointTypes.h" "$(ice_cpp_dir)/include/Ice/ObjectAdapterF.h" "$(ice_cpp_dir)/include/Ice/ReferenceF.h" "$(ice_cpp_dir)/include/Ice/OutgoingAsync.h" "$(ice_cpp_dir)/include/IceUtil/Monitor.h" "$(ice_cpp_dir)/include/IceUtil/Cond.h" "$(ice_cpp_dir)/include/IceUtil/Timer.h" "$(ice_cpp_dir)/include/IceUtil/Thread.h" "$(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h" "$(ice_cpp_dir)/include/Ice/InstanceF.h" "$(ice_cpp_dir)/include/Ice/CommunicatorF.h" "$(ice_cpp_dir)/include/Ice/Current.h" "$(ice_cpp_dir)/include/Ice/ConnectionF.h" "$(ice_cpp_dir)/include/Ice/Identity.h" "$(ice_cpp_dir)/include/Ice/BasicStream.h" "$(ice_cpp_dir)/include/Ice/ObjectFactoryF.h" "$(ice_cpp_dir)/include/Ice/Buffer.h" "$(ice_cpp_dir)/include/Ice/Protocol.h" "$(ice_cpp_dir)/include/Ice/StreamF.h" "$(ice_cpp_dir)/include/Ice/Stream.h" "$(ice_cpp_dir)/include/Ice/Object.h" "$(ice_cpp_dir)/include/Ice/GCShared.h" "$(ice_cpp_dir)/include/Ice/GCCountMap.h" "$(ice_cpp_dir)/include/Ice/IncomingAsyncF.h" "$(ice_cpp_dir)/include/IceUtil/OutputUtil.h" "$(ice_cpp_dir)/include/Ice/LocalException.h" -Operation$(OBJEXT): Operation.cpp Operation.h Config.h "$(ice_cpp_dir)/include/Ice/Current.h" "$(ice_cpp_dir)/include/Ice/LocalObjectF.h" "$(ice_cpp_dir)/include/IceUtil/Shared.h" "$(ice_cpp_dir)/include/IceUtil/Config.h" "$(ice_cpp_dir)/include/Ice/Handle.h" "$(ice_cpp_dir)/include/IceUtil/Handle.h" "$(ice_cpp_dir)/include/IceUtil/Exception.h" "$(ice_cpp_dir)/include/Ice/Config.h" "$(ice_cpp_dir)/include/Ice/ProxyHandle.h" "$(ice_cpp_dir)/include/Ice/ProxyF.h" "$(ice_cpp_dir)/include/Ice/ObjectF.h" "$(ice_cpp_dir)/include/Ice/Exception.h" "$(ice_cpp_dir)/include/Ice/LocalObject.h" "$(ice_cpp_dir)/include/IceUtil/ScopedArray.h" "$(ice_cpp_dir)/include/Ice/ObjectAdapterF.h" "$(ice_cpp_dir)/include/Ice/UndefSysMacros.h" "$(ice_cpp_dir)/include/Ice/ConnectionF.h" "$(ice_cpp_dir)/include/Ice/Identity.h" "$(ice_cpp_dir)/include/Ice/Object.h" "$(ice_cpp_dir)/include/IceUtil/Mutex.h" "$(ice_cpp_dir)/include/IceUtil/Lock.h" "$(ice_cpp_dir)/include/IceUtil/ThreadException.h" "$(ice_cpp_dir)/include/IceUtil/Time.h" "$(ice_cpp_dir)/include/IceUtil/MutexProtocol.h" "$(ice_cpp_dir)/include/Ice/GCShared.h" "$(ice_cpp_dir)/include/Ice/GCCountMap.h" "$(ice_cpp_dir)/include/Ice/IncomingAsyncF.h" "$(ice_cpp_dir)/include/Ice/StreamF.h" Current.h Proxy.h "$(ice_cpp_dir)/include/Ice/CommunicatorF.h" Types.h Util.h "$(ice_cpp_dir)/include/Ice/BuiltinSequences.h" "$(ice_cpp_dir)/include/Ice/Proxy.h" "$(ice_cpp_dir)/include/Ice/ProxyFactoryF.h" "$(ice_cpp_dir)/include/Ice/ConnectionIF.h" "$(ice_cpp_dir)/include/Ice/RequestHandlerF.h" "$(ice_cpp_dir)/include/Ice/EndpointIF.h" "$(ice_cpp_dir)/include/Ice/EndpointF.h" "$(ice_cpp_dir)/include/Ice/EndpointTypes.h" "$(ice_cpp_dir)/include/Ice/ReferenceF.h" "$(ice_cpp_dir)/include/Ice/OutgoingAsync.h" "$(ice_cpp_dir)/include/IceUtil/Monitor.h" "$(ice_cpp_dir)/include/IceUtil/Cond.h" "$(ice_cpp_dir)/include/IceUtil/Timer.h" "$(ice_cpp_dir)/include/IceUtil/Thread.h" "$(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h" "$(ice_cpp_dir)/include/Ice/InstanceF.h" "$(ice_cpp_dir)/include/Ice/BasicStream.h" "$(ice_cpp_dir)/include/Ice/ObjectFactoryF.h" "$(ice_cpp_dir)/include/Ice/Buffer.h" "$(ice_cpp_dir)/include/Ice/Protocol.h" "$(ice_cpp_dir)/include/Ice/Stream.h" "$(ice_cpp_dir)/include/IceUtil/OutputUtil.h" "$(ice_cpp_dir)/include/Ice/Communicator.h" "$(ice_cpp_dir)/include/Ice/Outgoing.h" "$(ice_cpp_dir)/include/Ice/Incoming.h" "$(ice_cpp_dir)/include/Ice/ServantLocatorF.h" "$(ice_cpp_dir)/include/Ice/ServantManagerF.h" "$(ice_cpp_dir)/include/Ice/Direct.h" "$(ice_cpp_dir)/include/Ice/LoggerF.h" "$(ice_cpp_dir)/include/Ice/StatsF.h" "$(ice_cpp_dir)/include/Ice/RouterF.h" "$(ice_cpp_dir)/include/Ice/LocatorF.h" "$(ice_cpp_dir)/include/Ice/PluginF.h" "$(ice_cpp_dir)/include/Ice/ImplicitContextF.h" "$(ice_cpp_dir)/include/Ice/Properties.h" "$(ice_cpp_dir)/include/Ice/IncomingAsync.h" "$(ice_cpp_dir)/include/Ice/Initialize.h" "$(ice_cpp_dir)/include/Ice/PropertiesF.h" "$(ice_cpp_dir)/include/Ice/Dispatcher.h" "$(ice_cpp_dir)/include/Ice/StringConverter.h" "$(ice_cpp_dir)/include/Ice/Plugin.h" "$(ice_cpp_dir)/include/IceUtil/Unicode.h" "$(ice_cpp_dir)/include/Ice/LocalException.h" "$(ice_cpp_dir)/include/Ice/Logger.h" "$(ice_cpp_dir)/include/Ice/ObjectAdapter.h" "$(ice_cpp_dir)/include/Ice/FacetMap.h" "$(ice_cpp_dir)/include/Ice/Endpoint.h" "$(ice_cpp_dir)/include/Slice/PythonUtil.h" "$(ice_cpp_dir)/include/Slice/Parser.h" +Operation$(OBJEXT): Operation.cpp Operation.h Config.h "$(ice_cpp_dir)/include/Ice/Current.h" "$(ice_cpp_dir)/include/Ice/LocalObjectF.h" "$(ice_cpp_dir)/include/IceUtil/Shared.h" "$(ice_cpp_dir)/include/IceUtil/Config.h" "$(ice_cpp_dir)/include/Ice/Handle.h" "$(ice_cpp_dir)/include/IceUtil/Handle.h" "$(ice_cpp_dir)/include/IceUtil/Exception.h" "$(ice_cpp_dir)/include/Ice/Config.h" "$(ice_cpp_dir)/include/Ice/ProxyHandle.h" "$(ice_cpp_dir)/include/Ice/ProxyF.h" "$(ice_cpp_dir)/include/Ice/ObjectF.h" "$(ice_cpp_dir)/include/Ice/Exception.h" "$(ice_cpp_dir)/include/Ice/LocalObject.h" "$(ice_cpp_dir)/include/IceUtil/ScopedArray.h" "$(ice_cpp_dir)/include/Ice/ObjectAdapterF.h" "$(ice_cpp_dir)/include/Ice/UndefSysMacros.h" "$(ice_cpp_dir)/include/Ice/ConnectionF.h" "$(ice_cpp_dir)/include/Ice/Identity.h" "$(ice_cpp_dir)/include/Ice/Object.h" "$(ice_cpp_dir)/include/IceUtil/Mutex.h" "$(ice_cpp_dir)/include/IceUtil/Lock.h" "$(ice_cpp_dir)/include/IceUtil/ThreadException.h" "$(ice_cpp_dir)/include/IceUtil/Time.h" "$(ice_cpp_dir)/include/IceUtil/MutexProtocol.h" "$(ice_cpp_dir)/include/Ice/GCShared.h" "$(ice_cpp_dir)/include/Ice/GCCountMap.h" "$(ice_cpp_dir)/include/Ice/IncomingAsyncF.h" "$(ice_cpp_dir)/include/Ice/StreamF.h" "$(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h" Current.h Proxy.h "$(ice_cpp_dir)/include/Ice/CommunicatorF.h" Types.h Util.h "$(ice_cpp_dir)/include/Ice/BuiltinSequences.h" "$(ice_cpp_dir)/include/Ice/Proxy.h" "$(ice_cpp_dir)/include/Ice/ProxyFactoryF.h" "$(ice_cpp_dir)/include/Ice/ConnectionIF.h" "$(ice_cpp_dir)/include/Ice/RequestHandlerF.h" "$(ice_cpp_dir)/include/Ice/EndpointIF.h" "$(ice_cpp_dir)/include/Ice/EndpointF.h" "$(ice_cpp_dir)/include/Ice/EndpointTypes.h" "$(ice_cpp_dir)/include/Ice/ReferenceF.h" "$(ice_cpp_dir)/include/Ice/OutgoingAsync.h" "$(ice_cpp_dir)/include/IceUtil/Monitor.h" "$(ice_cpp_dir)/include/IceUtil/Cond.h" "$(ice_cpp_dir)/include/IceUtil/Timer.h" "$(ice_cpp_dir)/include/IceUtil/Thread.h" "$(ice_cpp_dir)/include/Ice/InstanceF.h" "$(ice_cpp_dir)/include/Ice/BasicStream.h" "$(ice_cpp_dir)/include/Ice/ObjectFactoryF.h" "$(ice_cpp_dir)/include/Ice/Buffer.h" "$(ice_cpp_dir)/include/Ice/Protocol.h" "$(ice_cpp_dir)/include/Ice/Stream.h" "$(ice_cpp_dir)/include/IceUtil/OutputUtil.h" "$(ice_cpp_dir)/include/Ice/Communicator.h" "$(ice_cpp_dir)/include/Ice/Outgoing.h" "$(ice_cpp_dir)/include/Ice/Incoming.h" "$(ice_cpp_dir)/include/Ice/ServantLocatorF.h" "$(ice_cpp_dir)/include/Ice/ServantManagerF.h" "$(ice_cpp_dir)/include/Ice/Direct.h" "$(ice_cpp_dir)/include/Ice/LoggerF.h" "$(ice_cpp_dir)/include/Ice/StatsF.h" "$(ice_cpp_dir)/include/Ice/RouterF.h" "$(ice_cpp_dir)/include/Ice/LocatorF.h" "$(ice_cpp_dir)/include/Ice/PluginF.h" "$(ice_cpp_dir)/include/Ice/ImplicitContextF.h" "$(ice_cpp_dir)/include/Ice/Properties.h" "$(ice_cpp_dir)/include/Ice/IncomingAsync.h" "$(ice_cpp_dir)/include/Ice/Initialize.h" "$(ice_cpp_dir)/include/Ice/PropertiesF.h" "$(ice_cpp_dir)/include/Ice/Dispatcher.h" "$(ice_cpp_dir)/include/Ice/StringConverter.h" "$(ice_cpp_dir)/include/Ice/Plugin.h" "$(ice_cpp_dir)/include/IceUtil/Unicode.h" "$(ice_cpp_dir)/include/Ice/LocalException.h" "$(ice_cpp_dir)/include/Ice/Logger.h" "$(ice_cpp_dir)/include/Ice/ObjectAdapter.h" "$(ice_cpp_dir)/include/Ice/FacetMap.h" "$(ice_cpp_dir)/include/Ice/Endpoint.h" "$(ice_cpp_dir)/include/Slice/PythonUtil.h" "$(ice_cpp_dir)/include/Slice/Parser.h" Properties$(OBJEXT): Properties.cpp Properties.h Config.h "$(ice_cpp_dir)/include/Ice/PropertiesF.h" "$(ice_cpp_dir)/include/Ice/LocalObjectF.h" "$(ice_cpp_dir)/include/IceUtil/Shared.h" "$(ice_cpp_dir)/include/IceUtil/Config.h" "$(ice_cpp_dir)/include/Ice/Handle.h" "$(ice_cpp_dir)/include/IceUtil/Handle.h" "$(ice_cpp_dir)/include/IceUtil/Exception.h" "$(ice_cpp_dir)/include/Ice/Config.h" "$(ice_cpp_dir)/include/Ice/ProxyHandle.h" "$(ice_cpp_dir)/include/Ice/ProxyF.h" "$(ice_cpp_dir)/include/Ice/ObjectF.h" "$(ice_cpp_dir)/include/Ice/Exception.h" "$(ice_cpp_dir)/include/Ice/LocalObject.h" "$(ice_cpp_dir)/include/Ice/Proxy.h" "$(ice_cpp_dir)/include/IceUtil/Mutex.h" "$(ice_cpp_dir)/include/IceUtil/Lock.h" "$(ice_cpp_dir)/include/IceUtil/ThreadException.h" "$(ice_cpp_dir)/include/IceUtil/Time.h" "$(ice_cpp_dir)/include/IceUtil/MutexProtocol.h" "$(ice_cpp_dir)/include/Ice/ProxyFactoryF.h" "$(ice_cpp_dir)/include/Ice/ConnectionIF.h" "$(ice_cpp_dir)/include/Ice/RequestHandlerF.h" "$(ice_cpp_dir)/include/Ice/EndpointIF.h" "$(ice_cpp_dir)/include/Ice/EndpointF.h" "$(ice_cpp_dir)/include/IceUtil/ScopedArray.h" "$(ice_cpp_dir)/include/Ice/UndefSysMacros.h" "$(ice_cpp_dir)/include/Ice/EndpointTypes.h" "$(ice_cpp_dir)/include/Ice/ObjectAdapterF.h" "$(ice_cpp_dir)/include/Ice/ReferenceF.h" "$(ice_cpp_dir)/include/Ice/OutgoingAsync.h" "$(ice_cpp_dir)/include/IceUtil/Monitor.h" "$(ice_cpp_dir)/include/IceUtil/Cond.h" "$(ice_cpp_dir)/include/IceUtil/Timer.h" "$(ice_cpp_dir)/include/IceUtil/Thread.h" "$(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h" "$(ice_cpp_dir)/include/Ice/InstanceF.h" "$(ice_cpp_dir)/include/Ice/CommunicatorF.h" "$(ice_cpp_dir)/include/Ice/Current.h" "$(ice_cpp_dir)/include/Ice/ConnectionF.h" "$(ice_cpp_dir)/include/Ice/Identity.h" "$(ice_cpp_dir)/include/Ice/BasicStream.h" "$(ice_cpp_dir)/include/Ice/ObjectFactoryF.h" "$(ice_cpp_dir)/include/Ice/Buffer.h" "$(ice_cpp_dir)/include/Ice/Protocol.h" "$(ice_cpp_dir)/include/Ice/StreamF.h" "$(ice_cpp_dir)/include/Ice/Object.h" "$(ice_cpp_dir)/include/Ice/GCShared.h" "$(ice_cpp_dir)/include/Ice/GCCountMap.h" "$(ice_cpp_dir)/include/Ice/IncomingAsyncF.h" Util.h "$(ice_cpp_dir)/include/Ice/BuiltinSequences.h" "$(ice_cpp_dir)/include/Ice/Stream.h" "$(ice_cpp_dir)/include/Ice/Initialize.h" "$(ice_cpp_dir)/include/Ice/LoggerF.h" "$(ice_cpp_dir)/include/Ice/StatsF.h" "$(ice_cpp_dir)/include/Ice/Dispatcher.h" "$(ice_cpp_dir)/include/Ice/StringConverter.h" "$(ice_cpp_dir)/include/Ice/Plugin.h" "$(ice_cpp_dir)/include/IceUtil/Unicode.h" "$(ice_cpp_dir)/include/Ice/Properties.h" "$(ice_cpp_dir)/include/Ice/Outgoing.h" "$(ice_cpp_dir)/include/Ice/Incoming.h" "$(ice_cpp_dir)/include/Ice/ServantLocatorF.h" "$(ice_cpp_dir)/include/Ice/ServantManagerF.h" "$(ice_cpp_dir)/include/Ice/Direct.h" Proxy$(OBJEXT): Proxy.cpp "$(ice_cpp_dir)/include/IceUtil/DisableWarnings.h" Proxy.h Config.h "$(ice_cpp_dir)/include/Ice/ProxyF.h" "$(ice_cpp_dir)/include/IceUtil/Shared.h" "$(ice_cpp_dir)/include/IceUtil/Config.h" "$(ice_cpp_dir)/include/Ice/Config.h" "$(ice_cpp_dir)/include/Ice/ProxyHandle.h" "$(ice_cpp_dir)/include/IceUtil/Handle.h" "$(ice_cpp_dir)/include/IceUtil/Exception.h" "$(ice_cpp_dir)/include/Ice/Handle.h" "$(ice_cpp_dir)/include/Ice/CommunicatorF.h" "$(ice_cpp_dir)/include/Ice/LocalObjectF.h" "$(ice_cpp_dir)/include/Ice/ObjectF.h" "$(ice_cpp_dir)/include/Ice/Exception.h" "$(ice_cpp_dir)/include/Ice/LocalObject.h" "$(ice_cpp_dir)/include/IceUtil/ScopedArray.h" "$(ice_cpp_dir)/include/Ice/UndefSysMacros.h" Communicator.h Connection.h "$(ice_cpp_dir)/include/Ice/ConnectionF.h" Util.h "$(ice_cpp_dir)/include/Ice/BuiltinSequences.h" "$(ice_cpp_dir)/include/Ice/Proxy.h" "$(ice_cpp_dir)/include/IceUtil/Mutex.h" "$(ice_cpp_dir)/include/IceUtil/Lock.h" "$(ice_cpp_dir)/include/IceUtil/ThreadException.h" "$(ice_cpp_dir)/include/IceUtil/Time.h" "$(ice_cpp_dir)/include/IceUtil/MutexProtocol.h" "$(ice_cpp_dir)/include/Ice/ProxyFactoryF.h" "$(ice_cpp_dir)/include/Ice/ConnectionIF.h" "$(ice_cpp_dir)/include/Ice/RequestHandlerF.h" "$(ice_cpp_dir)/include/Ice/EndpointIF.h" "$(ice_cpp_dir)/include/Ice/EndpointF.h" "$(ice_cpp_dir)/include/Ice/EndpointTypes.h" "$(ice_cpp_dir)/include/Ice/ObjectAdapterF.h" "$(ice_cpp_dir)/include/Ice/ReferenceF.h" "$(ice_cpp_dir)/include/Ice/OutgoingAsync.h" "$(ice_cpp_dir)/include/IceUtil/Monitor.h" "$(ice_cpp_dir)/include/IceUtil/Cond.h" "$(ice_cpp_dir)/include/IceUtil/Timer.h" "$(ice_cpp_dir)/include/IceUtil/Thread.h" "$(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h" "$(ice_cpp_dir)/include/Ice/InstanceF.h" "$(ice_cpp_dir)/include/Ice/Current.h" "$(ice_cpp_dir)/include/Ice/Identity.h" "$(ice_cpp_dir)/include/Ice/BasicStream.h" "$(ice_cpp_dir)/include/Ice/ObjectFactoryF.h" "$(ice_cpp_dir)/include/Ice/Buffer.h" "$(ice_cpp_dir)/include/Ice/Protocol.h" "$(ice_cpp_dir)/include/Ice/StreamF.h" "$(ice_cpp_dir)/include/Ice/Stream.h" "$(ice_cpp_dir)/include/Ice/Object.h" "$(ice_cpp_dir)/include/Ice/GCShared.h" "$(ice_cpp_dir)/include/Ice/GCCountMap.h" "$(ice_cpp_dir)/include/Ice/IncomingAsyncF.h" Operation.h Endpoint.h "$(ice_cpp_dir)/include/Ice/Endpoint.h" "$(ice_cpp_dir)/include/Ice/Communicator.h" "$(ice_cpp_dir)/include/Ice/Outgoing.h" "$(ice_cpp_dir)/include/Ice/Incoming.h" "$(ice_cpp_dir)/include/Ice/ServantLocatorF.h" "$(ice_cpp_dir)/include/Ice/ServantManagerF.h" "$(ice_cpp_dir)/include/Ice/Direct.h" "$(ice_cpp_dir)/include/Ice/LoggerF.h" "$(ice_cpp_dir)/include/Ice/StatsF.h" "$(ice_cpp_dir)/include/Ice/RouterF.h" "$(ice_cpp_dir)/include/Ice/LocatorF.h" "$(ice_cpp_dir)/include/Ice/PluginF.h" "$(ice_cpp_dir)/include/Ice/ImplicitContextF.h" "$(ice_cpp_dir)/include/Ice/Properties.h" "$(ice_cpp_dir)/include/Ice/LocalException.h" "$(ice_cpp_dir)/include/Ice/Locator.h" "$(ice_cpp_dir)/include/Ice/IncomingAsync.h" "$(ice_cpp_dir)/include/Ice/FactoryTableInit.h" "$(ice_cpp_dir)/include/Ice/FactoryTable.h" "$(ice_cpp_dir)/include/Ice/UserExceptionFactory.h" "$(ice_cpp_dir)/include/Ice/ProcessF.h" "$(ice_cpp_dir)/include/Ice/Router.h" Slice$(OBJEXT): Slice.cpp Slice.h Config.h Util.h "$(ice_cpp_dir)/include/Ice/BuiltinSequences.h" "$(ice_cpp_dir)/include/Ice/LocalObjectF.h" "$(ice_cpp_dir)/include/IceUtil/Shared.h" "$(ice_cpp_dir)/include/IceUtil/Config.h" "$(ice_cpp_dir)/include/Ice/Handle.h" "$(ice_cpp_dir)/include/IceUtil/Handle.h" "$(ice_cpp_dir)/include/IceUtil/Exception.h" "$(ice_cpp_dir)/include/Ice/Config.h" "$(ice_cpp_dir)/include/Ice/ProxyHandle.h" "$(ice_cpp_dir)/include/Ice/ProxyF.h" "$(ice_cpp_dir)/include/Ice/ObjectF.h" "$(ice_cpp_dir)/include/Ice/Exception.h" "$(ice_cpp_dir)/include/Ice/LocalObject.h" "$(ice_cpp_dir)/include/Ice/Proxy.h" "$(ice_cpp_dir)/include/IceUtil/Mutex.h" "$(ice_cpp_dir)/include/IceUtil/Lock.h" "$(ice_cpp_dir)/include/IceUtil/ThreadException.h" "$(ice_cpp_dir)/include/IceUtil/Time.h" "$(ice_cpp_dir)/include/IceUtil/MutexProtocol.h" "$(ice_cpp_dir)/include/Ice/ProxyFactoryF.h" "$(ice_cpp_dir)/include/Ice/ConnectionIF.h" "$(ice_cpp_dir)/include/Ice/RequestHandlerF.h" "$(ice_cpp_dir)/include/Ice/EndpointIF.h" "$(ice_cpp_dir)/include/Ice/EndpointF.h" "$(ice_cpp_dir)/include/IceUtil/ScopedArray.h" "$(ice_cpp_dir)/include/Ice/UndefSysMacros.h" "$(ice_cpp_dir)/include/Ice/EndpointTypes.h" "$(ice_cpp_dir)/include/Ice/ObjectAdapterF.h" "$(ice_cpp_dir)/include/Ice/ReferenceF.h" "$(ice_cpp_dir)/include/Ice/OutgoingAsync.h" "$(ice_cpp_dir)/include/IceUtil/Monitor.h" "$(ice_cpp_dir)/include/IceUtil/Cond.h" "$(ice_cpp_dir)/include/IceUtil/Timer.h" "$(ice_cpp_dir)/include/IceUtil/Thread.h" "$(ice_cpp_dir)/include/Ice/OutgoingAsyncF.h" "$(ice_cpp_dir)/include/Ice/InstanceF.h" "$(ice_cpp_dir)/include/Ice/CommunicatorF.h" "$(ice_cpp_dir)/include/Ice/Current.h" "$(ice_cpp_dir)/include/Ice/ConnectionF.h" "$(ice_cpp_dir)/include/Ice/Identity.h" "$(ice_cpp_dir)/include/Ice/BasicStream.h" "$(ice_cpp_dir)/include/Ice/ObjectFactoryF.h" "$(ice_cpp_dir)/include/Ice/Buffer.h" "$(ice_cpp_dir)/include/Ice/Protocol.h" "$(ice_cpp_dir)/include/Ice/StreamF.h" "$(ice_cpp_dir)/include/Ice/Stream.h" "$(ice_cpp_dir)/include/Ice/Object.h" "$(ice_cpp_dir)/include/Ice/GCShared.h" "$(ice_cpp_dir)/include/Ice/GCCountMap.h" "$(ice_cpp_dir)/include/Ice/IncomingAsyncF.h" "$(ice_cpp_dir)/include/Slice/Preprocessor.h" "$(ice_cpp_dir)/include/Slice/PythonUtil.h" "$(ice_cpp_dir)/include/Slice/Parser.h" "$(ice_cpp_dir)/include/IceUtil/OutputUtil.h" "$(ice_cpp_dir)/include/IceUtil/Options.h" "$(ice_cpp_dir)/include/IceUtil/RecMutex.h" diff --git a/py/modules/IcePy/Communicator.cpp b/py/modules/IcePy/Communicator.cpp index f3cf4f3d4f7..fae9e0d7bdf 100644 --- a/py/modules/IcePy/Communicator.cpp +++ b/py/modules/IcePy/Communicator.cpp @@ -22,7 +22,7 @@ #include <ThreadNotification.h> #include <Util.h> #include <Ice/Initialize.h> -#include <Ice/Communicator.h> +#include <Ice/CommunicatorAsync.h> #include <Ice/LocalException.h> #include <Ice/Locator.h> #include <Ice/ObjectAdapter.h> @@ -687,6 +687,103 @@ communicatorFlushBatchRequests(CommunicatorObject* self) extern "C" #endif static PyObject* +communicatorBeginFlushBatchRequests(CommunicatorObject* self, PyObject* args, PyObject* kwds) +{ + assert(self->communicator); + + static char* argNames[] = + { + const_cast<char*>("_ex"), + const_cast<char*>("_sent"), + 0 + }; + PyObject* ex = Py_None; + PyObject* sent = Py_None; + if(!PyArg_ParseTupleAndKeywords(args, kwds, STRCAST("|OO"), argNames, &ex, &sent)) + { + return 0; + } + + if(ex == Py_None) + { + ex = 0; + } + if(sent == Py_None) + { + sent = 0; + } + + if(!ex && sent) + { + PyErr_Format(PyExc_RuntimeError, + STRCAST("exception callback must also be provided when sent callback is used")); + return 0; + } + + Ice::Callback_Communicator_flushBatchRequestsPtr cb; + if(ex || sent) + { + FlushCallbackPtr d = new FlushCallback(ex, sent, "flushBatchRequests"); + cb = Ice::newCallback_Communicator_flushBatchRequests(d, &FlushCallback::exception, &FlushCallback::sent); + } + + Ice::AsyncResultPtr result; + try + { + AllowThreads allowThreads; // Release Python's global interpreter lock during remote invocations. + + if(cb) + { + result = (*self->communicator)->begin_flushBatchRequests(cb); + } + else + { + result = (*self->communicator)->begin_flushBatchRequests(); + } + } + catch(const Ice::Exception& ex) + { + setPythonException(ex); + return 0; + } + + return createAsyncResult(result, 0, 0, reinterpret_cast<PyObject*>(self)); +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* +communicatorEndFlushBatchRequests(CommunicatorObject* self, PyObject* args) +{ + assert(self->communicator); + + PyObject* result; + if(!PyArg_ParseTuple(args, STRCAST("O!"), &AsyncResultType, &result)) + { + return 0; + } + + Ice::AsyncResultPtr r = getAsyncResult(result); + try + { + AllowThreads allowThreads; // Release Python's global interpreter lock during blocking invocations. + (*self->communicator)->end_flushBatchRequests(r); + } + catch(const Ice::Exception& ex) + { + setPythonException(ex); + return 0; + } + + Py_INCREF(Py_None); + return Py_None; +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* communicatorGetAdmin(CommunicatorObject* self) { assert(self->communicator); @@ -1306,6 +1403,11 @@ static PyMethodDef CommunicatorMethods[] = PyDoc_STR(STRCAST("setDefaultLocator(proxy) -> None")) }, { STRCAST("flushBatchRequests"), reinterpret_cast<PyCFunction>(communicatorFlushBatchRequests), METH_NOARGS, PyDoc_STR(STRCAST("flushBatchRequests() -> None")) }, + { STRCAST("begin_flushBatchRequests"), reinterpret_cast<PyCFunction>(communicatorBeginFlushBatchRequests), + METH_VARARGS | METH_KEYWORDS, + PyDoc_STR(STRCAST("begin_flushBatchRequests([_ex][, _sent]) -> Ice.AsyncResult")) }, + { STRCAST("end_flushBatchRequests"), reinterpret_cast<PyCFunction>(communicatorEndFlushBatchRequests), + METH_VARARGS, PyDoc_STR(STRCAST("end_flushBatchRequests(Ice.AsyncResult) -> None")) }, { STRCAST("getAdmin"), reinterpret_cast<PyCFunction>(communicatorGetAdmin), METH_NOARGS, PyDoc_STR(STRCAST("getAdmin() -> Ice.ObjectPrx")) }, { STRCAST("addAdminFacet"), reinterpret_cast<PyCFunction>(communicatorAddAdminFacet), METH_VARARGS, diff --git a/py/modules/IcePy/Connection.cpp b/py/modules/IcePy/Connection.cpp index 2d1cba09c5f..d2f5ffce2cc 100644 --- a/py/modules/IcePy/Connection.cpp +++ b/py/modules/IcePy/Connection.cpp @@ -14,9 +14,10 @@ #include <ConnectionInfo.h> #include <Endpoint.h> #include <ObjectAdapter.h> +#include <Operation.h> #include <Proxy.h> #include <Util.h> -#include <Ice/Connection.h> +#include <Ice/ConnectionAsync.h> using namespace std; using namespace IcePy; @@ -224,6 +225,103 @@ connectionFlushBatchRequests(ConnectionObject* self) extern "C" #endif static PyObject* +connectionBeginFlushBatchRequests(ConnectionObject* self, PyObject* args, PyObject* kwds) +{ + assert(self->connection); + + static char* argNames[] = + { + const_cast<char*>("_ex"), + const_cast<char*>("_sent"), + 0 + }; + PyObject* ex = Py_None; + PyObject* sent = Py_None; + if(!PyArg_ParseTupleAndKeywords(args, kwds, STRCAST("|OO"), argNames, &ex, &sent)) + { + return 0; + } + + if(ex == Py_None) + { + ex = 0; + } + if(sent == Py_None) + { + sent = 0; + } + + if(!ex && sent) + { + PyErr_Format(PyExc_RuntimeError, + STRCAST("exception callback must also be provided when sent callback is used")); + return 0; + } + + Ice::Callback_Connection_flushBatchRequestsPtr cb; + if(ex || sent) + { + FlushCallbackPtr d = new FlushCallback(ex, sent, "flushBatchRequests"); + cb = Ice::newCallback_Connection_flushBatchRequests(d, &FlushCallback::exception, &FlushCallback::sent); + } + + Ice::AsyncResultPtr result; + try + { + AllowThreads allowThreads; // Release Python's global interpreter lock during remote invocations. + + if(cb) + { + result = (*self->connection)->begin_flushBatchRequests(cb); + } + else + { + result = (*self->connection)->begin_flushBatchRequests(); + } + } + catch(const Ice::Exception& ex) + { + setPythonException(ex); + return 0; + } + + return createAsyncResult(result, 0, reinterpret_cast<PyObject*>(self), 0); +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* +connectionEndFlushBatchRequests(ConnectionObject* self, PyObject* args) +{ + assert(self->connection); + + PyObject* result; + if(!PyArg_ParseTuple(args, STRCAST("O!"), &AsyncResultType, &result)) + { + return 0; + } + + Ice::AsyncResultPtr r = getAsyncResult(result); + try + { + AllowThreads allowThreads; // Release Python's global interpreter lock during blocking invocations. + (*self->connection)->end_flushBatchRequests(r); + } + catch(const Ice::Exception& ex) + { + setPythonException(ex); + return 0; + } + + Py_INCREF(Py_None); + return Py_None; +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* connectionType(ConnectionObject* self) { assert(self->connection); @@ -333,6 +431,10 @@ static PyMethodDef ConnectionMethods[] = PyDoc_STR(STRCAST("getAdapter() -> Ice.ObjectAdapter")) }, { STRCAST("flushBatchRequests"), reinterpret_cast<PyCFunction>(connectionFlushBatchRequests), METH_NOARGS, PyDoc_STR(STRCAST("flushBatchRequests() -> None")) }, + { STRCAST("begin_flushBatchRequests"), reinterpret_cast<PyCFunction>(connectionBeginFlushBatchRequests), + METH_VARARGS | METH_KEYWORDS, PyDoc_STR(STRCAST("begin_flushBatchRequests([_ex][, _sent]) -> Ice.AsyncResult")) }, + { STRCAST("end_flushBatchRequests"), reinterpret_cast<PyCFunction>(connectionEndFlushBatchRequests), METH_VARARGS, + PyDoc_STR(STRCAST("end_flushBatchRequests(Ice.AsyncResult) -> None")) }, { STRCAST("type"), reinterpret_cast<PyCFunction>(connectionType), METH_NOARGS, PyDoc_STR(STRCAST("type() -> string")) }, { STRCAST("timeout"), reinterpret_cast<PyCFunction>(connectionTimeout), METH_NOARGS, @@ -342,7 +444,7 @@ static PyMethodDef ConnectionMethods[] = { STRCAST("getInfo"), reinterpret_cast<PyCFunction>(connectionGetInfo), METH_NOARGS, PyDoc_STR(STRCAST("getInfo() -> Ice.ConnectionInfo")) }, { STRCAST("getEndpoint"), reinterpret_cast<PyCFunction>(connectionGetEndpoint), METH_NOARGS, - PyDoc_STR(STRCAST("getInfo() -> Ice.Endpoint")) }, + PyDoc_STR(STRCAST("getEndpoint() -> Ice.Endpoint")) }, { 0, 0 } /* sentinel */ }; diff --git a/py/modules/IcePy/Operation.cpp b/py/modules/IcePy/Operation.cpp index a3c5a08697b..aa2ef440aac 100644 --- a/py/modules/IcePy/Operation.cpp +++ b/py/modules/IcePy/Operation.cpp @@ -89,7 +89,7 @@ public: Invocation(const Ice::ObjectPrx&); - virtual PyObject* invoke(PyObject*) = 0; + virtual PyObject* invoke(PyObject*, PyObject* = 0) = 0; protected: @@ -112,7 +112,9 @@ protected: OperationPtr _op; Ice::CommunicatorPtr _communicator; - bool prepareRequest(PyObject*, bool, vector<Ice::Byte>&); + enum MappingType { SyncMapping, AsyncMapping, OldAsyncMapping }; + + bool prepareRequest(PyObject*, MappingType, vector<Ice::Byte>&); PyObject* unmarshalResults(const pair<const Ice::Byte*, const Ice::Byte*>&); PyObject* unmarshalException(const pair<const Ice::Byte*, const Ice::Byte*>&); bool validateException(PyObject*) const; @@ -120,7 +122,7 @@ protected: }; // -// A synchronous typed invocation. +// Synchronous typed invocation. // class SyncTypedInvocation : virtual public TypedInvocation { @@ -128,45 +130,62 @@ public: SyncTypedInvocation(const Ice::ObjectPrx&, const OperationPtr&); - virtual PyObject* invoke(PyObject*); + virtual PyObject* invoke(PyObject*, PyObject* = 0); }; // -// An asynchronous typed invocation. +// Asynchronous typed invocation. // -class AsyncTypedInvocation : virtual public TypedInvocation, virtual public Ice::AMI_Array_Object_ice_invoke +class AsyncTypedInvocation : virtual public TypedInvocation { public: - AsyncTypedInvocation(const Ice::ObjectPrx&, const OperationPtr&); + AsyncTypedInvocation(const Ice::ObjectPrx&, PyObject*, const OperationPtr&); ~AsyncTypedInvocation(); - virtual PyObject* invoke(PyObject*); + virtual PyObject* invoke(PyObject*, PyObject* = 0); + PyObject* end(const Ice::ObjectPrx&, const OperationPtr&, const Ice::AsyncResultPtr&); + + string opName() const; - virtual void ice_response(bool, const pair<const Ice::Byte*, const Ice::Byte*>&); - virtual void ice_exception(const Ice::Exception&); + void response(bool, const pair<const Ice::Byte*, const Ice::Byte*>&); + void exception(const Ice::Exception&); + void sent(bool); protected: - void handleException(PyObject*); + void checkAsyncTwowayOnly(const Ice::ObjectPrx&) const; - PyObject* _callback; + PyObject* _pyProxy; + PyObject* _response; + PyObject* _ex; + PyObject* _sent; }; +typedef IceUtil::Handle<AsyncTypedInvocation> AsyncTypedInvocationPtr; // -// An asynchronous typed invocation with support for ice_sent. +// Old-style asynchronous typed invocation. // -class AsyncSentTypedInvocation : virtual public AsyncTypedInvocation, virtual public Ice::AMISentCallback +class OldAsyncTypedInvocation : virtual public TypedInvocation { public: - AsyncSentTypedInvocation(const Ice::ObjectPrx&, const OperationPtr&); + OldAsyncTypedInvocation(const Ice::ObjectPrx&, const OperationPtr&); + ~OldAsyncTypedInvocation(); + + virtual PyObject* invoke(PyObject*, PyObject* = 0); - virtual void ice_sent(); + void response(bool, const pair<const Ice::Byte*, const Ice::Byte*>&); + void exception(const Ice::Exception&); + void sent(bool); + +protected: + + PyObject* _callback; }; // -// A synchronous blobject invocation. +// Synchronous blobject invocation. // class SyncBlobjectInvocation : virtual public Invocation { @@ -174,42 +193,56 @@ public: SyncBlobjectInvocation(const Ice::ObjectPrx&); - virtual PyObject* invoke(PyObject*); + virtual PyObject* invoke(PyObject*, PyObject* = 0); }; // -// An asynchronous blobject invocation. +// Asynchronous blobject invocation. // -class AsyncBlobjectInvocation : virtual public Invocation, virtual public Ice::AMI_Array_Object_ice_invoke +class AsyncBlobjectInvocation : virtual public Invocation { public: - AsyncBlobjectInvocation(const Ice::ObjectPrx&); + AsyncBlobjectInvocation(const Ice::ObjectPrx&, PyObject*); ~AsyncBlobjectInvocation(); - virtual PyObject* invoke(PyObject*); + virtual PyObject* invoke(PyObject*, PyObject* = 0); + PyObject* end(const Ice::ObjectPrx&, const Ice::AsyncResultPtr&); - virtual void ice_response(bool, const pair<const Ice::Byte*, const Ice::Byte*>&); - virtual void ice_exception(const Ice::Exception&); + void response(bool, const pair<const Ice::Byte*, const Ice::Byte*>&); + void exception(const Ice::Exception&); + void sent(bool); protected: + PyObject* _pyProxy; string _op; - PyObject* _callback; - - void handleException(PyObject*); + PyObject* _response; + PyObject* _ex; + PyObject* _sent; }; +typedef IceUtil::Handle<AsyncBlobjectInvocation> AsyncBlobjectInvocationPtr; // -// An asynchronous blobject invocation with support for ice_sent. +// Old-style asynchronous blobject invocation. // -class AsyncSentBlobjectInvocation : virtual public AsyncBlobjectInvocation, virtual public Ice::AMISentCallback +class OldAsyncBlobjectInvocation : virtual public Invocation { public: - AsyncSentBlobjectInvocation(const Ice::ObjectPrx&); + OldAsyncBlobjectInvocation(const Ice::ObjectPrx&); + ~OldAsyncBlobjectInvocation(); + + virtual PyObject* invoke(PyObject*, PyObject* = 0); + + void response(bool, const pair<const Ice::Byte*, const Ice::Byte*>&); + void exception(const Ice::Exception&); + void sent(bool); - virtual void ice_sent(); +protected: + + string _op; + PyObject* _callback; }; // @@ -318,12 +351,25 @@ struct AMDCallbackObject UpcallPtr* upcall; }; +struct AsyncResultObject +{ + PyObject_HEAD + Ice::AsyncResultPtr* result; + InvocationPtr* invocation; + PyObject* proxy; + PyObject* connection; + PyObject* communicator; +}; + extern PyTypeObject OperationType; extern PyTypeObject AMDCallbackType; } -static OperationPtr +namespace +{ + +OperationPtr getOperation(PyObject* p) { assert(PyObject_IsInstance(p, reinterpret_cast<PyObject*>(&OperationType)) == 1); @@ -331,6 +377,101 @@ getOperation(PyObject* p) return *obj->op; } +void +handleException() +{ + assert(PyErr_Occurred()); + + PyException ex; // Retrieve it before another Python API call clears it. + + // + // A callback that calls sys.exit() will raise the SystemExit exception. + // This is normally caught by the interpreter, causing it to exit. + // However, we have no way to pass this exception to the interpreter, + // so we act on it directly. + // + ex.checkSystemExit(); + + ex.raise(); +} + +void +callException(PyObject* method, PyObject* ex) +{ + PyObjectHandle args = Py_BuildValue(STRCAST("(O)"), ex); + PyObjectHandle tmp = PyObject_Call(method, args.get(), 0); + if(PyErr_Occurred()) + { + handleException(); // Callback raised an exception. + } +} + +void +callException(PyObject* method, const Ice::Exception& ex) +{ + PyObjectHandle exh = convertException(ex); + assert(exh.get()); + callException(method, exh.get()); +} + +void +callException(PyObject* callback, const string& op, const string& method, PyObject* ex) +{ + if(!PyObject_HasAttrString(callback, STRCAST(method.c_str()))) + { + ostringstream ostr; + ostr << "AMI callback object for operation `" << op << "' does not define " << method << "()"; + string str = ostr.str(); + PyErr_Warn(PyExc_RuntimeWarning, const_cast<char*>(str.c_str())); + } + else + { + PyObjectHandle m = PyObject_GetAttrString(callback, STRCAST(method.c_str())); + assert(m.get()); + callException(m.get(), ex); + } +} + +void +callException(PyObject* callback, const string& op, const string& method, const Ice::Exception& ex) +{ + PyObjectHandle exh = convertException(ex); + assert(exh.get()); + callException(callback, op, method, exh.get()); +} + +void +callSent(PyObject* method, bool sentSynchronously, bool passArg) +{ + PyObjectHandle args; + if(passArg) + { + args = Py_BuildValue(STRCAST("(O)"), sentSynchronously ? getTrue() : getFalse()); + } + else + { + args = PyTuple_New(0); + } + PyObjectHandle tmp = PyObject_Call(method, args.get(), 0); + if(PyErr_Occurred()) + { + handleException(); // Callback raised an exception. + } +} + +void +callSent(PyObject* callback, const string& method, bool sentSynchronously, bool passArg) +{ + if(PyObject_HasAttrString(callback, STRCAST(method.c_str()))) + { + PyObjectHandle m = PyObject_GetAttrString(callback, STRCAST(method.c_str())); + assert(m.get()); + callSent(m.get(), sentSynchronously, passArg); + } +} + +} + #ifdef WIN32 extern "C" #endif @@ -422,22 +563,52 @@ operationInvokeAsync(OperationObject* self, PyObject* args) Ice::ObjectPrx prx = getProxy(pyProxy); assert(self->op); - // - // If the callback implements an ice_sent method, we create a wrapper that derives - // from AMISentCallback. - // - assert(PyTuple_GET_SIZE(opArgs) > 0); - PyObject* callback = PyTuple_GET_ITEM(opArgs, 0); - if(PyObject_HasAttrString(callback, STRCAST("ice_sent"))) + InvocationPtr i = new OldAsyncTypedInvocation(prx, *self->op); + return i->invoke(opArgs); +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* +operationBegin(OperationObject* self, PyObject* args) +{ + PyObject* proxy; + PyObject* opArgs; + if(!PyArg_ParseTuple(args, STRCAST("O!O!"), &ProxyType, &proxy, &PyTuple_Type, &opArgs)) { - InvocationPtr i = new AsyncSentTypedInvocation(prx, *self->op); - return i->invoke(opArgs); + return 0; } - else + + Ice::ObjectPrx p = getProxy(proxy); + InvocationPtr i = new AsyncTypedInvocation(p, proxy, *self->op); + return i->invoke(opArgs); +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* +operationEnd(OperationObject* self, PyObject* args) +{ + PyObject* proxy; + PyObject* result; + if(!PyArg_ParseTuple(args, STRCAST("O!O!"), &ProxyType, &proxy, &AsyncResultType, &result)) + { + return 0; + } + + AsyncResultObject* ar = reinterpret_cast<AsyncResultObject*>(result); + assert(ar); + AsyncTypedInvocationPtr i = AsyncTypedInvocationPtr::dynamicCast(*ar->invocation); + if(!i) { - InvocationPtr i = new AsyncTypedInvocation(prx, *self->op); - return i->invoke(opArgs); + PyErr_Format(PyExc_ValueError, STRCAST("invalid AsyncResult object passed to end_%s"), + (*self->op)->name.c_str()); + return 0; } + Ice::ObjectPrx p = getProxy(proxy); + return i->end(p, *self->op, *ar->result); } #ifdef WIN32 @@ -459,6 +630,10 @@ operationDeprecate(OperationObject* self, PyObject* args) return Py_None; } +// +// AMDCallback operations +// + #ifdef WIN32 extern "C" #endif @@ -538,6 +713,233 @@ amdCallbackIceException(AMDCallbackObject* self, PyObject* args) } // +// AsyncResult operations +// + +#ifdef WIN32 +extern "C" +#endif +static AsyncResultObject* +asyncResultNew(PyObject* /*arg*/) +{ + AsyncResultObject* self = PyObject_New(AsyncResultObject, &AsyncResultType); + if(!self) + { + return 0; + } + self->result = 0; + self->invocation = 0; + self->proxy = 0; + self->connection = 0; + self->communicator = 0; + return self; +} + +#ifdef WIN32 +extern "C" +#endif +static void +asyncResultDealloc(AsyncResultObject* self) +{ + delete self->result; + delete self->invocation; + Py_XDECREF(self->proxy); + Py_XDECREF(self->connection); + Py_XDECREF(self->communicator); + PyObject_Del(self); +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* +asyncResultGetCommunicator(AsyncResultObject* self) +{ + if(self->communicator) + { + Py_INCREF(self->communicator); + return self->communicator; + } + + Py_INCREF(Py_None); + return Py_None; +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* +asyncResultGetConnection(AsyncResultObject* self) +{ + if(self->connection) + { + Py_INCREF(self->connection); + return self->connection; + } + + Py_INCREF(Py_None); + return Py_None; +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* +asyncResultGetProxy(AsyncResultObject* self) +{ + if(self->proxy) + { + Py_INCREF(self->proxy); + return self->proxy; + } + + Py_INCREF(Py_None); + return Py_None; +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* +asyncResultIsCompleted(AsyncResultObject* self) +{ + bool b = false; + + try + { + assert(self->result); + b = (*self->result)->isCompleted(); + } + catch(...) + { + assert(false); + } + + PyRETURN_BOOL(b); +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* +asyncResultWaitForCompleted(AsyncResultObject* self) +{ + AllowThreads allowThreads; // Release Python's global interpreter lock during remote invocations. + try + { + assert(self->result); + (*self->result)->waitForCompleted(); + } + catch(...) + { + assert(false); + } + + Py_INCREF(Py_None); + return Py_None; +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* +asyncResultIsSent(AsyncResultObject* self) +{ + bool b = false; + + try + { + assert(self->result); + b = (*self->result)->isSent(); + } + catch(...) + { + assert(false); + } + + PyRETURN_BOOL(b); +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* +asyncResultWaitForSent(AsyncResultObject* self) +{ + AllowThreads allowThreads; // Release Python's global interpreter lock during remote invocations. + try + { + assert(self->result); + (*self->result)->waitForSent(); + } + catch(...) + { + assert(false); + } + + Py_INCREF(Py_None); + return Py_None; +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* +asyncResultSentSynchronously(AsyncResultObject* self) +{ + bool b = false; + + try + { + assert(self->result); + b = (*self->result)->sentSynchronously(); + } + catch(...) + { + assert(false); + } + + PyRETURN_BOOL(b); +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* +asyncResultGetOperation(AsyncResultObject* self) +{ + string op; + + try + { + // + // Since the extension uses the Blobject API, calling (*self->result)->getOperation() + // always returns "ice_invoke" as the operation name. If the caller used a regular + // (typed) proxy method, we obtain the actual operation name from the invocation. + // + if(self->invocation) + { + AsyncTypedInvocationPtr i = AsyncTypedInvocationPtr::dynamicCast(*self->invocation); + if(i) + { + op = i->opName(); + } + } + if(op.empty()) + { + assert(self->result); + op = (*self->result)->getOperation(); + } + } + catch(...) + { + assert(false); + } + + return createString(op); +} + +// // ParamInfo implementation. // void @@ -683,6 +1085,10 @@ static PyMethodDef OperationMethods[] = PyDoc_STR(STRCAST("internal function")) }, { STRCAST("invokeAsync"), reinterpret_cast<PyCFunction>(operationInvokeAsync), METH_VARARGS, PyDoc_STR(STRCAST("internal function")) }, + { STRCAST("begin"), reinterpret_cast<PyCFunction>(operationBegin), METH_VARARGS, + PyDoc_STR(STRCAST("internal function")) }, + { STRCAST("end"), reinterpret_cast<PyCFunction>(operationEnd), METH_VARARGS, + PyDoc_STR(STRCAST("internal function")) }, { STRCAST("deprecate"), reinterpret_cast<PyCFunction>(operationDeprecate), METH_VARARGS, PyDoc_STR(STRCAST("internal function")) }, { 0, 0 } /* sentinel */ @@ -697,6 +1103,29 @@ static PyMethodDef AMDCallbackMethods[] = { 0, 0 } /* sentinel */ }; +static PyMethodDef AsyncResultMethods[] = +{ + { STRCAST("getCommunicator"), reinterpret_cast<PyCFunction>(asyncResultGetCommunicator), METH_NOARGS, + PyDoc_STR(STRCAST("returns the communicator for the invocation")) }, + { STRCAST("getConnection"), reinterpret_cast<PyCFunction>(asyncResultGetConnection), METH_NOARGS, + PyDoc_STR(STRCAST("returns the connection for the invocation")) }, + { STRCAST("getProxy"), reinterpret_cast<PyCFunction>(asyncResultGetProxy), METH_NOARGS, + PyDoc_STR(STRCAST("returns the proxy for the invocation")) }, + { STRCAST("isCompleted"), reinterpret_cast<PyCFunction>(asyncResultIsCompleted), METH_NOARGS, + PyDoc_STR(STRCAST("returns true if the request is complete")) }, + { STRCAST("waitForCompleted"), reinterpret_cast<PyCFunction>(asyncResultWaitForCompleted), METH_NOARGS, + PyDoc_STR(STRCAST("blocks until the request is complete")) }, + { STRCAST("isSent"), reinterpret_cast<PyCFunction>(asyncResultIsSent), METH_NOARGS, + PyDoc_STR(STRCAST("returns true if the request is sent")) }, + { STRCAST("waitForSent"), reinterpret_cast<PyCFunction>(asyncResultWaitForSent), METH_NOARGS, + PyDoc_STR(STRCAST("blocks until the request is sent")) }, + { STRCAST("sentSynchronously"), reinterpret_cast<PyCFunction>(asyncResultSentSynchronously), METH_NOARGS, + PyDoc_STR(STRCAST("returns true if the request was sent synchronously")) }, + { STRCAST("getOperation"), reinterpret_cast<PyCFunction>(asyncResultGetOperation), METH_NOARGS, + PyDoc_STR(STRCAST("returns the name of the operation")) }, + { 0, 0 } /* sentinel */ +}; + namespace IcePy { @@ -796,6 +1225,54 @@ PyTypeObject AMDCallbackType = 0, /* tp_is_gc */ }; +PyTypeObject AsyncResultType = +{ + /* The ob_type field must be initialized in the module init function + * to be portable to Windows without using C++. */ + PyObject_HEAD_INIT(0) + 0, /* ob_size */ + STRCAST("IcePy.AsyncResult"), /* tp_name */ + sizeof(AsyncResultObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + /* methods */ + reinterpret_cast<destructor>(asyncResultDealloc), /* tp_dealloc */ + 0, /* tp_print */ + 0, /* tp_getattr */ + 0, /* tp_setattr */ + 0, /* tp_compare */ + 0, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + 0, /* tp_hash */ + 0, /* tp_call */ + 0, /* tp_str */ + 0, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + 0, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + 0, /* tp_iter */ + 0, /* tp_iternext */ + AsyncResultMethods, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + reinterpret_cast<newfunc>(asyncResultNew), /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ +}; + } bool @@ -821,6 +1298,16 @@ IcePy::initOperation(PyObject* module) return false; } + if(PyType_Ready(&AsyncResultType) < 0) + { + return false; + } + PyTypeObject* arType = &AsyncResultType; // Necessary to prevent GCC's strict-alias warnings. + if(PyModule_AddObject(module, STRCAST("AsyncResult"), reinterpret_cast<PyObject*>(arType)) < 0) + { + return false; + } + return true; } @@ -841,7 +1328,7 @@ IcePy::TypedInvocation::TypedInvocation(const Ice::ObjectPrx& prx, const Operati } bool -IcePy::TypedInvocation::prepareRequest(PyObject* args, bool async, vector<Ice::Byte>& bytes) +IcePy::TypedInvocation::prepareRequest(PyObject* args, MappingType mapping, vector<Ice::Byte>& bytes) { assert(PyTuple_Check(args)); @@ -852,12 +1339,20 @@ IcePy::TypedInvocation::prepareRequest(PyObject* args, bool async, vector<Ice::B Py_ssize_t paramCount = static_cast<Py_ssize_t>(_op->inParams.size()); if(argc != paramCount) { - string fixedName = fixIdent(_op->name); - if(async) + string opName; + if(mapping == OldAsyncMapping) + { + opName = _op->name + "_async"; + } + else if(mapping == AsyncMapping) + { + opName = "begin_" + _op->name; + } + else { - fixedName += "_async"; + opName = fixIdent(_op->name); } - PyErr_Format(PyExc_RuntimeError, STRCAST("%s expects %d in parameters"), fixedName.c_str(), + PyErr_Format(PyExc_RuntimeError, STRCAST("%s expects %d in parameters"), opName.c_str(), static_cast<int>(paramCount)); return false; } @@ -879,16 +1374,20 @@ IcePy::TypedInvocation::prepareRequest(PyObject* args, bool async, vector<Ice::B if(!(*p)->type->validate(arg)) { string opName; - if(async) + if(mapping == OldAsyncMapping) + { + opName = _op->name + "_async"; + } + else if(mapping == AsyncMapping) { - opName = fixIdent(_op->name) + "_async"; + opName = "begin_" + _op->name; } else { opName = fixIdent(_op->name); } PyErr_Format(PyExc_ValueError, STRCAST("invalid value for argument %d in operation `%s'"), - async ? i + 2 : i + 1, const_cast<char*>(opName.c_str())); + mapping == OldAsyncMapping ? i + 2 : i + 1, const_cast<char*>(opName.c_str())); return false; } (*p)->type->marshal(arg, os, &objectMap, &(*p)->metaData); @@ -1041,7 +1540,7 @@ IcePy::TypedInvocation::validateException(PyObject* ex) const void IcePy::TypedInvocation::checkTwowayOnly(const Ice::ObjectPrx& proxy) const { - if((_op->returnType != 0 || !_op->outParams.empty()) && !proxy->ice_isTwoway()) + if((_op->returnType != 0 || !_op->outParams.empty() || !_op->exceptions.empty()) && !proxy->ice_isTwoway()) { Ice::TwowayOnlyException ex(__FILE__, __LINE__); ex.operation = _op->name; @@ -1058,7 +1557,7 @@ IcePy::SyncTypedInvocation::SyncTypedInvocation(const Ice::ObjectPrx& prx, const } PyObject* -IcePy::SyncTypedInvocation::invoke(PyObject* args) +IcePy::SyncTypedInvocation::invoke(PyObject* args, PyObject* /* kwds */) { assert(PyTuple_Check(args)); assert(PyTuple_GET_SIZE(args) == 2); // Format is ((params...), context|None) @@ -1070,7 +1569,7 @@ IcePy::SyncTypedInvocation::invoke(PyObject* args) // Marshal the input parameters to a byte sequence. // Ice::ByteSeq params; - if(!prepareRequest(pyparams, false, params)) + if(!prepareRequest(pyparams, SyncMapping, params)) { return 0; } @@ -1190,20 +1689,363 @@ IcePy::SyncTypedInvocation::invoke(PyObject* args) // // AsyncTypedInvocation // -IcePy::AsyncTypedInvocation::AsyncTypedInvocation(const Ice::ObjectPrx& prx, const OperationPtr& op) - : Invocation(prx), TypedInvocation(prx, op), _callback(0) +IcePy::AsyncTypedInvocation::AsyncTypedInvocation(const Ice::ObjectPrx& prx, PyObject* pyProxy, + const OperationPtr& op) : + Invocation(prx), TypedInvocation(prx, op), _pyProxy(pyProxy), _response(0), _ex(0), _sent(0) { + Py_INCREF(_pyProxy); } IcePy::AsyncTypedInvocation::~AsyncTypedInvocation() { AdoptThread adoptThread; // Ensure the current thread is able to call into Python. + Py_DECREF(_pyProxy); + Py_XDECREF(_response); + Py_XDECREF(_ex); + Py_XDECREF(_sent); +} + +PyObject* +IcePy::AsyncTypedInvocation::invoke(PyObject* args, PyObject* /* kwds */) +{ + assert(PyTuple_Check(args)); + assert(PyTuple_GET_SIZE(args) == 5); // Format is ((params...), response|None, exception|None, sent|None, ctx|None) + PyObject* pyparams = PyTuple_GET_ITEM(args, 0); + assert(PyTuple_Check(pyparams)); + + PyObject* method; + + method = PyTuple_GET_ITEM(args, 1); + if(PyMethod_Check(method)) + { + _response = method; + Py_INCREF(_response); + } + else if(method != Py_None) + { + PyErr_Format(PyExc_RuntimeError, STRCAST("response callback must be a method or None")); + return 0; + } + + method = PyTuple_GET_ITEM(args, 2); + if(PyMethod_Check(method)) + { + _ex = method; + Py_INCREF(_ex); + } + else if(method != Py_None) + { + PyErr_Format(PyExc_RuntimeError, STRCAST("exception callback must be a method or None")); + return 0; + } + + method = PyTuple_GET_ITEM(args, 3); + if(PyMethod_Check(method)) + { + _sent = method; + Py_INCREF(_sent); + } + else if(method != Py_None) + { + PyErr_Format(PyExc_RuntimeError, STRCAST("sent callback must be a method or None")); + return 0; + } + + if(!_ex && (_response || _sent)) + { + PyErr_Format(PyExc_RuntimeError, + STRCAST("exception callback must also be provided when response or sent callbacks are used")); + return 0; + } + + PyObject* pyctx = PyTuple_GET_ITEM(args, 4); + if(pyctx != Py_None && !PyDict_Check(pyctx)) + { + PyErr_Format(PyExc_RuntimeError, STRCAST("context must be a dictionary or None")); + return 0; + } + + // + // Marshal the input parameters to a byte sequence. + // + Ice::ByteSeq params; + if(!prepareRequest(pyparams, AsyncMapping, params)) + { + return 0; + } + + Ice::AsyncResultPtr result; + try + { + checkAsyncTwowayOnly(_prx); + pair<const Ice::Byte*, const Ice::Byte*> pparams(0, 0); + if(!params.empty()) + { + pparams.first = ¶ms[0]; + pparams.second = ¶ms[0] + params.size(); + } + + Ice::Callback_Object_ice_invokePtr cb; + if(_response || _ex || _sent) + { + cb = Ice::newCallback_Object_ice_invoke(this, &AsyncTypedInvocation::response, + &AsyncTypedInvocation::exception, &AsyncTypedInvocation::sent); + } + + // + // Invoke the operation asynchronously. + // + if(pyctx != Py_None) + { + Ice::Context ctx; + if(!dictionaryToContext(pyctx, ctx)) + { + return 0; + } + + AllowThreads allowThreads; // Release Python's global interpreter lock during remote invocations. + if(cb) + { + result = _prx->begin_ice_invoke(_op->name, _op->sendMode, pparams, ctx, cb); + } + else + { + result = _prx->begin_ice_invoke(_op->name, _op->sendMode, pparams, ctx); + } + } + else + { + AllowThreads allowThreads; // Release Python's global interpreter lock during remote invocations. + if(cb) + { + result = _prx->begin_ice_invoke(_op->name, _op->sendMode, pparams, cb); + } + else + { + result = _prx->begin_ice_invoke(_op->name, _op->sendMode, pparams); + } + } + } + catch(const Ice::CommunicatorDestroyedException& ex) + { + // + // CommunicatorDestroyedException can propagate directly. + // + setPythonException(ex); + return 0; + } + catch(const IceUtil::IllegalArgumentException& ex) + { + // + // IllegalArgumentException can propagate directly. + // (Raised by checkAsyncTwowayOnly) + // + PyErr_Format(PyExc_RuntimeError, STRCAST(ex.reason().c_str())); + return 0; + } + catch(const Ice::Exception&) + { + // + // No other exceptions should be raised by begin_ice_invoke. + // + assert(false); + } + + assert(result); + AsyncResultObject* obj = asyncResultNew(0); + if(!obj) + { + return 0; + } + obj->result = new Ice::AsyncResultPtr(result); + obj->invocation = new InvocationPtr(this); + obj->proxy = _pyProxy; + Py_INCREF(obj->proxy); + return reinterpret_cast<PyObject*>(obj); +} + +PyObject* +IcePy::AsyncTypedInvocation::end(const Ice::ObjectPrx& proxy, const OperationPtr& op, const Ice::AsyncResultPtr& r) +{ + try + { + if(op.get() != _op.get()) + { + throw IceUtil::IllegalArgumentException(__FILE__, __LINE__, "end_" + op->name + + " called with AsyncResult object from begin_" + _op->name); + } + + pair<const Ice::Byte*, const Ice::Byte*> results; + bool ok; + + { + AllowThreads allowThreads; // Release Python's global interpreter lock during blocking operations. + ok = proxy->___end_ice_invoke(results, r); + } + + if(ok) + { + // + // Unmarshal the results. + // + PyObjectHandle args = unmarshalResults(results); + if(args.get()) + { + // + // If there are no results, return None. If there's only one element + // in the tuple, return the element. Otherwise, return the tuple. + // + assert(PyTuple_Check(args.get())); + if(PyTuple_GET_SIZE(args.get()) == 0) + { + Py_INCREF(Py_None); + return Py_None; + } + else if(PyTuple_GET_SIZE(args.get()) == 1) + { + PyObject* res = PyTuple_GET_ITEM(args.get(), 0); + Py_INCREF(res); + return res; + } + else + { + return args.release(); + } + } + } + else + { + PyObjectHandle ex = unmarshalException(results); + setPythonException(ex.get()); + } + } + catch(const AbortMarshaling&) + { + // Nothing to do. + } + catch(const IceUtil::IllegalArgumentException& ex) + { + PyErr_Format(PyExc_RuntimeError, STRCAST(ex.reason().c_str())); + } + catch(const Ice::Exception& ex) + { + setPythonException(ex); + } + + assert(PyErr_Occurred()); + return 0; +} + +string +IcePy::AsyncTypedInvocation::opName() const +{ + return _op->name; +} + +void +IcePy::AsyncTypedInvocation::response(bool ok, const pair<const Ice::Byte*, const Ice::Byte*>& results) +{ + AdoptThread adoptThread; // Ensure the current thread is able to call into Python. + + try + { + if(ok) + { + if(_response) + { + // + // Unmarshal the results. + // + PyObjectHandle args; + try + { + args = unmarshalResults(results); + if(!args.get()) + { + assert(PyErr_Occurred()); + PyErr_Print(); + return; + } + } + catch(const Ice::Exception& ex) + { + assert(_ex); + callException(_ex, ex); + return; + } + + PyObjectHandle tmp = PyObject_Call(_response, args.get(), 0); + if(PyErr_Occurred()) + { + handleException(); // Callback raised an exception. + } + } + } + else + { + assert(_ex); + PyObjectHandle ex = unmarshalException(results); + callException(_ex, ex.get()); + } + } + catch(const AbortMarshaling&) + { + assert(PyErr_Occurred()); + PyErr_Print(); + } +} + +void +IcePy::AsyncTypedInvocation::exception(const Ice::Exception& ex) +{ + AdoptThread adoptThread; // Ensure the current thread is able to call into Python. + assert(_ex); + callException(_ex, ex); +} + +void +IcePy::AsyncTypedInvocation::sent(bool sentSynchronously) +{ + if(_sent) + { + AdoptThread adoptThread; // Ensure the current thread is able to call into Python. + callSent(_sent, sentSynchronously, true); + } +} + +void +IcePy::AsyncTypedInvocation::checkAsyncTwowayOnly(const Ice::ObjectPrx& proxy) const +{ + if((_op->returnType != 0 || !_op->outParams.empty() || !_op->exceptions.empty()) && !proxy->ice_isTwoway()) + { + throw IceUtil::IllegalArgumentException(__FILE__, __LINE__, + "`" + _op->name + "' can only be called with a twoway proxy"); + } + + if((_op->returnType != 0 || !_op->outParams.empty()) && (!_response && (_ex || _sent))) + { + throw IceUtil::IllegalArgumentException(__FILE__, __LINE__, "`" + _op->name + "' requires a response callback"); + } +} + +// +// OldAsyncTypedInvocation +// +IcePy::OldAsyncTypedInvocation::OldAsyncTypedInvocation(const Ice::ObjectPrx& prx, const OperationPtr& op) + : Invocation(prx), TypedInvocation(prx, op), _callback(0) +{ +} + +IcePy::OldAsyncTypedInvocation::~OldAsyncTypedInvocation() +{ + AdoptThread adoptThread; // Ensure the current thread is able to call into Python. + Py_XDECREF(_callback); } PyObject* -IcePy::AsyncTypedInvocation::invoke(PyObject* args) +IcePy::OldAsyncTypedInvocation::invoke(PyObject* args, PyObject* /* kwds */) { assert(PyTuple_Check(args)); assert(PyTuple_GET_SIZE(args) == 3); // Format is (callback, (params...), context|None) @@ -1217,12 +2059,12 @@ IcePy::AsyncTypedInvocation::invoke(PyObject* args) // Marshal the input parameters to a byte sequence. // Ice::ByteSeq params; - if(!prepareRequest(pyparams, true, params)) + if(!prepareRequest(pyparams, OldAsyncMapping, params)) { return 0; } - bool result = false; + bool sentSynchronously = false; try { checkTwowayOnly(_prx); @@ -1233,6 +2075,12 @@ IcePy::AsyncTypedInvocation::invoke(PyObject* args) pparams.second = ¶ms[0] + params.size(); } + Ice::Callback_Object_ice_invokePtr cb = + Ice::newCallback_Object_ice_invoke(this, &OldAsyncTypedInvocation::response, + &OldAsyncTypedInvocation::exception, &OldAsyncTypedInvocation::sent); + + Ice::AsyncResultPtr result; + // // Invoke the operation asynchronously. // @@ -1252,37 +2100,49 @@ IcePy::AsyncTypedInvocation::invoke(PyObject* args) } AllowThreads allowThreads; // Release Python's global interpreter lock during remote invocations. - result = _prx->ice_invoke_async(this, _op->name, _op->sendMode, pparams, ctx); + result = _prx->begin_ice_invoke(_op->name, _op->sendMode, pparams, ctx, cb); } else { AllowThreads allowThreads; // Release Python's global interpreter lock during remote invocations. - result = _prx->ice_invoke_async(this, _op->name, _op->sendMode, pparams); + result = _prx->begin_ice_invoke(_op->name, _op->sendMode, pparams, cb); } + + sentSynchronously = result->sentSynchronously(); } catch(const Ice::CommunicatorDestroyedException& ex) { // - // CommunicatorDestroyedException is the only exception that can propagate directly. + // CommunicatorDestroyedException can propagate directly. // setPythonException(ex); return 0; } - catch(const Ice::Exception& ex) + catch(const Ice::TwowayOnlyException& ex) + { + // + // Raised by checkTwowayOnly. + // + callException(_callback, _op->name, "ice_exception", ex); + } + catch(const Ice::Exception&) { - PyObjectHandle exh = convertException(ex); - assert(exh.get()); - handleException(exh.get()); + // + // No other exceptions should be raised by begin_ice_invoke. + // + assert(false); } - PyRETURN_BOOL(result); + PyRETURN_BOOL(sentSynchronously); } void -IcePy::AsyncTypedInvocation::ice_response(bool ok, const pair<const Ice::Byte*, const Ice::Byte*>& results) +IcePy::OldAsyncTypedInvocation::response(bool ok, const pair<const Ice::Byte*, const Ice::Byte*>& results) { AdoptThread adoptThread; // Ensure the current thread is able to call into Python. + assert(_callback); + try { if(ok) @@ -1303,32 +2163,34 @@ IcePy::AsyncTypedInvocation::ice_response(bool ok, const pair<const Ice::Byte*, } catch(const Ice::Exception& ex) { - PyObjectHandle h = convertException(ex); - handleException(h.get()); + callException(_callback, _op->name, "ice_exception", ex); return; } - PyObjectHandle method = PyObject_GetAttrString(_callback, STRCAST("ice_response")); - if(!method.get()) + const string methodName = "ice_response"; + if(!PyObject_HasAttrString(_callback, STRCAST(methodName.c_str()))) { ostringstream ostr; - ostr << "AMI callback object for operation `" << _op->name << "' does not define ice_response()"; + ostr << "AMI callback object for operation `" << _op->name << "' does not define " << methodName + << "()"; string str = ostr.str(); PyErr_Warn(PyExc_RuntimeWarning, const_cast<char*>(str.c_str())); } else { + PyObjectHandle method = PyObject_GetAttrString(_callback, STRCAST(methodName.c_str())); + assert(method.get()); PyObjectHandle tmp = PyObject_Call(method.get(), args.get(), 0); if(PyErr_Occurred()) { - PyErr_Print(); + handleException(); // Callback raised an exception. } } } else { PyObjectHandle ex = unmarshalException(results); - handleException(ex.get()); + callException(_callback, _op->name, "ice_exception", ex.get()); } } catch(const AbortMarshaling&) @@ -1336,78 +2198,22 @@ IcePy::AsyncTypedInvocation::ice_response(bool ok, const pair<const Ice::Byte*, assert(PyErr_Occurred()); PyErr_Print(); } - catch(const Ice::Exception& ex) - { - ostringstream ostr; - ostr << "Exception raised by AMI callback for operation `" << _op->name << "':" << ex; - string str = ostr.str(); - PyErr_Warn(PyExc_RuntimeWarning, const_cast<char*>(str.c_str())); - } } void -IcePy::AsyncTypedInvocation::ice_exception(const Ice::Exception& ex) +IcePy::OldAsyncTypedInvocation::exception(const Ice::Exception& ex) { AdoptThread adoptThread; // Ensure the current thread is able to call into Python. - PyObjectHandle exh = convertException(ex); - assert(exh.get()); - - handleException(exh.get()); + callException(_callback, _op->name, "ice_exception", ex); } void -IcePy::AsyncTypedInvocation::handleException(PyObject* ex) -{ - PyObjectHandle method = PyObject_GetAttrString(_callback, STRCAST("ice_exception")); - if(!method.get()) - { - ostringstream ostr; - ostr << "AMI callback object for operation `" << _op->name << "' does not define ice_exception()"; - string str = ostr.str(); - PyErr_Warn(PyExc_RuntimeWarning, const_cast<char*>(str.c_str())); - } - else - { - PyObjectHandle args = Py_BuildValue(STRCAST("(O)"), ex); - PyObjectHandle tmp = PyObject_Call(method.get(), args.get(), 0); - if(PyErr_Occurred()) - { - PyErr_Print(); - } - } -} - -// -// AsyncSentTypedInvocation -// -IcePy::AsyncSentTypedInvocation::AsyncSentTypedInvocation(const Ice::ObjectPrx& prx, const OperationPtr& op) - : Invocation(prx), TypedInvocation(prx, op), AsyncTypedInvocation(prx, op) -{ -} - -void -IcePy::AsyncSentTypedInvocation::ice_sent() +IcePy::OldAsyncTypedInvocation::sent(bool) { AdoptThread adoptThread; // Ensure the current thread is able to call into Python. - PyObjectHandle method = PyObject_GetAttrString(_callback, STRCAST("ice_sent")); - if(!method.get()) - { - ostringstream ostr; - ostr << "AMI callback object for operation `" << _op->name << "' does not define ice_sent()"; - string str = ostr.str(); - PyErr_Warn(PyExc_RuntimeWarning, const_cast<char*>(str.c_str())); - } - else - { - PyObjectHandle args = PyTuple_New(0); - PyObjectHandle tmp = PyObject_Call(method.get(), args.get(), 0); - if(PyErr_Occurred()) - { - PyErr_Print(); - } - } + callSent(_callback, "ice_sent", false, false); } // @@ -1419,7 +2225,7 @@ IcePy::SyncBlobjectInvocation::SyncBlobjectInvocation(const Ice::ObjectPrx& prx) } PyObject* -IcePy::SyncBlobjectInvocation::invoke(PyObject* args) +IcePy::SyncBlobjectInvocation::invoke(PyObject* args, PyObject* /* kwds */) { char* operation; PyObject* mode; @@ -1525,20 +2331,357 @@ IcePy::SyncBlobjectInvocation::invoke(PyObject* args) // // AsyncBlobjectInvocation // -IcePy::AsyncBlobjectInvocation::AsyncBlobjectInvocation(const Ice::ObjectPrx& prx) - : Invocation(prx), _callback(0) +IcePy::AsyncBlobjectInvocation::AsyncBlobjectInvocation(const Ice::ObjectPrx& prx, PyObject* pyProxy) : + Invocation(prx), _pyProxy(pyProxy), _response(0), _ex(0), _sent(0) { + Py_INCREF(_pyProxy); } IcePy::AsyncBlobjectInvocation::~AsyncBlobjectInvocation() { AdoptThread adoptThread; // Ensure the current thread is able to call into Python. + Py_DECREF(_pyProxy); + Py_XDECREF(_response); + Py_XDECREF(_ex); + Py_XDECREF(_sent); +} + +PyObject* +IcePy::AsyncBlobjectInvocation::invoke(PyObject* args, PyObject* kwds) +{ + static char* argNames[] = + { + const_cast<char*>("op"), + const_cast<char*>("mode"), + const_cast<char*>("inParams"), + const_cast<char*>("_response"), + const_cast<char*>("_ex"), + const_cast<char*>("_sent"), + const_cast<char*>("_ctx"), + 0 + }; + char* operation; + PyObject* mode; + PyObject* inParams; + PyObject* operationModeType = lookupType("Ice.OperationMode"); + PyObject* response = Py_None; + PyObject* ex = Py_None; + PyObject* sent = Py_None; + PyObject* pyctx = Py_None; + if(!PyArg_ParseTupleAndKeywords(args, kwds, STRCAST("sO!O!|OOOO"), argNames, &operation, operationModeType, &mode, + &PyBuffer_Type, &inParams, &response, &ex, &sent, &pyctx)) + { + return 0; + } + + _op = operation; + + PyObjectHandle modeValue = PyObject_GetAttrString(mode, STRCAST("value")); + Ice::OperationMode sendMode = (Ice::OperationMode)static_cast<int>(PyInt_AS_LONG(modeValue.get())); + + if(PyMethod_Check(response)) + { + _response = response; + Py_INCREF(_response); + } + else if(response != Py_None) + { + PyErr_Format(PyExc_RuntimeError, STRCAST("response callback must be a method or None")); + return 0; + } + + if(PyMethod_Check(ex)) + { + _ex = ex; + Py_INCREF(_ex); + } + else if(ex != Py_None) + { + PyErr_Format(PyExc_RuntimeError, STRCAST("exception callback must be a method or None")); + return 0; + } + + if(PyMethod_Check(sent)) + { + _sent = sent; + Py_INCREF(_sent); + } + else if(sent != Py_None) + { + PyErr_Format(PyExc_RuntimeError, STRCAST("sent callback must be a method or None")); + return 0; + } + + if(!_ex && (_response || _sent)) + { + PyErr_Format(PyExc_RuntimeError, + STRCAST("exception callback must also be provided when response or sent callbacks are used")); + return 0; + } + + if(pyctx != Py_None && !PyDict_Check(pyctx)) + { + PyErr_Format(PyExc_RuntimeError, STRCAST("context must be a dictionary or None")); + return 0; + } + + // + // Use the array API to avoid copying the data. + // +#if PY_VERSION_HEX < 0x02050000 + const char* charBuf = 0; +#else + char* charBuf = 0; +#endif + Py_ssize_t sz = inParams->ob_type->tp_as_buffer->bf_getcharbuffer(inParams, 0, &charBuf); + const Ice::Byte* mem = reinterpret_cast<const Ice::Byte*>(charBuf); + pair<const ::Ice::Byte*, const ::Ice::Byte*> in(0, 0); + if(sz > 0) + { + in.first = mem; + in.second = mem + sz; + } + + Ice::AsyncResultPtr result; + try + { + Ice::Callback_Object_ice_invokePtr cb; + if(_response || _ex || _sent) + { + cb = Ice::newCallback_Object_ice_invoke(this, &AsyncBlobjectInvocation::response, + &AsyncBlobjectInvocation::exception, + &AsyncBlobjectInvocation::sent); + } + + if(pyctx == Py_None) + { + AllowThreads allowThreads; // Release Python's global interpreter lock during remote invocations. + if(cb) + { + result = _prx->begin_ice_invoke(operation, sendMode, in, cb); + } + else + { + result = _prx->begin_ice_invoke(operation, sendMode, in); + } + } + else + { + Ice::Context context; + if(!dictionaryToContext(pyctx, context)) + { + return 0; + } + + AllowThreads allowThreads; // Release Python's global interpreter lock during remote invocations. + if(cb) + { + result = _prx->begin_ice_invoke(operation, sendMode, in, context, cb); + } + else + { + result = _prx->begin_ice_invoke(operation, sendMode, in, context); + } + } + } + catch(const Ice::CommunicatorDestroyedException& ex) + { + // + // CommunicatorDestroyedException is the only exception that can propagate directly. + // + setPythonException(ex); + return 0; + } + catch(const Ice::Exception&) + { + // + // No other exceptions should be raised by begin_ice_invoke. + // + assert(false); + } + + assert(result); + AsyncResultObject* obj = asyncResultNew(0); + if(!obj) + { + return 0; + } + obj->result = new Ice::AsyncResultPtr(result); + obj->invocation = new InvocationPtr(this); + obj->proxy = _pyProxy; + Py_INCREF(obj->proxy); + return reinterpret_cast<PyObject*>(obj); +} + +PyObject* +IcePy::AsyncBlobjectInvocation::end(const Ice::ObjectPrx& proxy, const Ice::AsyncResultPtr& r) +{ + try + { + pair<const Ice::Byte*, const Ice::Byte*> results; + bool ok; + + { + AllowThreads allowThreads; // Release Python's global interpreter lock during blocking operations. + ok = proxy->___end_ice_invoke(results, r); + } + + // + // Prepare the results as a tuple of the bool and out param buffer. + // + PyObjectHandle args = PyTuple_New(2); + if(!args.get()) + { + return 0; + } + + if(PyTuple_SET_ITEM(args.get(), 0, ok ? getTrue() : getFalse()) < 0) + { + return 0; + } + + // + // Create the output buffer and copy in the outParams. + // + PyObjectHandle ip = PyBuffer_New(results.second - results.first); + if(!ip.get()) + { + return 0; + } + + void* buf; + Py_ssize_t sz; + if(PyObject_AsWriteBuffer(ip.get(), &buf, &sz)) + { + return 0; + } + assert(sz == results.second - results.first); + memcpy(buf, results.first, sz); + + if(PyTuple_SET_ITEM(args.get(), 1, ip.get()) < 0) + { + return 0; + } + ip.release(); // PyTuple_SET_ITEM steals a reference. + + return args.release(); + } + catch(const AbortMarshaling&) + { + // Nothing to do. + } + catch(const IceUtil::IllegalArgumentException& ex) + { + PyErr_Format(PyExc_RuntimeError, STRCAST(ex.reason().c_str())); + } + catch(const Ice::Exception& ex) + { + setPythonException(ex); + } + + assert(PyErr_Occurred()); + return 0; +} + +void +IcePy::AsyncBlobjectInvocation::response(bool ok, const pair<const Ice::Byte*, const Ice::Byte*>& results) +{ + if(_response) + { + AdoptThread adoptThread; // Ensure the current thread is able to call into Python. + + // + // Prepare the args as a tuple of the bool and out param buffer. + // + PyObjectHandle args = PyTuple_New(2); + if(!args.get()) + { + assert(PyErr_Occurred()); + PyErr_Print(); + return; + } + + if(PyTuple_SET_ITEM(args.get(), 0, ok ? getTrue() : getFalse()) < 0) + { + assert(PyErr_Occurred()); + PyErr_Print(); + return; + } + + // + // Create the output buffer and copy in the outParams. + // + PyObjectHandle ip = PyBuffer_New(results.second - results.first); + if(!ip.get()) + { + assert(PyErr_Occurred()); + PyErr_Print(); + return; + } + + void* buf; + Py_ssize_t sz; + if(PyObject_AsWriteBuffer(ip.get(), &buf, &sz)) + { + assert(PyErr_Occurred()); + PyErr_Print(); + return; + } + assert(sz == results.second - results.first); + memcpy(buf, results.first, sz); + + if(PyTuple_SET_ITEM(args.get(), 1, ip.get()) < 0) + { + assert(PyErr_Occurred()); + PyErr_Print(); + return; + } + ip.release(); // PyTuple_SET_ITEM steals a reference. + + PyObjectHandle tmp = PyObject_Call(_response, args.get(), 0); + if(PyErr_Occurred()) + { + handleException(); // Callback raised an exception. + } + } +} + +void +IcePy::AsyncBlobjectInvocation::exception(const Ice::Exception& ex) +{ + AdoptThread adoptThread; // Ensure the current thread is able to call into Python. + assert(_ex); + callException(_ex, ex); +} + +void +IcePy::AsyncBlobjectInvocation::sent(bool sentSynchronously) +{ + if(_sent) + { + AdoptThread adoptThread; // Ensure the current thread is able to call into Python. + callSent(_sent, sentSynchronously, true); + } +} + +// +// OldAsyncBlobjectInvocation +// +IcePy::OldAsyncBlobjectInvocation::OldAsyncBlobjectInvocation(const Ice::ObjectPrx& prx) : + Invocation(prx), _callback(0) +{ +} + +IcePy::OldAsyncBlobjectInvocation::~OldAsyncBlobjectInvocation() +{ + AdoptThread adoptThread; // Ensure the current thread is able to call into Python. + Py_XDECREF(_callback); } PyObject* -IcePy::AsyncBlobjectInvocation::invoke(PyObject* args) +IcePy::OldAsyncBlobjectInvocation::invoke(PyObject* args, PyObject* /* kwds */) { char* operation; PyObject* mode; @@ -1574,13 +2717,19 @@ IcePy::AsyncBlobjectInvocation::invoke(PyObject* args) in.second = mem + sz; } - bool result = false; + bool sentSynchronously = false; try { + Ice::AsyncResultPtr result; + Ice::Callback_Object_ice_invokePtr cb = + Ice::newCallback_Object_ice_invoke(this, &OldAsyncBlobjectInvocation::response, + &OldAsyncBlobjectInvocation::exception, + &OldAsyncBlobjectInvocation::sent); + if(ctx == 0 || ctx == Py_None) { AllowThreads allowThreads; // Release Python's global interpreter lock during remote invocations. - result = _prx->ice_invoke_async(this, operation, sendMode, in); + result = _prx->begin_ice_invoke(operation, sendMode, in, cb); } else { @@ -1591,8 +2740,10 @@ IcePy::AsyncBlobjectInvocation::invoke(PyObject* args) } AllowThreads allowThreads; // Release Python's global interpreter lock during remote invocations. - result = _prx->ice_invoke_async(this, operation, sendMode, in, context); + result = _prx->begin_ice_invoke(operation, sendMode, in, context, cb); } + + sentSynchronously = result->sentSynchronously(); } catch(const Ice::CommunicatorDestroyedException& ex) { @@ -1602,18 +2753,19 @@ IcePy::AsyncBlobjectInvocation::invoke(PyObject* args) setPythonException(ex); return 0; } - catch(const Ice::Exception& ex) + catch(const Ice::Exception&) { - PyObjectHandle exh = convertException(ex); - assert(exh.get()); - handleException(exh.get()); + // + // No other exceptions should be raised by begin_ice_invoke. + // + assert(false); } - PyRETURN_BOOL(result); + PyRETURN_BOOL(sentSynchronously); } void -IcePy::AsyncBlobjectInvocation::ice_response(bool ok, const pair<const Ice::Byte*, const Ice::Byte*>& results) +IcePy::OldAsyncBlobjectInvocation::response(bool ok, const pair<const Ice::Byte*, const Ice::Byte*>& results) { AdoptThread adoptThread; // Ensure the current thread is able to call into Python. @@ -1667,20 +2819,22 @@ IcePy::AsyncBlobjectInvocation::ice_response(bool ok, const pair<const Ice::Byte } ip.release(); // PyTuple_SET_ITEM steals a reference. - PyObjectHandle method = PyObject_GetAttrString(_callback, STRCAST("ice_response")); - if(!method.get()) + const string methodName = "ice_response"; + if(!PyObject_HasAttrString(_callback, STRCAST(methodName.c_str()))) { ostringstream ostr; - ostr << "AMI callback object for operation `ice_invoke_async' does not define ice_response()"; + ostr << "AMI callback object for operation `ice_invoke_async' does not define " << methodName << "()"; string str = ostr.str(); PyErr_Warn(PyExc_RuntimeWarning, const_cast<char*>(str.c_str())); } else { + PyObjectHandle method = PyObject_GetAttrString(_callback, STRCAST(methodName.c_str())); + assert(method.get()); PyObjectHandle tmp = PyObject_Call(method.get(), args.get(), 0); if(PyErr_Occurred()) { - PyErr_Print(); + handleException(); // Callback raised an exception. } } } @@ -1694,68 +2848,19 @@ IcePy::AsyncBlobjectInvocation::ice_response(bool ok, const pair<const Ice::Byte } void -IcePy::AsyncBlobjectInvocation::ice_exception(const Ice::Exception& ex) +IcePy::OldAsyncBlobjectInvocation::exception(const Ice::Exception& ex) { AdoptThread adoptThread; // Ensure the current thread is able to call into Python. - PyObjectHandle exh = convertException(ex); - assert(exh.get()); - - handleException(exh.get()); -} - -void -IcePy::AsyncBlobjectInvocation::handleException(PyObject* ex) -{ - PyObjectHandle method = PyObject_GetAttrString(_callback, STRCAST("ice_exception")); - if(!method.get()) - { - ostringstream ostr; - ostr << "AMI callback object for operation `" << _op << "' does not define ice_exception()"; - string str = ostr.str(); - PyErr_Warn(PyExc_RuntimeWarning, const_cast<char*>(str.c_str())); - } - else - { - PyObjectHandle args = Py_BuildValue(STRCAST("(O)"), ex); - PyObjectHandle tmp = PyObject_Call(method.get(), args.get(), 0); - if(PyErr_Occurred()) - { - PyErr_Print(); - } - } -} - -// -// AsyncSentBlobjectInvocation -// -IcePy::AsyncSentBlobjectInvocation::AsyncSentBlobjectInvocation(const Ice::ObjectPrx& prx) - : Invocation(prx), AsyncBlobjectInvocation(prx) -{ + callException(_callback, "ice_invoke", "ice_exception", ex); } void -IcePy::AsyncSentBlobjectInvocation::ice_sent() +IcePy::OldAsyncBlobjectInvocation::sent(bool) { AdoptThread adoptThread; // Ensure the current thread is able to call into Python. - PyObjectHandle method = PyObject_GetAttrString(_callback, STRCAST("ice_sent")); - if(!method.get()) - { - ostringstream ostr; - ostr << "AMI callback object for ice_invoke_async does not define ice_sent()"; - string str = ostr.str(); - PyErr_Warn(PyExc_RuntimeWarning, const_cast<char*>(str.c_str())); - } - else - { - PyObjectHandle args = PyTuple_New(0); - PyObjectHandle tmp = PyObject_Call(method.get(), args.get(), 0); - if(PyErr_Occurred()) - { - PyErr_Print(); - } - } + callSent(_callback, "ice_sent", false, false); } // @@ -2269,90 +3374,171 @@ IcePy::BlobjectUpcall::exception(PyException& ex) } PyObject* -IcePy::iceIsA(const Ice::ObjectPrx& prx, PyObject* args) +IcePy::invokeBuiltin(PyObject* proxy, const string& builtin, PyObject* args) { + string name = "_op_" + builtin; PyObject* objectType = lookupType("Ice.Object"); assert(objectType); - PyObjectHandle obj = PyObject_GetAttrString(objectType, "_op_ice_isA"); + PyObjectHandle obj = PyObject_GetAttrString(objectType, STRCAST(name.c_str())); assert(obj.get()); OperationPtr op = getOperation(obj.get()); assert(op); - InvocationPtr i = new SyncTypedInvocation(prx, op); + Ice::ObjectPrx p = getProxy(proxy); + InvocationPtr i = new SyncTypedInvocation(p, op); return i->invoke(args); } PyObject* -IcePy::icePing(const Ice::ObjectPrx& prx, PyObject* args) +IcePy::beginBuiltin(PyObject* proxy, const string& builtin, PyObject* args) { + string name = "_op_" + builtin; PyObject* objectType = lookupType("Ice.Object"); assert(objectType); - PyObjectHandle obj = PyObject_GetAttrString(objectType, "_op_ice_ping"); + PyObjectHandle obj = PyObject_GetAttrString(objectType, STRCAST(name.c_str())); assert(obj.get()); OperationPtr op = getOperation(obj.get()); assert(op); - InvocationPtr i = new SyncTypedInvocation(prx, op); + Ice::ObjectPrx p = getProxy(proxy); + InvocationPtr i = new AsyncTypedInvocation(p, proxy, op); return i->invoke(args); } PyObject* -IcePy::iceIds(const Ice::ObjectPrx& prx, PyObject* args) +IcePy::endBuiltin(PyObject* proxy, const string& builtin, PyObject* args) { + PyObject* result; + if(!PyArg_ParseTuple(args, STRCAST("O!"), &AsyncResultType, &result)) + { + return 0; + } + + string name = "_op_" + builtin; PyObject* objectType = lookupType("Ice.Object"); assert(objectType); - PyObjectHandle obj = PyObject_GetAttrString(objectType, "_op_ice_ids"); + PyObjectHandle obj = PyObject_GetAttrString(objectType, STRCAST(name.c_str())); assert(obj.get()); OperationPtr op = getOperation(obj.get()); assert(op); - InvocationPtr i = new SyncTypedInvocation(prx, op); - return i->invoke(args); + AsyncResultObject* ar = reinterpret_cast<AsyncResultObject*>(result); + assert(ar); + AsyncTypedInvocationPtr i = AsyncTypedInvocationPtr::dynamicCast(*ar->invocation); + if(!i) + { + PyErr_Format(PyExc_ValueError, STRCAST("invalid AsyncResult object passed to end_%s"), op->name.c_str()); + return 0; + } + Ice::ObjectPrx p = getProxy(proxy); + return i->end(p, op, *ar->result); } PyObject* -IcePy::iceId(const Ice::ObjectPrx& prx, PyObject* args) +IcePy::iceInvoke(PyObject* proxy, PyObject* args) { - PyObject* objectType = lookupType("Ice.Object"); - assert(objectType); - PyObjectHandle obj = PyObject_GetAttrString(objectType, "_op_ice_id"); - assert(obj.get()); - - OperationPtr op = getOperation(obj.get()); - assert(op); - - InvocationPtr i = new SyncTypedInvocation(prx, op); + Ice::ObjectPrx p = getProxy(proxy); + InvocationPtr i = new SyncBlobjectInvocation(p); return i->invoke(args); } PyObject* -IcePy::iceInvoke(const Ice::ObjectPrx& prx, PyObject* args) +IcePy::iceInvokeAsync(PyObject* proxy, PyObject* args) { - InvocationPtr i = new SyncBlobjectInvocation(prx); + Ice::ObjectPrx p = getProxy(proxy); + InvocationPtr i = new OldAsyncBlobjectInvocation(p); return i->invoke(args); } PyObject* -IcePy::iceInvokeAsync(const Ice::ObjectPrx& prx, PyObject* args) +IcePy::beginIceInvoke(PyObject* proxy, PyObject* args, PyObject* kwds) { - // - // If the callback implements an ice_sent method, we create a wrapper that derives - // from AMISentCallback. - // - assert(PyTuple_GET_SIZE(args) > 0); - PyObject* callback = PyTuple_GET_ITEM(args, 0); - if(PyObject_HasAttrString(callback, STRCAST("ice_sent"))) + Ice::ObjectPrx p = getProxy(proxy); + InvocationPtr i = new AsyncBlobjectInvocation(p, proxy); + return i->invoke(args, kwds); +} + +PyObject* +IcePy::endIceInvoke(PyObject* proxy, PyObject* args) +{ + PyObject* result; + if(!PyArg_ParseTuple(args, STRCAST("O!"), &AsyncResultType, &result)) { - InvocationPtr i = new AsyncSentBlobjectInvocation(prx); - return i->invoke(args); + return 0; } - else + + AsyncResultObject* ar = reinterpret_cast<AsyncResultObject*>(result); + assert(ar); + AsyncBlobjectInvocationPtr i = AsyncBlobjectInvocationPtr::dynamicCast(*ar->invocation); + if(!i) + { + PyErr_Format(PyExc_ValueError, STRCAST("invalid AsyncResult object passed to end_ice_invoke")); + return 0; + } + Ice::ObjectPrx p = getProxy(proxy); + return i->end(p, *ar->result); +} + +PyObject* +IcePy::createAsyncResult(const Ice::AsyncResultPtr& r, PyObject* proxy, PyObject* connection, PyObject* communicator) +{ + AsyncResultObject* obj = asyncResultNew(0); + if(!obj) + { + return 0; + } + obj->result = new Ice::AsyncResultPtr(r); + obj->proxy = proxy; + Py_XINCREF(obj->proxy); + obj->connection = connection; + Py_XINCREF(obj->connection); + obj->communicator = communicator; + Py_XINCREF(obj->communicator); + return reinterpret_cast<PyObject*>(obj); +} + +Ice::AsyncResultPtr +IcePy::getAsyncResult(PyObject* p) +{ + assert(PyObject_IsInstance(p, reinterpret_cast<PyObject*>(&AsyncResultType)) == 1); + AsyncResultObject* obj = reinterpret_cast<AsyncResultObject*>(p); + return *obj->result; +} + +IcePy::FlushCallback::FlushCallback(PyObject* ex, PyObject* sent, const string& op) : + _ex(ex), _sent(sent), _op(op) +{ + assert(_ex); + Py_INCREF(_ex); + Py_XINCREF(_sent); +} + +IcePy::FlushCallback::~FlushCallback() +{ + AdoptThread adoptThread; // Ensure the current thread is able to call into Python. + + Py_DECREF(_ex); + Py_XDECREF(_sent); +} + +void +IcePy::FlushCallback::exception(const Ice::Exception& ex) +{ + AdoptThread adoptThread; // Ensure the current thread is able to call into Python. + + callException(_ex, ex); +} + +void +IcePy::FlushCallback::sent(bool sentSynchronously) +{ + if(_sent) { - InvocationPtr i = new AsyncBlobjectInvocation(prx); - return i->invoke(args); + AdoptThread adoptThread; // Ensure the current thread is able to call into Python. + callSent(_sent, sentSynchronously, true); } } diff --git a/py/modules/IcePy/Operation.h b/py/modules/IcePy/Operation.h index 89a78c1f568..779e7876e14 100644 --- a/py/modules/IcePy/Operation.h +++ b/py/modules/IcePy/Operation.h @@ -13,6 +13,7 @@ #include <Config.h> #include <Ice/Current.h> #include <Ice/Object.h> +#include <Ice/OutgoingAsyncF.h> namespace IcePy { @@ -22,16 +23,42 @@ bool initOperation(PyObject*); // // Builtin operations. // -PyObject* iceIsA(const Ice::ObjectPrx&, PyObject*); -PyObject* icePing(const Ice::ObjectPrx&, PyObject*); -PyObject* iceIds(const Ice::ObjectPrx&, PyObject*); -PyObject* iceId(const Ice::ObjectPrx&, PyObject*); +PyObject* invokeBuiltin(PyObject*, const std::string&, PyObject*); +PyObject* beginBuiltin(PyObject*, const std::string&, PyObject*); +PyObject* endBuiltin(PyObject*, const std::string&, PyObject*); // // Blobject invocations. // -PyObject* iceInvoke(const Ice::ObjectPrx&, PyObject*); -PyObject* iceInvokeAsync(const Ice::ObjectPrx&, PyObject*); +PyObject* iceInvoke(PyObject*, PyObject*); +PyObject* iceInvokeAsync(PyObject*, PyObject*); +PyObject* beginIceInvoke(PyObject*, PyObject*, PyObject*); +PyObject* endIceInvoke(PyObject*, PyObject*); + +extern PyTypeObject AsyncResultType; +PyObject* createAsyncResult(const Ice::AsyncResultPtr&, PyObject*, PyObject*, PyObject*); +Ice::AsyncResultPtr getAsyncResult(PyObject*); + +// +// Used as the callback for the various flushBatchRequest operations. +// +class FlushCallback : public IceUtil::Shared +{ +public: + + FlushCallback(PyObject*, PyObject*, const std::string&); + ~FlushCallback(); + + void exception(const Ice::Exception&); + void sent(bool); + +protected: + + PyObject* _ex; + PyObject* _sent; + std::string _op; +}; +typedef IceUtil::Handle<FlushCallback> FlushCallbackPtr; // // ServantWrapper handles dispatching to a Python servant. diff --git a/py/modules/IcePy/Proxy.cpp b/py/modules/IcePy/Proxy.cpp index 36aea04dece..94f412a436a 100644 --- a/py/modules/IcePy/Proxy.cpp +++ b/py/modules/IcePy/Proxy.cpp @@ -155,7 +155,51 @@ proxyIceIsA(ProxyObject* self, PyObject* args) // PyObjectHandle newArgs = Py_BuildValue(STRCAST("((O), O)"), type, ctx); - return iceIsA(*self->proxy, newArgs.get()); + return invokeBuiltin(reinterpret_cast<PyObject*>(self), "ice_isA", newArgs.get()); +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* +proxyBeginIceIsA(ProxyObject* self, PyObject* args, PyObject* kwds) +{ + static char* argNames[] = + { + const_cast<char*>("type"), + const_cast<char*>("_response"), + const_cast<char*>("_ex"), + const_cast<char*>("_sent"), + const_cast<char*>("_ctx"), + 0 + }; + PyObject* type; + PyObject* response = Py_None; + PyObject* ex = Py_None; + PyObject* sent = Py_None; + PyObject* ctx = Py_None; + if(!PyArg_ParseTupleAndKeywords(args, kwds, STRCAST("O|OOOO"), argNames, &type, &response, &ex, &sent, &ctx)) + { + return 0; + } + + // + // We need to reformat the arguments to match what is used by the generated code: + // + // ((params...), response|None, ex|None, sent|None, ctx|None) + // + PyObjectHandle newArgs = Py_BuildValue(STRCAST("((O), O, O, O, O)"), type, response, ex, sent, ctx); + + return beginBuiltin(reinterpret_cast<PyObject*>(self), "ice_isA", newArgs.get()); +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* +proxyEndIceIsA(ProxyObject* self, PyObject* args) +{ + return endBuiltin(reinterpret_cast<PyObject*>(self), "ice_isA", args); } #ifdef WIN32 @@ -175,7 +219,49 @@ proxyIcePing(ProxyObject* self, PyObject* args) // PyObjectHandle newArgs = Py_BuildValue(STRCAST("((), O)"), ctx); - return icePing(*self->proxy, newArgs.get()); + return invokeBuiltin(reinterpret_cast<PyObject*>(self), "ice_ping", newArgs.get()); +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* +proxyBeginIcePing(ProxyObject* self, PyObject* args, PyObject* kwds) +{ + static char* argNames[] = + { + const_cast<char*>("_response"), + const_cast<char*>("_ex"), + const_cast<char*>("_sent"), + const_cast<char*>("_ctx"), + 0 + }; + PyObject* response = Py_None; + PyObject* ex = Py_None; + PyObject* sent = Py_None; + PyObject* ctx = Py_None; + if(!PyArg_ParseTupleAndKeywords(args, kwds, STRCAST("|OOOO"), argNames, &response, &ex, &sent, &ctx)) + { + return 0; + } + + // + // We need to reformat the arguments to match what is used by the generated code: + // + // ((params...), response|None, ex|None, sent|None, ctx|None) + // + PyObjectHandle newArgs = Py_BuildValue(STRCAST("((), O, O, O, O)"), response, ex, sent, ctx); + + return beginBuiltin(reinterpret_cast<PyObject*>(self), "ice_ping", newArgs.get()); +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* +proxyEndIcePing(ProxyObject* self, PyObject* args) +{ + return endBuiltin(reinterpret_cast<PyObject*>(self), "ice_ping", args); } #ifdef WIN32 @@ -195,7 +281,49 @@ proxyIceIds(ProxyObject* self, PyObject* args) // PyObjectHandle newArgs = Py_BuildValue(STRCAST("((), O)"), ctx); - return iceIds(*self->proxy, newArgs.get()); + return invokeBuiltin(reinterpret_cast<PyObject*>(self), "ice_ids", newArgs.get()); +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* +proxyBeginIceIds(ProxyObject* self, PyObject* args, PyObject* kwds) +{ + static char* argNames[] = + { + const_cast<char*>("_response"), + const_cast<char*>("_ex"), + const_cast<char*>("_sent"), + const_cast<char*>("_ctx"), + 0 + }; + PyObject* response = Py_None; + PyObject* ex = Py_None; + PyObject* sent = Py_None; + PyObject* ctx = Py_None; + if(!PyArg_ParseTupleAndKeywords(args, kwds, STRCAST("|OOOO"), argNames, &response, &ex, &sent, &ctx)) + { + return 0; + } + + // + // We need to reformat the arguments to match what is used by the generated code: + // + // ((params...), response|None, ex|None, sent|None, ctx|None) + // + PyObjectHandle newArgs = Py_BuildValue(STRCAST("((), O, O, O, O)"), response, ex, sent, ctx); + + return beginBuiltin(reinterpret_cast<PyObject*>(self), "ice_ids", newArgs.get()); +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* +proxyEndIceIds(ProxyObject* self, PyObject* args) +{ + return endBuiltin(reinterpret_cast<PyObject*>(self), "ice_ids", args); } #ifdef WIN32 @@ -215,7 +343,49 @@ proxyIceId(ProxyObject* self, PyObject* args) // PyObjectHandle newArgs = Py_BuildValue(STRCAST("((), O)"), ctx); - return iceId(*self->proxy, newArgs.get()); + return invokeBuiltin(reinterpret_cast<PyObject*>(self), "ice_id", newArgs.get()); +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* +proxyBeginIceId(ProxyObject* self, PyObject* args, PyObject* kwds) +{ + static char* argNames[] = + { + const_cast<char*>("_response"), + const_cast<char*>("_ex"), + const_cast<char*>("_sent"), + const_cast<char*>("_ctx"), + 0 + }; + PyObject* response = Py_None; + PyObject* ex = Py_None; + PyObject* sent = Py_None; + PyObject* ctx = Py_None; + if(!PyArg_ParseTupleAndKeywords(args, kwds, STRCAST("|OOOO"), argNames, &response, &ex, &sent, &ctx)) + { + return 0; + } + + // + // We need to reformat the arguments to match what is used by the generated code: + // + // ((params...), response|None, ex|None, sent|None, ctx|None) + // + PyObjectHandle newArgs = Py_BuildValue(STRCAST("((), O, O, O, O)"), response, ex, sent, ctx); + + return beginBuiltin(reinterpret_cast<PyObject*>(self), "ice_id", newArgs.get()); +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* +proxyEndIceId(ProxyObject* self, PyObject* args) +{ + return endBuiltin(reinterpret_cast<PyObject*>(self), "ice_id", args); } #ifdef WIN32 @@ -1386,6 +1556,8 @@ extern "C" static PyObject* proxyIceFlushBatchRequests(ProxyObject* self) { + AllowThreads allowThreads; // Release Python's global interpreter lock during remote invocations. + assert(self->proxy); try @@ -1402,30 +1574,120 @@ proxyIceFlushBatchRequests(ProxyObject* self) return Py_None; } +#ifdef WIN32 +extern "C" +#endif +static PyObject* +proxyBeginIceFlushBatchRequests(ProxyObject* self, PyObject* args, PyObject* kwds) +{ + assert(self->proxy); + + static char* argNames[] = + { + const_cast<char*>("_ex"), + const_cast<char*>("_sent"), + 0 + }; + PyObject* ex = Py_None; + PyObject* sent = Py_None; + if(!PyArg_ParseTupleAndKeywords(args, kwds, STRCAST("|OO"), argNames, &ex, &sent)) + { + return 0; + } + + if(ex == Py_None) + { + ex = 0; + } + if(sent == Py_None) + { + sent = 0; + } + + if(!ex && sent) + { + PyErr_Format(PyExc_RuntimeError, + STRCAST("exception callback must also be provided when sent callback is used")); + return 0; + } + + Ice::Callback_Object_ice_flushBatchRequestsPtr cb; + if(ex || sent) + { + FlushCallbackPtr d = new FlushCallback(ex, sent, "ice_flushBatchRequests"); + cb = Ice::newCallback_Object_ice_flushBatchRequests(d, &FlushCallback::exception, &FlushCallback::sent); + } + + Ice::AsyncResultPtr result; + try + { + AllowThreads allowThreads; // Release Python's global interpreter lock during remote invocations. + + if(cb) + { + result = (*self->proxy)->begin_ice_flushBatchRequests(cb); + } + else + { + result = (*self->proxy)->begin_ice_flushBatchRequests(); + } + } + catch(const Ice::Exception& ex) + { + setPythonException(ex); + return 0; + } + + return createAsyncResult(result, reinterpret_cast<PyObject*>(self), 0, 0); +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* +proxyEndIceFlushBatchRequests(ProxyObject* self, PyObject* args) +{ + assert(self->proxy); + + PyObject* result; + if(!PyArg_ParseTuple(args, STRCAST("O!"), &AsyncResultType, &result)) + { + return 0; + } + + Ice::AsyncResultPtr r = getAsyncResult(result); + try + { + AllowThreads allowThreads; // Release Python's global interpreter lock during blocking invocations. + (*self->proxy)->end_ice_flushBatchRequests(r); + } + catch(const Ice::Exception& ex) + { + setPythonException(ex); + return 0; + } + + Py_INCREF(Py_None); + return Py_None; +} + namespace IcePy { -class AMI_Object_ice_flushBatchRequestsI : public Ice::AMI_Object_ice_flushBatchRequests +class AMI_Object_ice_flushBatchRequestsI : public IceUtil::Shared { public: AMI_Object_ice_flushBatchRequestsI(PyObject*); ~AMI_Object_ice_flushBatchRequestsI(); - virtual void ice_exception(const Ice::Exception&); + void exception(const Ice::Exception&); + void sent(bool); protected: PyObject* _callback; }; - -class AMI_Object_ice_flushBatchRequestsSentI : public AMI_Object_ice_flushBatchRequestsI, public Ice::AMISentCallback -{ -public: - - AMI_Object_ice_flushBatchRequestsSentI(PyObject*); - - virtual void ice_sent(); -}; +typedef IceUtil::Handle<AMI_Object_ice_flushBatchRequestsI> AMI_Object_ice_flushBatchRequestsIPtr; AMI_Object_ice_flushBatchRequestsI::AMI_Object_ice_flushBatchRequestsI(PyObject* callback) : _callback(callback) @@ -1441,20 +1703,22 @@ AMI_Object_ice_flushBatchRequestsI::~AMI_Object_ice_flushBatchRequestsI() } void -AMI_Object_ice_flushBatchRequestsI::ice_exception(const Ice::Exception& ex) +AMI_Object_ice_flushBatchRequestsI::exception(const Ice::Exception& ex) { AdoptThread adoptThread; // Ensure the current thread is able to call into Python. - PyObjectHandle method = PyObject_GetAttrString(_callback, STRCAST("ice_exception")); - if(!method.get()) + const string methodName = "ice_exception"; + if(!PyObject_HasAttrString(_callback, STRCAST(methodName.c_str()))) { ostringstream ostr; - ostr << "AMI callback object for ice_flushBatchRequests_async does not define ice_exception()"; + ostr << "AMI callback object for ice_flushBatchRequests does not define " << methodName << "()"; string str = ostr.str(); PyErr_Warn(PyExc_RuntimeWarning, const_cast<char*>(str.c_str())); } else { + PyObjectHandle method = PyObject_GetAttrString(_callback, STRCAST(methodName.c_str())); + assert(method.get()); PyObjectHandle exh = convertException(ex); assert(exh.get()); @@ -1467,26 +1731,16 @@ AMI_Object_ice_flushBatchRequestsI::ice_exception(const Ice::Exception& ex) } } -AMI_Object_ice_flushBatchRequestsSentI::AMI_Object_ice_flushBatchRequestsSentI(PyObject* callback) : - AMI_Object_ice_flushBatchRequestsI(callback) -{ -} - void -AMI_Object_ice_flushBatchRequestsSentI::ice_sent() +AMI_Object_ice_flushBatchRequestsI::sent(bool) { AdoptThread adoptThread; // Ensure the current thread is able to call into Python. - PyObjectHandle method = PyObject_GetAttrString(_callback, STRCAST("ice_sent")); - if(!method.get()) - { - ostringstream ostr; - ostr << "AMI callback object for ice_flushBatchRequests_async does not define ice_sent()"; - string str = ostr.str(); - PyErr_Warn(PyExc_RuntimeWarning, const_cast<char*>(str.c_str())); - } - else + const string methodName = "ice_sent"; + if(PyObject_HasAttrString(_callback, STRCAST(methodName.c_str()))) { + PyObjectHandle method = PyObject_GetAttrString(_callback, STRCAST(methodName.c_str())); + assert(method.get()); PyObjectHandle args = PyTuple_New(0); PyObjectHandle tmp = PyObject_Call(method.get(), args.get(), 0); if(PyErr_Occurred()) @@ -1505,23 +1759,22 @@ proxyIceFlushBatchRequestsAsync(ProxyObject* self, PyObject* args) { assert(self->proxy); - PyObject* cb; - if(!PyArg_ParseTuple(args, STRCAST("O"), &cb)) + PyObject* pycb; + if(!PyArg_ParseTuple(args, STRCAST("O"), &pycb)) { return 0; } + AMI_Object_ice_flushBatchRequestsIPtr d = new AMI_Object_ice_flushBatchRequestsI(pycb); + Ice::Callback_Object_ice_flushBatchRequestsPtr cb = + Ice::newCallback_Object_ice_flushBatchRequests(d, &AMI_Object_ice_flushBatchRequestsI::exception, + &AMI_Object_ice_flushBatchRequestsI::sent); + bool result = false; try { - if(PyObject_HasAttrString(cb, STRCAST("ice_sent"))) - { - result = (*self->proxy)->ice_flushBatchRequests_async(new AMI_Object_ice_flushBatchRequestsSentI(cb)); - } - else - { - result = (*self->proxy)->ice_flushBatchRequests_async(new AMI_Object_ice_flushBatchRequestsI(cb)); - } + Ice::AsyncResultPtr r = (*self->proxy)->begin_ice_flushBatchRequests(cb); + result = r->sentSynchronously(); } catch(const Ice::Exception& ex) { @@ -1538,7 +1791,7 @@ extern "C" static PyObject* proxyIceInvoke(ProxyObject* self, PyObject* args) { - return iceInvoke(*self->proxy, args); + return iceInvoke(reinterpret_cast<PyObject*>(self), args); } #ifdef WIN32 @@ -1547,7 +1800,25 @@ extern "C" static PyObject* proxyIceInvokeAsync(ProxyObject* self, PyObject* args) { - return iceInvokeAsync(*self->proxy, args); + return iceInvokeAsync(reinterpret_cast<PyObject*>(self), args); +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* +proxyBeginIceInvoke(ProxyObject* self, PyObject* args, PyObject* kwds) +{ + return beginIceInvoke(reinterpret_cast<PyObject*>(self), args, kwds); +} + +#ifdef WIN32 +extern "C" +#endif +static PyObject* +proxyEndIceInvoke(ProxyObject* self, PyObject* args) +{ + return endIceInvoke(reinterpret_cast<PyObject*>(self), args); } static PyObject* @@ -1831,12 +2102,28 @@ static PyMethodDef ProxyMethods[] = PyDoc_STR(STRCAST("ice_toString() -> string")) }, { STRCAST("ice_isA"), reinterpret_cast<PyCFunction>(proxyIceIsA), METH_VARARGS, PyDoc_STR(STRCAST("ice_isA(type, [ctx]) -> bool")) }, + { STRCAST("begin_ice_isA"), reinterpret_cast<PyCFunction>(proxyBeginIceIsA), METH_VARARGS | METH_KEYWORDS, + PyDoc_STR(STRCAST("begin_ice_isA(type[, _response][, _ex][, _sent][, _ctx]) -> Ice.AsyncResult")) }, + { STRCAST("end_ice_isA"), reinterpret_cast<PyCFunction>(proxyEndIceIsA), METH_VARARGS, + PyDoc_STR(STRCAST("end_ice_isA(Ice.AsyncResult) -> bool")) }, { STRCAST("ice_ping"), reinterpret_cast<PyCFunction>(proxyIcePing), METH_VARARGS, PyDoc_STR(STRCAST("ice_ping([ctx]) -> None")) }, + { STRCAST("begin_ice_ping"), reinterpret_cast<PyCFunction>(proxyBeginIcePing), METH_VARARGS | METH_KEYWORDS, + PyDoc_STR(STRCAST("begin_ice_ping([_response][, _ex][, _sent][, _ctx]) -> Ice.AsyncResult")) }, + { STRCAST("end_ice_ping"), reinterpret_cast<PyCFunction>(proxyEndIcePing), METH_VARARGS, + PyDoc_STR(STRCAST("end_ice_ping(Ice.AsyncResult) -> None")) }, { STRCAST("ice_ids"), reinterpret_cast<PyCFunction>(proxyIceIds), METH_VARARGS, PyDoc_STR(STRCAST("ice_ids([ctx]) -> list")) }, + { STRCAST("begin_ice_ids"), reinterpret_cast<PyCFunction>(proxyBeginIceIds), METH_VARARGS | METH_KEYWORDS, + PyDoc_STR(STRCAST("begin_ice_ids([_response][, _ex][, _sent][, _ctx]) -> Ice.AsyncResult")) }, + { STRCAST("end_ice_ids"), reinterpret_cast<PyCFunction>(proxyEndIceIds), METH_VARARGS, + PyDoc_STR(STRCAST("end_ice_ids(Ice.AsyncResult) -> list")) }, { STRCAST("ice_id"), reinterpret_cast<PyCFunction>(proxyIceId), METH_VARARGS, PyDoc_STR(STRCAST("ice_id([ctx]) -> string")) }, + { STRCAST("begin_ice_id"), reinterpret_cast<PyCFunction>(proxyBeginIceId), METH_VARARGS | METH_KEYWORDS, + PyDoc_STR(STRCAST("begin_ice_id([_response][, _ex][, _sent][, _ctx]) -> Ice.AsyncResult")) }, + { STRCAST("end_ice_id"), reinterpret_cast<PyCFunction>(proxyEndIceId), METH_VARARGS, + PyDoc_STR(STRCAST("end_ice_id(Ice.AsyncResult) -> string")) }, { STRCAST("ice_getIdentity"), reinterpret_cast<PyCFunction>(proxyIceGetIdentity), METH_NOARGS, PyDoc_STR(STRCAST("ice_getIdentity() -> Ice.Identity")) }, { STRCAST("ice_identity"), reinterpret_cast<PyCFunction>(proxyIceIdentity), METH_VARARGS, @@ -1917,14 +2204,22 @@ static PyMethodDef ProxyMethods[] = PyDoc_STR(STRCAST("ice_getConnection() -> Ice.Connection")) }, { STRCAST("ice_getCachedConnection"), reinterpret_cast<PyCFunction>(proxyIceGetCachedConnection), METH_NOARGS, PyDoc_STR(STRCAST("ice_getCachedConnection() -> Ice.Connection")) }, - { STRCAST("ice_flushBatchRequests"), reinterpret_cast<PyCFunction>(proxyIceFlushBatchRequests), METH_VARARGS, + { STRCAST("ice_flushBatchRequests"), reinterpret_cast<PyCFunction>(proxyIceFlushBatchRequests), METH_NOARGS, PyDoc_STR(STRCAST("ice_flushBatchRequests() -> void")) }, { STRCAST("ice_flushBatchRequests_async"), reinterpret_cast<PyCFunction>(proxyIceFlushBatchRequestsAsync), METH_VARARGS, PyDoc_STR(STRCAST("ice_flushBatchRequests_async(cb) -> bool")) }, + { STRCAST("begin_ice_flushBatchRequests"), reinterpret_cast<PyCFunction>(proxyBeginIceFlushBatchRequests), + METH_VARARGS | METH_KEYWORDS, PyDoc_STR(STRCAST("begin_ice_flushBatchRequests([_ex][, _sent]) -> Ice.AsyncResult")) }, + { STRCAST("end_ice_flushBatchRequests"), reinterpret_cast<PyCFunction>(proxyEndIceFlushBatchRequests), METH_VARARGS, + PyDoc_STR(STRCAST("end_ice_flushBatchRequests(Ice.AsyncResult) -> void")) }, { STRCAST("ice_invoke"), reinterpret_cast<PyCFunction>(proxyIceInvoke), METH_VARARGS, PyDoc_STR(STRCAST("ice_invoke(operation, mode, inParams) -> bool, outParams")) }, { STRCAST("ice_invoke_async"), reinterpret_cast<PyCFunction>(proxyIceInvokeAsync), METH_VARARGS, PyDoc_STR(STRCAST("ice_invoke_async(cb, operation, mode, inParams) -> bool")) }, + { STRCAST("begin_ice_invoke"), reinterpret_cast<PyCFunction>(proxyBeginIceInvoke), METH_VARARGS | METH_KEYWORDS, + PyDoc_STR(STRCAST("begin_ice_invoke(op, mode, inParams[, _response][, _ex][, _sent][, _ctx]) -> Ice.AsyncResult")) }, + { STRCAST("end_ice_invoke"), reinterpret_cast<PyCFunction>(proxyEndIceInvoke), METH_VARARGS, + PyDoc_STR(STRCAST("end_ice_invoke(Ice.AsyncResult) -> (bool, results)")) }, { STRCAST("ice_checkedCast"), reinterpret_cast<PyCFunction>(proxyIceCheckedCast), METH_VARARGS | METH_CLASS, PyDoc_STR(STRCAST("ice_checkedCast(proxy, id[, facetOrCtx[, ctx]]) -> proxy")) }, { STRCAST("ice_uncheckedCast"), reinterpret_cast<PyCFunction>(proxyIceUncheckedCast), METH_VARARGS | METH_CLASS, diff --git a/py/modules/IcePy/test.py b/py/modules/IcePy/test.py new file mode 100644 index 00000000000..4f88db214e6 --- /dev/null +++ b/py/modules/IcePy/test.py @@ -0,0 +1,13 @@ +import Ice +Ice.loadSlice("../../demo/Ice/hello/Hello.ice") +c = Ice.initialize() +p = c.stringToProxy("hello:tcp -p 10000") +import Demo +h = Demo.HelloPrx.checkedCast(p) +r1 = h.begin_sayHello(0) + +p2 = c.stringToProxy("hello:tcp -p 10000") +h2 = Demo.HelloPrx.checkedCast(p2) +r2 = h2.begin_sayHello(0) + +h2.end_sayHello(r1) diff --git a/py/python/Ice.py b/py/python/Ice.py index e1d2d8ff442..23c4728afd0 100644 --- a/py/python/Ice.py +++ b/py/python/Ice.py @@ -60,6 +60,7 @@ stringVersion = IcePy.stringVersion intVersion = IcePy.intVersion generateUUID = IcePy.generateUUID loadSlice = IcePy.loadSlice +AsyncResult = IcePy.AsyncResult # # This value is used as the default value for struct types in the constructors @@ -449,6 +450,12 @@ class CommunicatorI(Communicator): def flushBatchRequests(self): self._impl.flushBatchRequests() + def begin_flushBatchRequests(self, _ex=None, _sent=None): + return self._impl.begin_flushBatchRequests(_ex, _sent) + + def end_flushBatchRequests(self, r): + return self._impl.end_flushBatchRequests(r) + def getAdmin(self): return self._impl.getAdmin() diff --git a/py/test/Ice/ami/AllTests.py b/py/test/Ice/ami/AllTests.py new file mode 100644 index 00000000000..67eeb474454 --- /dev/null +++ b/py/test/Ice/ami/AllTests.py @@ -0,0 +1,606 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved. +# +# This copy of Ice is licensed to you under the terms described in the +# ICE_LICENSE file included in this distribution. +# +# ********************************************************************** + +import Ice, Test, threading, random + +def test(b): + if not b: + raise RuntimeError('test assertion failed') + +class CallbackBase: + def __init__(self): + self._called = False + self._cond = threading.Condition() + + def check(self): + self._cond.acquire() + try: + while not self._called: + self._cond.wait() + self._called = False + finally: + self._cond.release() + + def called(self): + self._cond.acquire() + self._called = True + self._cond.notify() + self._cond.release() + + def exception(self, ex): + test(False) + +class ResponseCallback(CallbackBase): + def isA(self, r): + test(r) + self.called() + + def ping(self): + self.called() + + def id(self, id): + test(id == "::Test::TestIntf") + self.called() + + def ids(self, ids): + test(len(ids) == 2) + self.called() + + def op(self): + self.called() + + def opWithResult(self, r): + test(r == 15) + self.called() + + def opWithUE(self, ex): + try: + raise ex + except Test.TestIntfException: + self.called() + except: + test(False) + + def ex(self, ex): + pass + +class ExceptionCallback(CallbackBase): + def response(self, *args): + test(False) + + def nullResponse(self, *args): + pass + + def opWithUE(self, ex): + test(isinstance(ex, Test.TestIntfException)) + self.called() + + def ex(self, ex): + test(isinstance(ex, Ice.NoEndpointException)) + self.called() + + def noEx(self, ex): + test(False) + +class SentCallback(CallbackBase): + def __init__(self): + CallbackBase.__init__(self) + self._thread = threading.currentThread() + + def response(self, *args): + pass + + def ex(self, ex): + pass + + def sent(self, sentSynchronously): + test((sentSynchronously and self._thread == threading.currentThread()) or \ + (not sentSynchronously and self._thread != threading.currentThread())) + self.called() + +class FlushCallback(CallbackBase): + def __init__(self): + CallbackBase.__init__(self) + self._thread = threading.currentThread() + + def exception(self, ex): + test(False) + + def sent(self, sentSynchronously): + test((sentSynchronously and self._thread == threading.currentThread()) or \ + (not sentSynchronously and self._thread != threading.currentThread())) + self.called() + +class FlushExCallback(CallbackBase): + def response(self, *args): + test(False) + + def exception(self, ex): + self.called() + + def sent(self, sentSynchronously): + test(False) + +LocalException = 0 +UserException = 1 +OtherException = 2 + +def throwEx(t): + if t == LocalException: + raise Ice.ObjectNotExistException() + elif t == UserException: + raise Test.TestIntfException() + elif t == OtherException: + raise RuntimeError() + else: + test(False) + +class Thrower(CallbackBase): + def __init__(self, t): + CallbackBase.__init__(self) + self._t = t + + def op(self): + self.called() + throwEx(self._t) + + def noOp(self): + pass + + def ex(self, ex): + self.called() + throwEx(self._t) + + def noEx(self, ex): + test(False) + + def sent(self, ss): + self.called() + throwEx(self._t) + +def allTests(communicator): + sref = "test:default -p 12010" + obj = communicator.stringToProxy(sref) + test(obj) + + p = Test.TestIntfPrx.uncheckedCast(obj) + + sref = "testController:tcp -p 12011" + obj = communicator.stringToProxy(sref) + test(obj) + + testController = Test.TestIntfControllerPrx.uncheckedCast(obj) + + print "testing begin/end invocation...", + ctx = {} + + result = p.begin_ice_isA("::Test::TestIntf") + test(p.end_ice_isA(result)) + result = p.begin_ice_isA("::Test::TestIntf", _ctx=ctx) + test(p.end_ice_isA(result)) + + result = p.begin_ice_ping() + p.end_ice_ping(result) + result = p.begin_ice_ping(_ctx=ctx) + p.end_ice_ping(result) + + result = p.begin_ice_id() + test(p.end_ice_id(result) == "::Test::TestIntf") + result = p.begin_ice_id(_ctx=ctx) + test(p.end_ice_id(result) == "::Test::TestIntf") + + result = p.begin_ice_ids() + test(len(p.end_ice_ids(result)) == 2) + result = p.begin_ice_ids(_ctx=ctx) + test(len(p.end_ice_ids(result)) == 2) + + result = p.begin_op() + p.end_op(result) + result = p.begin_op(_ctx=ctx) + p.end_op(result) + + result = p.begin_opWithResult() + test(p.end_opWithResult(result) == 15) + result = p.begin_opWithResult(_ctx=ctx) + test(p.end_opWithResult(result) == 15) + + result = p.begin_opWithUE() + try: + p.end_opWithUE(result) + test(False) + except Test.TestIntfException: + pass + result = p.begin_opWithUE(_ctx=ctx) + try: + p.end_opWithUE(result) + test(False) + except Test.TestIntfException: + pass + + print "ok" + + print "testing response callback...", + + ctx = {} + cb = ResponseCallback() + + p.begin_ice_isA(Test.TestIntf.ice_staticId(), cb.isA, cb.ex) + cb.check() + p.begin_ice_isA(Test.TestIntf.ice_staticId(), cb.isA, cb.ex, _ctx=ctx) + cb.check() + + p.begin_ice_ping(cb.ping, cb.ex) + cb.check() + p.begin_ice_ping(cb.ping, cb.ex, _ctx=ctx) + cb.check() + + p.begin_ice_id(cb.id, cb.ex) + cb.check() + p.begin_ice_id(cb.id, cb.ex, _ctx=ctx) + cb.check() + + p.begin_ice_ids(cb.ids, cb.ex) + cb.check() + p.begin_ice_ids(cb.ids, cb.ex, _ctx=ctx) + cb.check() + + p.begin_op(cb.op, cb.ex) + cb.check() + p.begin_op(cb.op, cb.ex, _ctx=ctx) + cb.check() + + p.begin_opWithResult(cb.opWithResult, cb.ex) + cb.check() + p.begin_opWithResult(cb.opWithResult, cb.ex, _ctx=ctx) + cb.check() + + p.begin_opWithUE(cb.op, cb.opWithUE) + cb.check() + p.begin_opWithUE(cb.op, cb.opWithUE, _ctx=ctx) + cb.check() + + print "ok" + + print "testing local exceptions...", + + indirect = Test.TestIntfPrx.uncheckedCast(p.ice_adapterId("dummy")) + + r = indirect.begin_op() + try: + indirect.end_op(r) + except Ice.NoEndpointException: + pass + + try: + p.ice_oneway().begin_opWithResult() + test(False) + except RuntimeError: + pass + + # + # Check that CommunicatorDestroyedException is raised directly. + # + initData = Ice.InitializationData() + initData.properties = communicator.getProperties().clone() + ic = Ice.initialize(initData) + obj = ic.stringToProxy(p.ice_toString()) + p2 = Test.TestIntfPrx.checkedCast(obj) + ic.destroy(); + + try: + p2.begin_op() + test(False) + except Ice.CommunicatorDestroyedException: + pass + + print "ok" + + print "testing local exceptions with response callback...", + + i = Test.TestIntfPrx.uncheckedCast(p.ice_adapterId("dummy")) + cb = ExceptionCallback() + + i.begin_ice_isA(Test.TestIntf.ice_staticId(), cb.response, cb.ex) + cb.check() + + i.begin_ice_ping(cb.response, cb.ex) + cb.check() + + i.begin_ice_id(cb.response, cb.ex) + cb.check() + + i.begin_ice_ids(cb.response, cb.ex) + cb.check() + + i.begin_op(cb.response, cb.ex) + cb.check() + + print "ok" + + print "testing exception callback...", + + cb = ExceptionCallback() + + # Ensures no exception is called when response is received. + p.begin_ice_isA(Test.TestIntf.ice_staticId(), cb.nullResponse, cb.noEx) + p.begin_op(cb.nullResponse, cb.noEx) + + # If response is a user exception, it should be received. + p.begin_opWithUE(cb.nullResponse, cb.opWithUE) + cb.check() + + print "ok" + + print "testing sent callback...", + + cb = SentCallback() + + p.begin_ice_isA("", cb.response, cb.ex, cb.sent) + cb.check() + + p.begin_ice_ping(cb.response, cb.ex, cb.sent) + cb.check() + + p.begin_ice_id(cb.response, cb.ex, cb.sent) + cb.check() + + p.begin_ice_ids(cb.response, cb.ex, cb.sent) + cb.check() + + p.begin_op(cb.response, cb.ex, cb.sent) + cb.check() + + cbs = [] + bytes = [] + bytes[0:1024] = range(0, 1024) + bytes = [chr(random.randint(0, 255)) for x in bytes] # Make sure the request doesn't compress too well. + seq = ''.join(bytes) + testController.holdAdapter() + try: + cb = SentCallback() + while(p.begin_opWithPayload(seq, None, cb.ex, cb.sent).sentSynchronously()): + cbs.append(cb) + cb = SentCallback() + except ex: + testController.resumeAdapter() + raise ex + testController.resumeAdapter() + for r in cbs: + r.check() + + print "ok" + + print "testing illegal arguments...", + + result = p.begin_op() + p.end_op(result) + try: + p.end_op(result) + test(False) + except RuntimeError: + pass + + result = p.begin_op() + try: + p.end_opWithResult(result) + test(False) + except RuntimeError: + pass + + print "ok" + + print "testing unexpected exceptions from callback...", + + q = Test.TestIntfPrx.uncheckedCast(p.ice_adapterId("dummy")) + throwTypes = [ LocalException, UserException, OtherException ] + + for t in throwTypes: + cb = Thrower(t) + + p.begin_op(cb.op, cb.noEx) + cb.check() + + q.begin_op(cb.op, cb.ex) + cb.check() + + p.begin_op(cb.noOp, cb.ex, cb.sent) + cb.check() + + q.begin_op(None, cb.ex) + cb.check() + + print "ok" + + print "testing batch requests with proxy...", + + test(p.opBatchCount() == 0) + b1 = p.ice_batchOneway() + b1.opBatch() + b1.opBatch() + cb = FlushCallback() + r = b1.begin_ice_flushBatchRequests(cb.exception, cb.sent) + cb.check() + test(r.isSent()) + test(r.isCompleted()) + test(p.waitForBatch(2)) + + test(p.opBatchCount() == 0) + b1 = p.ice_batchOneway() + b1.opBatch() + b1.ice_getConnection().close(False) + cb = FlushExCallback() + r = b1.begin_ice_flushBatchRequests(cb.exception, cb.sent) + cb.check() + test(not r.isSent()) + test(r.isCompleted()) + test(p.opBatchCount() == 0) + + print "ok" + + print "testing batch requests with connection...", + + test(p.opBatchCount() == 0) + b1 = p.ice_batchOneway() + b1.opBatch() + b1.opBatch() + cb = FlushCallback() + r = b1.ice_getConnection().begin_flushBatchRequests(cb.exception, cb.sent) + cb.check() + test(r.isSent()) + test(r.isCompleted()) + test(p.waitForBatch(2)) + + test(p.opBatchCount() == 0) + b1 = p.ice_batchOneway() + b1.opBatch() + b1.ice_getConnection().close(False) + cb = FlushExCallback() + r = b1.ice_getConnection().begin_flushBatchRequests(cb.exception, cb.sent) + cb.check() + test(not r.isSent()) + test(r.isCompleted()) + test(p.opBatchCount() == 0) + + print "ok" + + print "testing batch requests with communicator...", + + # + # 1 connection. + # + test(p.opBatchCount() == 0) + b1 = p.ice_batchOneway() + b1.opBatch() + b1.opBatch() + cb = FlushCallback() + r = communicator.begin_flushBatchRequests(cb.exception, cb.sent) + cb.check() + test(r.isSent()) + test(r.isCompleted()) + test(p.waitForBatch(2)) + + # + # 1 connection. + # + test(p.opBatchCount() == 0) + b1 = p.ice_batchOneway() + b1.opBatch() + b1.ice_getConnection().close(False) + cb = FlushCallback() + r = communicator.begin_flushBatchRequests(cb.exception, cb.sent) + cb.check() + test(r.isSent()) # Exceptions are ignored! + test(r.isCompleted()) + test(p.opBatchCount() == 0) + + # + # 2 connections. + # + test(p.opBatchCount() == 0) + b1 = p.ice_batchOneway() + b2 = p.ice_connectionId("2").ice_batchOneway() + b2.ice_getConnection() # Ensure connection is established. + b1.opBatch() + b1.opBatch() + b2.opBatch() + b2.opBatch() + cb = FlushCallback() + r = communicator.begin_flushBatchRequests(cb.exception, cb.sent) + cb.check() + test(r.isSent()) + test(r.isCompleted()) + test(p.waitForBatch(4)) + + # + # 2 connections - 1 failure. + # + # All connections should be flushed even if there are failures on some connections. + # Exceptions should not be reported. + # + test(p.opBatchCount() == 0) + b1 = p.ice_batchOneway() + b2 = p.ice_connectionId("2").ice_batchOneway() + b2.ice_getConnection() # Ensure connection is established. + b1.opBatch() + b2.opBatch() + b1.ice_getConnection().close(False) + cb = FlushCallback() + r = communicator.begin_flushBatchRequests(cb.exception, cb.sent) + cb.check() + test(r.isSent()) # Exceptions are ignored! + test(r.isCompleted()) + test(p.waitForBatch(1)) + + # + # 2 connections - 2 failures. + # + # The sent callback should be invoked even if all connections fail. + # + test(p.opBatchCount() == 0) + b1 = p.ice_batchOneway() + b2 = p.ice_connectionId("2").ice_batchOneway() + b2.ice_getConnection() # Ensure connection is established. + b1.opBatch() + b2.opBatch() + b1.ice_getConnection().close(False) + b2.ice_getConnection().close(False) + cb = FlushCallback() + r = communicator.begin_flushBatchRequests(cb.exception, cb.sent) + cb.check() + test(r.isSent()) # Exceptions are ignored! + test(r.isCompleted()) + test(p.opBatchCount() == 0) + + print "ok" + + print "testing AsyncResult operations...", + testController.holdAdapter() + r1 = None + r2 = None + try: + r1 = p.begin_op() + bytes = [] + bytes[0:1024] = range(0, 1024) + bytes = [chr(random.randint(0, 255)) for x in bytes] # Make sure the request doesn't compress too well. + seq = ''.join(bytes) + while(True): + r2 = p.begin_opWithPayload(seq) + if not r2.sentSynchronously(): + break + + test(r1 == r1) + test(r1 != r2) + + test((r1.sentSynchronously() and r1.isSent() and not r1.isCompleted()) or + (not r1.sentSynchronously() and not r1.isCompleted())); + + test(not r2.sentSynchronously() and not r2.isCompleted()); + except ex: + testController.resumeAdapter() + raise ex + testController.resumeAdapter() + + r1.waitForSent() + test(r1.isSent()) + + r2.waitForSent() + test(r2.isSent()) + + r1.waitForCompleted() + test(r1.isCompleted()) + + r2.waitForCompleted() + test(r2.isCompleted()) + + test(r1.getOperation() == "op") + test(r2.getOperation() == "opWithPayload") + + print "ok" + + p.shutdown() diff --git a/py/test/Ice/ami/Client.py b/py/test/Ice/ami/Client.py new file mode 100755 index 00000000000..ae6016b27e3 --- /dev/null +++ b/py/test/Ice/ami/Client.py @@ -0,0 +1,49 @@ +#!/usr/bin/env python +# ********************************************************************** +# +# Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved. +# +# This copy of Ice is licensed to you under the terms described in the +# ICE_LICENSE file included in this distribution. +# +# ********************************************************************** + +import os, sys, traceback +import Ice + +import Ice +slice_dir = Ice.getSliceDir() +if not slice_dir: + print sys.argv[0] + ': Slice directory not found.' + sys.exit(1) + +Ice.loadSlice("'-I" + slice_dir + "' Test.ice") +import AllTests + +def test(b): + if not b: + raise RuntimeError('test assertion failed') + +def run(args, communicator): + AllTests.allTests(communicator) + return True + +try: + initData = Ice.InitializationData() + initData.properties = Ice.createProperties(sys.argv) + initData.properties.setProperty('Ice.Warn.AMICallback', '0') + + communicator = Ice.initialize(sys.argv, initData) + status = run(sys.argv, communicator) +except: + traceback.print_exc() + status = False + +if communicator: + try: + communicator.destroy() + except: + traceback.print_exc() + status = False + +sys.exit(not status) diff --git a/py/test/Ice/ami/Server.py b/py/test/Ice/ami/Server.py new file mode 100755 index 00000000000..44bc3372834 --- /dev/null +++ b/py/test/Ice/ami/Server.py @@ -0,0 +1,62 @@ +#!/usr/bin/env python +# ********************************************************************** +# +# Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved. +# +# This copy of Ice is licensed to you under the terms described in the +# ICE_LICENSE file included in this distribution. +# +# ********************************************************************** + +import os, sys, traceback +import Ice +slice_dir = Ice.getSliceDir() +if not slice_dir: + print sys.argv[0] + ': Slice directory not found.' + sys.exit(1) + +Ice.loadSlice('"-I' + slice_dir + '" Test.ice') +import Test, TestI + +def run(args, communicator): + communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010") + communicator.getProperties().setProperty("ControllerAdapter.Endpoints", "default -p 12011") + communicator.getProperties().setProperty("ControllerAdapter.ThreadPool.Size", "1") + + adapter = communicator.createObjectAdapter("TestAdapter") + adapter2 = communicator.createObjectAdapter("ControllerAdapter") + + testController = TestI.TestIntfControllerI(adapter) + + adapter.add(TestI.TestIntfI(), communicator.stringToIdentity("test")) + adapter.activate() + + adapter2.add(testController, communicator.stringToIdentity("testController")) + adapter2.activate() + + communicator.waitForShutdown() + return True + +try: + initData = Ice.InitializationData() + initData.properties = Ice.createProperties(sys.argv) + + # + # This test kills connections, so we don't want warnings. + # + initData.properties.setProperty("Ice.Warn.Connections", "0"); + + communicator = Ice.initialize(sys.argv, initData) + status = run(sys.argv, communicator) +except: + traceback.print_exc() + status = False + +if communicator: + try: + communicator.destroy() + except: + traceback.print_exc() + status = False + +sys.exit(not status) diff --git a/py/test/Ice/ami/Test.ice b/py/test/Ice/ami/Test.ice new file mode 100644 index 00000000000..8d0f09bfd17 --- /dev/null +++ b/py/test/Ice/ami/Test.ice @@ -0,0 +1,44 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#ifndef TEST_ICE +#define TEST_ICE + +#include <Ice/BuiltinSequences.ice> +#include <Ice/Endpoint.ice> + +module Test +{ + +exception TestIntfException +{ +}; + +interface TestIntf +{ + void op(); + void opWithPayload(Ice::ByteSeq seq); + int opWithResult(); + void opWithUE() + throws TestIntfException; + void opBatch(); + int opBatchCount(); + bool waitForBatch(int count); + void shutdown(); +}; + +interface TestIntfController +{ + void holdAdapter(); + void resumeAdapter(); +}; + +}; + +#endif diff --git a/py/test/Ice/ami/TestI.py b/py/test/Ice/ami/TestI.py new file mode 100644 index 00000000000..d97de26e235 --- /dev/null +++ b/py/test/Ice/ami/TestI.py @@ -0,0 +1,66 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved. +# +# This copy of Ice is licensed to you under the terms described in the +# ICE_LICENSE file included in this distribution. +# +# ********************************************************************** + +import Ice, Test, threading + +class TestIntfI(Test.TestIntf): + def __init__(self): + self._cond = threading.Condition() + self._batchCount = 0 + + def op(self, current=None): + pass + + def opWithResult(self, current=None): + return 15 + + def opWithUE(self, current=None): + raise Test.TestIntfException() + + def opWithPayload(self, bytes, current=None): + pass + + def opBatch(self, current=None): + self._cond.acquire() + try: + self._batchCount += 1 + self._cond.notify() + finally: + self._cond.release() + + def opBatchCount(self, current=None): + self._cond.acquire() + try: + return self._batchCount + finally: + self._cond.release() + + def waitForBatch(self, count, current=None): + self._cond.acquire() + try: + while self._batchCount < count: + self._cond.wait(5) + result = count == self._batchCount + self._batchCount = 0 + return result + finally: + self._cond.release() + + def shutdown(self, current=None): + current.adapter.getCommunicator().shutdown() + +class TestIntfControllerI(Test.TestIntfController): + def __init__(self, adapter): + self._adapter = adapter + + def holdAdapter(self, current=None): + self._adapter.hold() + + def resumeAdapter(self, current=None): + self._adapter.activate() diff --git a/py/test/Ice/ami/run.py b/py/test/Ice/ami/run.py new file mode 100755 index 00000000000..bb34e7d35b7 --- /dev/null +++ b/py/test/Ice/ami/run.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python +# ********************************************************************** +# +# Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved. +# +# This copy of Ice is licensed to you under the terms described in the +# ICE_LICENSE file included in this distribution. +# +# ********************************************************************** + +import os, sys + +path = [ ".", "..", "../..", "../../..", "../../../.." ] +head = os.path.dirname(sys.argv[0]) +if len(head) > 0: + path = [os.path.join(head, p) for p in path] +path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ] +if len(path) == 0: + raise "can't find toplevel directory!" +sys.path.append(os.path.join(path[0])) +from scripts import * + +TestUtil.clientServerTest() diff --git a/py/test/Ice/binding/AllTests.py b/py/test/Ice/binding/AllTests.py index 1100927e1e9..96396b6dcd7 100644 --- a/py/test/Ice/binding/AllTests.py +++ b/py/test/Ice/binding/AllTests.py @@ -18,13 +18,13 @@ class GetAdapterNameCB: self._name = "" self._cond = threading.Condition() - def ice_response(self, name): + def response(self, name): self._cond.acquire() self._name = name self._cond.notify() self._cond.release() - def ice_exception(self, ex): + def exception(self, ex): test(False) def getResult(self): @@ -41,7 +41,7 @@ class GetAdapterNameCB: def getAdapterNameWithAMI(proxy): cb = GetAdapterNameCB() - proxy.getAdapterName_async(cb) + proxy.begin_getAdapterName(cb.response, cb.exception) return cb.getResult() def createTestIntfPrx(adapters): diff --git a/py/test/Ice/binding/Test.ice b/py/test/Ice/binding/Test.ice index 40783e4535c..ae0d19825c3 100644 --- a/py/test/Ice/binding/Test.ice +++ b/py/test/Ice/binding/Test.ice @@ -15,7 +15,7 @@ module Test interface TestIntf { - ["ami"] string getAdapterName(); + string getAdapterName(); }; interface RemoteObjectAdapter diff --git a/py/test/Ice/blobject/RouterI.py b/py/test/Ice/blobject/RouterI.py index 38ed8fb1f3f..cbd8305ac26 100644 --- a/py/test/Ice/blobject/RouterI.py +++ b/py/test/Ice/blobject/RouterI.py @@ -42,41 +42,42 @@ class CallQueue(threading.Thread): class AsyncCallback(object): def __init__(self, cb): - self._cb = cb + self._cb = cb - def ice_response(self, ok, results): - self._cb.ice_response(ok, results) + def response(self, ok, results): + self._cb.ice_response(ok, results) - def ice_exception(self, ex): - self._cb.ice_exception(ex) + def exception(self, ex): + self._cb.ice_exception(ex) class BlobjectCall(object): def __init__(self, proxy, amdCallback, inParams, curr): - self._proxy = proxy - self._amdCallback = amdCallback - self._inParams = inParams - self._curr = curr + self._proxy = proxy + self._amdCallback = amdCallback + self._inParams = inParams + self._curr = curr def execute(self): proxy = self._proxy - if len(self._curr.facet) > 0: - proxy = self._proxy.ice_facet(self._curr.facet) + if len(self._curr.facet) > 0: + proxy = self._proxy.ice_facet(self._curr.facet) if self._curr.ctx.has_key("_fwd") and self._curr.ctx["_fwd"] == "o": proxy = proxy.ice_oneway() - try: - ok, out = proxy.ice_invoke(self._curr.operation, self._curr.mode, self._inParams, self._curr.ctx) - self._amdCallback.ice_response(ok, out) - except Ice.Exception, e: - self._amdCallback.ice_exception(e) + try: + ok, out = proxy.ice_invoke(self._curr.operation, self._curr.mode, self._inParams, self._curr.ctx) + self._amdCallback.ice_response(ok, out) + except Ice.Exception, e: + self._amdCallback.ice_exception(e) else: - proxy.ice_invoke_async(AsyncCallback(self._amdCallback), self._curr.operation, - self._curr.mode, self._inParams, self._curr.ctx) + cb = AsyncCallback(self._amdCallback) + proxy.begin_ice_invoke(self._curr.operation, self._curr.mode, self._inParams, cb.response, cb.exception, + None, self._curr.ctx) class BlobjectAsyncI(Ice.BlobjectAsync): def __init__(self): - self._queue = CallQueue() - self._queue.start() + self._queue = CallQueue() + self._queue.start() self._objects = {} self._lock = threading.Lock() @@ -85,8 +86,8 @@ class BlobjectAsyncI(Ice.BlobjectAsync): proxy = self._objects[curr.id] assert proxy self._lock.release() - self._queue.add(BlobjectCall(proxy, amdCallback, inParams, curr)) - + self._queue.add(BlobjectCall(proxy, amdCallback, inParams, curr)) + def add(self, proxy): self._lock.acquire() self._objects[proxy.ice_getIdentity()] = proxy.ice_facet("").ice_twoway().ice_router(None) @@ -94,7 +95,7 @@ class BlobjectAsyncI(Ice.BlobjectAsync): def destroy(self): self._lock.acquire() - self._queue.destroy() + self._queue.destroy() self._queue.join() self._lock.release() @@ -108,8 +109,8 @@ class BlobjectI(Ice.Blobject): proxy = self._objects[curr.id] self._lock.release() - if len(curr.facet) > 0: - proxy = proxy.ice_facet(curr.facet) + if len(curr.facet) > 0: + proxy = proxy.ice_facet(curr.facet) try: if curr.ctx.has_key("_fwd") and curr.ctx["_fwd"] == "o": @@ -119,7 +120,7 @@ class BlobjectI(Ice.Blobject): return proxy.ice_invoke(curr.operation, curr.mode, inParams, curr.ctx) except Ice.Exception, e: raise - + def add(self, proxy): self._lock.acquire() self._objects[proxy.ice_getIdentity()] = proxy.ice_facet("").ice_twoway().ice_router(None) @@ -130,10 +131,10 @@ class BlobjectI(Ice.Blobject): class ServantLocatorI(Ice.ServantLocator): def __init__(self, blobject): - self._blobject = blobject + self._blobject = blobject def locate(self, current): - return self._blobject # and the cookie + return self._blobject # and the cookie def finished(self, current, object, cookie): pass diff --git a/py/test/Ice/custom/Test.ice b/py/test/Ice/custom/Test.ice index 6c259d0ee69..922c054aea0 100644 --- a/py/test/Ice/custom/Test.ice +++ b/py/test/Ice/custom/Test.ice @@ -12,10 +12,10 @@ module Test { - sequence<byte> ByteString; // By default, sequence<byte> is received as a string. + sequence<byte> ByteString; /* By default, sequence<byte> is received as a string. */ ["python:seq:list"] sequence<byte> ByteList; - sequence<string> StringList; // By default, a sequence is received as a list. + sequence<string> StringList; /* By default, a sequence is received as a list. */ ["python:seq:tuple"] sequence<string> StringTuple; struct S diff --git a/py/test/Ice/exceptions/AllTests.py b/py/test/Ice/exceptions/AllTests.py index 29d8e778e45..59b7aba07bf 100644 --- a/py/test/Ice/exceptions/AllTests.py +++ b/py/test/Ice/exceptions/AllTests.py @@ -282,6 +282,171 @@ class AMI_WrongOperation_noSuchOperationI(CallbackBase): test(False) self.called() +class Callback(CallbackBase): + def __init__(self, communicator=None): + CallbackBase.__init__(self) + self._communicator = communicator + + def response(self): + test(False) + + def exception_AasA(self, ex): + test(isinstance(ex, Test.A)) + test(ex.aMem == 1) + self.called() + + def exception_AorDasAorD(self, ex): + try: + raise ex + except Test.A, ex: + test(ex.aMem == 1) + except Test.D, ex: + test(ex.dMem == -1) + except: + test(False) + self.called() + + def exception_BasB(self, ex): + try: + raise ex + except Test.B, ex: + test(ex.aMem == 1) + test(ex.bMem == 2) + except: + test(False) + self.called() + + def exception_CasC(self, ex): + try: + raise ex + except Test.C, ex: + test(ex.aMem == 1) + test(ex.bMem == 2) + test(ex.cMem == 3) + except: + test(False) + self.called() + + def exception_ModA(self, ex): + try: + raise ex + except Test.Mod.A, ex: + test(ex.aMem == 1) + test(ex.a2Mem == 2) + except Ice.OperationNotExistException: + # + # This operation is not supported in Java. + # + pass + except: + test(False) + self.called() + + def exception_BasA(self, ex): + try: + raise ex + except Test.B, ex: + test(ex.aMem == 1) + test(ex.bMem == 2) + except: + test(False) + self.called() + + def exception_CasA(self, ex): + try: + raise ex + except Test.C, ex: + test(ex.aMem == 1) + test(ex.bMem == 2) + test(ex.cMem == 3) + except: + test(False) + self.called() + + def exception_CasB(self, ex): + try: + raise ex + except Test.C, ex: + test(ex.aMem == 1) + test(ex.bMem == 2) + test(ex.cMem == 3) + except: + test(False) + self.called() + + def exception_UndeclaredA(self, ex): + try: + raise ex + except Ice.UnknownUserException: + pass + except: + test(False) + self.called() + + def exception_UndeclaredB(self, ex): + try: + raise ex + except Ice.UnknownUserException: + pass + except: + test(False) + self.called() + + def exception_UndeclaredC(self, ex): + try: + raise ex + except Ice.UnknownUserException: + pass + except: + test(False) + self.called() + + def exception_AasAObjectNotExist(self, ex): + try: + raise ex + except Ice.ObjectNotExistException, ex: + id = self._communicator.stringToIdentity("does not exist") + test(ex.id == id) + except: + test(False) + self.called() + + def exception_AasAFacetNotExist(self, ex): + try: + raise ex + except Ice.FacetNotExistException, ex: + test(ex.facet == "no such facet") + except: + test(False) + self.called() + + def exception_noSuchOperation(self, ex): + try: + raise ex + except Ice.OperationNotExistException, ex: + test(ex.operation == "noSuchOperation") + except: + test(False) + self.called() + + def exception_LocalException(self, ex): + try: + raise ex + except Ice.UnknownLocalException, ex: + pass + except: + test(False) + self.called() + + def exception_NonIceException(self, ex): + try: + raise ex + except Ice.UnknownException, ex: + pass + except: + test(False) + self.called() + def allTests(communicator): print "testing servant registration exceptions...", communicator.getProperties().setProperty("TestAdapter1.Endpoints", "default") @@ -694,4 +859,109 @@ def allTests(communicator): print "ok" + print "catching exact types with new AMI mapping...", + + cb = Callback() + thrower.begin_throwAasA(1, cb.response, cb.exception_AasA) + cb.check() + + cb = Callback() + thrower.begin_throwAorDasAorD(1, cb.response, cb.exception_AorDasAorD) + cb.check() + + cb = Callback() + thrower.begin_throwAorDasAorD(-1, cb.response, cb.exception_AorDasAorD) + cb.check() + + cb = Callback() + thrower.begin_throwBasB(1, 2, cb.response, cb.exception_BasB) + cb.check() + + cb = Callback() + thrower.begin_throwCasC(1, 2, 3, cb.response, cb.exception_CasC) + cb.check() + + cb = Callback() + thrower.begin_throwModA(1, 2, cb.response, cb.exception_ModA) + cb.check() + + print "ok" + + print "catching derived types with new AMI mapping...", + + cb = Callback() + thrower.begin_throwBasA(1, 2, cb.response, cb.exception_BasA) + cb.check() + + cb = Callback() + thrower.begin_throwCasA(1, 2, 3, cb.response, cb.exception_CasA) + cb.check() + + cb = Callback() + thrower.begin_throwCasB(1, 2, 3, cb.response, cb.exception_CasB) + cb.check() + + print "ok" + + if thrower.supportsUndeclaredExceptions(): + print "catching unknown user exception with new AMI mapping...", + + cb = Callback() + thrower.begin_throwUndeclaredA(1, cb.response, cb.exception_UndeclaredA) + cb.check() + + cb = Callback() + thrower.begin_throwUndeclaredB(1, 2, cb.response, cb.exception_UndeclaredB) + cb.check() + + cb = Callback() + thrower.begin_throwUndeclaredC(1, 2, 3, cb.response, cb.exception_UndeclaredC) + cb.check() + + print "ok" + + print "catching object not exist exception with new AMI mapping...", + + id = communicator.stringToIdentity("does not exist") + thrower2 = Test.ThrowerPrx.uncheckedCast(thrower.ice_identity(id)) + cb = Callback(communicator) + thrower2.begin_throwAasA(1, cb.response, cb.exception_AasAObjectNotExist) + cb.check() + + print "ok" + + print "catching facet not exist exception with new AMI mapping...", + + thrower2 = Test.ThrowerPrx.uncheckedCast(thrower, "no such facet") + cb = Callback() + thrower2.begin_throwAasA(1, cb.response, cb.exception_AasAFacetNotExist) + cb.check() + + print "ok" + + print "catching operation not exist exception with new AMI mapping...", + + cb = Callback() + thrower4 = Test.WrongOperationPrx.uncheckedCast(thrower) + thrower4.begin_noSuchOperation(cb.response, cb.exception_noSuchOperation) + cb.check() + + print "ok" + + print "catching unknown local exception with new AMI mapping...", + + cb = Callback() + thrower.begin_throwLocalException(cb.response, cb.exception_LocalException) + cb.check() + + print "ok" + + print "catching unknown non-Ice exception with new AMI mapping...", + + cb = Callback() + thrower.begin_throwNonIceException(cb.response, cb.exception_NonIceException) + cb.check() + + print "ok" + return thrower diff --git a/py/test/Ice/faultTolerance/AllTests.py b/py/test/Ice/faultTolerance/AllTests.py index ee21e315139..66ffc3e8eaf 100644 --- a/py/test/Ice/faultTolerance/AllTests.py +++ b/py/test/Ice/faultTolerance/AllTests.py @@ -36,29 +36,21 @@ class CallbackBase: self._cond.notify() self._cond.release() -class AMI_Test_pidI(CallbackBase): - def ice_response(self, pid): - self._pid = pid - self.called() - - def ice_exception(self, ex): +class Callback(CallbackBase): + def response(self): test(False) - def pid(self): - return self._pid + def exception(self, ex): + test(False) -class AMI_Test_shutdownI(CallbackBase): - def ice_response(self): + def opPidI(self, pid): + self._pid = pid self.called() - def ice_exception(self, ex): - test(False) - -class AMI_Test_abortI(CallbackBase): - def ice_response(self): - test(False) + def opShutdownI(self): + self.called() - def ice_exception(self, ex): + def exceptAbortI(self, ex): try: raise ex except Ice.ConnectionLostException: @@ -70,12 +62,8 @@ class AMI_Test_abortI(CallbackBase): test(False) self.called() -class AMI_Test_idempotentAbortI(AMI_Test_abortI): - def ice_response(self): - test(False) - - def ice_exception(self, ex): - AMI_Test_abortI.ice_exception(self, ex) + def pid(self): + return self._pid def allTests(communicator, ports): print "testing stringToProxy... ", @@ -109,8 +97,8 @@ def allTests(communicator, ports): oldPid = pid else: print "testing server #%d with AMI... " % i, - cb = AMI_Test_pidI() - obj.pid_async(cb) + cb = Callback() + obj.begin_pid(cb.opPidI, cb.exception) cb.check() pid = cb.pid() test(pid != oldPid) @@ -124,8 +112,8 @@ def allTests(communicator, ports): print "ok" else: print "shutting down server #%d with AMI... " % i, - cb = AMI_Test_shutdownI() - obj.shutdown_async(cb) + cb = Callback() + obj.begin_shutdown(cb.opShutdownI, cb.exception) cb.check() print "ok" elif j == 1 or i + 1 > len(ports): @@ -140,8 +128,8 @@ def allTests(communicator, ports): print "ok" else: print "aborting server #%d with AMI... " % i, - cb = AMI_Test_abortI() - obj.abort_async(cb) + cb = Callback() + obj.begin_abort(cb.response, cb.exceptAbortI) cb.check() print "ok" elif j == 2 or j == 3: @@ -156,8 +144,8 @@ def allTests(communicator, ports): print "ok" else: print "aborting server #%d and #%d with idempotent AMI call... " % (i, i + 1), - cb = AMI_Test_idempotentAbortI() - obj.idempotentAbort_async(cb) + cb = Callback() + obj.begin_idempotentAbort(cb.response, cb.exceptAbortI) cb.check() print "ok" diff --git a/py/test/Ice/faultTolerance/Test.ice b/py/test/Ice/faultTolerance/Test.ice index fc1881aaf43..c7958b46661 100644 --- a/py/test/Ice/faultTolerance/Test.ice +++ b/py/test/Ice/faultTolerance/Test.ice @@ -13,7 +13,7 @@ module Test { -["ami"] interface TestIntf +interface TestIntf { void shutdown(); void abort(); diff --git a/py/test/Ice/operations/AllTests.py b/py/test/Ice/operations/AllTests.py index 19152e130e5..7a595337037 100644 --- a/py/test/Ice/operations/AllTests.py +++ b/py/test/Ice/operations/AllTests.py @@ -7,7 +7,7 @@ # # ********************************************************************** -import Ice, Test, Twoways, TwowaysAMI, Oneways, OnewaysAMI, BatchOneways +import Ice, Test, Twoways, TwowaysAMI, TwowaysNewAMI, Oneways, OnewaysAMI, OnewaysNewAMI, BatchOneways def test(b): if not b: @@ -29,15 +29,23 @@ def allTests(communicator, collocated): Oneways.oneways(communicator, cl) print "ok" - print "testing twoway operations with AMI...", - TwowaysAMI.twowaysAMI(communicator, cl) - print "ok" + if not collocated: + print "testing twoway operations with AMI...", + TwowaysAMI.twowaysAMI(communicator, cl) + print "ok" - print "testing oneway operations with AMI...", - OnewaysAMI.onewaysAMI(communicator, cl) - print "ok" + print "testing twoway operations with new AMI mapping...", + TwowaysNewAMI.twowaysNewAMI(communicator, cl) + print "ok" + + print "testing oneway operations with AMI...", + OnewaysAMI.onewaysAMI(communicator, cl) + print "ok" + + print "testing oneway operations with new AMI mapping...", + OnewaysNewAMI.onewaysNewAMI(communicator, cl) + print "ok" - if not collocated: print "testing batch oneway operations... ", BatchOneways.batchOneways(cl) BatchOneways.batchOneways(derived) diff --git a/py/test/Ice/operations/OnewaysNewAMI.py b/py/test/Ice/operations/OnewaysNewAMI.py new file mode 100644 index 00000000000..de1a2c4b62f --- /dev/null +++ b/py/test/Ice/operations/OnewaysNewAMI.py @@ -0,0 +1,77 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved. +# +# This copy of Ice is licensed to you under the terms described in the +# ICE_LICENSE file included in this distribution. +# +# ********************************************************************** + +import Ice, Test, threading + +def test(b): + if not b: + raise RuntimeError('test assertion failed') + +class CallbackBase: + def __init__(self): + self._called = False + self._cond = threading.Condition() + + def check(self): + self._cond.acquire() + try: + while not self._called: + self._cond.wait() + self._called = False + finally: + self._cond.release() + + def called(self): + self._cond.acquire() + self._called = True + self._cond.notify() + self._cond.release() + +class Callback(CallbackBase): + def sent(self, sentSynchronously): + self.called() + + def noException(self, ex): + test(False) + +def onewaysNewAMI(communicator, proxy): + + p = Test.MyClassPrx.uncheckedCast(proxy.ice_oneway()) + + cb = Callback() + p.begin_ice_ping(None, cb.noException, cb.sent) + cb.check() + + try: + p.begin_ice_isA(Test.MyClass.ice_staticId()) + test(False) + except RuntimeError: + pass + + try: + p.begin_ice_id() + test(False) + except RuntimeError: + pass + + try: + p.begin_ice_ids() + test(False) + except RuntimeError: + pass + + cb = Callback() + p.begin_opVoid(None, cb.noException, cb.sent) + cb.check() + + try: + p.begin_opByte(0xff, 0x0f) + test(False) + except RuntimeError: + pass diff --git a/py/test/Ice/operations/TwowaysAMI.py b/py/test/Ice/operations/TwowaysAMI.py index 389c7289379..c683974711b 100644 --- a/py/test/Ice/operations/TwowaysAMI.py +++ b/py/test/Ice/operations/TwowaysAMI.py @@ -167,8 +167,8 @@ class AMI_MyClass_opStructI(CallbackBase): def __init__(self, communicator): CallbackBase.__init__(self) - self._communicator = communicator - + self._communicator = communicator + def ice_response(self, rso, so): test(rso.p == None) test(rso.e == Test.MyEnum.enum2) @@ -880,12 +880,6 @@ def twowaysAMI(communicator, p): p2.opContext_async(cb, ctx) cb.check() - derived = Test.MyDerivedClassPrx.checkedCast(p) - test(derived) - cb = AMI_MyDerivedClass_opDerivedI() - derived.opDerived_async(cb) - cb.check() - # # Test implicit context propagation # @@ -895,42 +889,48 @@ def twowaysAMI(communicator, p): initData.properties = communicator.getProperties().clone() initData.properties.setProperty('Ice.ImplicitContext', i) ic = Ice.initialize(data=initData) - + ctx = {'one': 'ONE', 'two': 'TWO', 'three': 'THREE'} - - p = Test.MyClassPrx.uncheckedCast(ic.stringToProxy("test:default -p 12010")) - + + p3 = Test.MyClassPrx.uncheckedCast(ic.stringToProxy("test:default -p 12010")) + ic.getImplicitContext().setContext(ctx) test(ic.getImplicitContext().getContext() == ctx) cb = AMI_MyClass_opContextEqualI(ctx) - p.opContext_async(cb) + p3.opContext_async(cb) cb.check() - + ic.getImplicitContext().put('zero', 'ZERO') ctx = ic.getImplicitContext().getContext() cb = AMI_MyClass_opContextEqualI(ctx) - p.opContext_async(cb) + p3.opContext_async(cb) cb.check() - + prxContext = {'one': 'UN', 'four': 'QUATRE'} - + combined = ctx combined.update(prxContext) test(combined['one'] == 'UN') - - p = Test.MyClassPrx.uncheckedCast(p.ice_context(prxContext)) + + p3 = Test.MyClassPrx.uncheckedCast(p3.ice_context(prxContext)) ic.getImplicitContext().setContext({}) cb = AMI_MyClass_opContextEqualI(prxContext) - p.opContext_async(cb) + p3.opContext_async(cb) cb.check() - + ic.getImplicitContext().setContext(ctx) cb = AMI_MyClass_opContextEqualI(combined) - p.opContext_async(cb) + p3.opContext_async(cb) cb.check() ic.destroy() + + derived = Test.MyDerivedClassPrx.checkedCast(p) + test(derived) + cb = AMI_MyDerivedClass_opDerivedI() + derived.opDerived_async(cb) + cb.check() diff --git a/py/test/Ice/operations/TwowaysNewAMI.py b/py/test/Ice/operations/TwowaysNewAMI.py new file mode 100644 index 00000000000..66d7e9e8a86 --- /dev/null +++ b/py/test/Ice/operations/TwowaysNewAMI.py @@ -0,0 +1,626 @@ +# ********************************************************************** +# +# Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved. +# +# This copy of Ice is licensed to you under the terms described in the +# ICE_LICENSE file included in this distribution. +# +# ********************************************************************** + +import Ice, Test, math, threading + +def test(b): + if not b: + raise RuntimeError('test assertion failed') + +class CallbackBase: + def __init__(self): + self._called = False + self._cond = threading.Condition() + + def check(self): + self._cond.acquire() + try: + while not self._called: + self._cond.wait() + self._called = False + finally: + self._cond.release() + + def called(self): + self._cond.acquire() + self._called = True + self._cond.notify() + self._cond.release() + +class Callback(CallbackBase): + def __init__(self, communicator=None): + CallbackBase.__init__(self) + self._communicator = communicator + + def ping(self): + self.called() + + def isA(self, r): + test(r) + self.called() + + def id(self, id): + test(id == "::Test::MyDerivedClass") + self.called() + + def ids(self, ids): + test(len(ids) == 3) + self.called() + + def opVoid(self): + self.called() + + def opByte(self, r, b): + test(b == 0xf0) + test(r == 0xff) + self.called() + + def opBool(self, r, b): + test(b) + test(not r) + self.called() + + def opShortIntLong(self, r, s, i, l): + test(s == 10) + test(i == 11) + test(l == 12) + test(r == 12) + self.called() + + def opFloatDouble(self, r, f, d): + test(f - 3.14 < 0.001) + test(d == 1.1E10) + test(r == 1.1E10) + self.called() + + def opString(self, r, s): + test(s == "world hello") + test(r == "hello world") + self.called() + + def opMyEnum(self, r, e): + test(e == Test.MyEnum.enum2) + test(r == Test.MyEnum.enum3) + self.called() + + def opMyClass(self, r, c1, c2): + test(c1.ice_getIdentity() == self._communicator.stringToIdentity("test")) + test(c2.ice_getIdentity() == self._communicator.stringToIdentity("noSuchIdentity")) + test(r.ice_getIdentity() == self._communicator.stringToIdentity("test")) + # We can't do the callbacks below in serialize mode + if self._communicator.getProperties().getPropertyAsInt("Ice.Client.ThreadPool.Serialize") == 0: + r.opVoid() + c1.opVoid() + try: + c2.opVoid() + test(False) + except Ice.ObjectNotExistException: + pass + self.called() + + def opStruct(self, rso, so): + test(rso.p == None) + test(rso.e == Test.MyEnum.enum2) + test(rso.s.s == "def") + test(so.e == Test.MyEnum.enum3) + test(so.s.s == "a new string") + # We can't do the callbacks below in serialize mode. + if self._communicator.getProperties().getPropertyAsInt("Ice.ThreadPool.Client.Serialize") == 0: + so.p.opVoid() + self.called() + + def opByteS(self, rso, bso): + test(len(bso) == 4) + test(bso[0] == '\x22') + test(bso[1] == '\x12') + test(bso[2] == '\x11') + test(bso[3] == '\x01') + test(len(rso) == 8) + test(rso[0] == '\x01') + test(rso[1] == '\x11') + test(rso[2] == '\x12') + test(rso[3] == '\x22') + test(rso[4] == '\xf1') + test(rso[5] == '\xf2') + test(rso[6] == '\xf3') + test(rso[7] == '\xf4') + self.called() + + def opBoolS(self, rso, bso): + test(len(bso) == 4) + test(bso[0]) + test(bso[1]) + test(not bso[2]) + test(not bso[3]) + test(len(rso) == 3) + test(not rso[0]) + test(rso[1]) + test(rso[2]) + self.called() + + def opShortIntLongS(self, rso, sso, iso, lso): + test(len(sso) == 3) + test(sso[0] == 1) + test(sso[1] == 2) + test(sso[2] == 3) + test(len(iso) == 4) + test(iso[0] == 8) + test(iso[1] == 7) + test(iso[2] == 6) + test(iso[3] == 5) + test(len(lso) == 6) + test(lso[0] == 10) + test(lso[1] == 30) + test(lso[2] == 20) + test(lso[3] == 10) + test(lso[4] == 30) + test(lso[5] == 20) + test(len(rso) == 3) + test(rso[0] == 10) + test(rso[1] == 30) + test(rso[2] == 20) + self.called() + + def opFloatDoubleS(self, rso, fso, dso): + test(len(fso) == 2) + test(fso[0] - 3.14 < 0.001) + test(fso[1] - 1.11 < 0.001) + test(len(dso) == 3) + test(dso[0] == 1.3E10) + test(dso[1] == 1.2E10) + test(dso[2] == 1.1E10) + test(len(rso) == 5) + test(rso[0] == 1.1E10) + test(rso[1] == 1.2E10) + test(rso[2] == 1.3E10) + test(rso[3] - 3.14 < 0.001) + test(rso[4] - 1.11 < 0.001) + self.called() + + def opStringS(self, rso, sso): + test(len(sso) == 4) + test(sso[0] == "abc") + test(sso[1] == "de") + test(sso[2] == "fghi") + test(sso[3] == "xyz") + test(len(rso) == 3) + test(rso[0] == "fghi") + test(rso[1] == "de") + test(rso[2] == "abc") + self.called() + + def opByteSS(self, rso, bso): + test(len(bso) == 2) + test(len(bso[0]) == 1) + test(bso[0][0] == '\xff') + test(len(bso[1]) == 3) + test(bso[1][0] == '\x01') + test(bso[1][1] == '\x11') + test(bso[1][2] == '\x12') + test(len(rso) == 4) + test(len(rso[0]) == 3) + test(rso[0][0] == '\x01') + test(rso[0][1] == '\x11') + test(rso[0][2] == '\x12') + test(len(rso[1]) == 1) + test(rso[1][0] == '\xff') + test(len(rso[2]) == 1) + test(rso[2][0] == '\x0e') + test(len(rso[3]) == 2) + test(rso[3][0] == '\xf2') + test(rso[3][1] == '\xf1') + self.called() + + def opFloatDoubleSS(self, rso, fso, dso): + test(len(fso) == 3) + test(len(fso[0]) == 1) + test(fso[0][0] - 3.14 < 0.001) + test(len(fso[1]) == 1) + test(fso[1][0] - 1.11 < 0.001) + test(len(fso[2]) == 0) + test(len(dso) == 1) + test(len(dso[0]) == 3) + test(dso[0][0] == 1.1E10) + test(dso[0][1] == 1.2E10) + test(dso[0][2] == 1.3E10) + test(len(rso) == 2) + test(len(rso[0]) == 3) + test(rso[0][0] == 1.1E10) + test(rso[0][1] == 1.2E10) + test(rso[0][2] == 1.3E10) + test(len(rso[1]) == 3) + test(rso[1][0] == 1.1E10) + test(rso[1][1] == 1.2E10) + test(rso[1][2] == 1.3E10) + self.called() + + def opStringSS(self, rso, sso): + test(len(sso) == 5) + test(len(sso[0]) == 1) + test(sso[0][0] == "abc") + test(len(sso[1]) == 2) + test(sso[1][0] == "de") + test(sso[1][1] == "fghi") + test(len(sso[2]) == 0) + test(len(sso[3]) == 0) + test(len(sso[4]) == 1) + test(sso[4][0] == "xyz") + test(len(rso) == 3) + test(len(rso[0]) == 1) + test(rso[0][0] == "xyz") + test(len(rso[1]) == 0) + test(len(rso[2]) == 0) + self.called() + + def opByteBoolD(self, ro, do): + di1 = {10: True, 100: False} + test(do == di1) + test(len(ro) == 4) + test(ro[10]) + test(not ro[11]) + test(not ro[100]) + test(ro[101]) + self.called() + + def opShortIntD(self, ro, do): + di1 = {110: -1, 1100: 123123} + test(do == di1) + test(len(ro) == 4) + test(ro[110] == -1) + test(ro[111] == -100) + test(ro[1100] == 123123) + test(ro[1101] == 0) + self.called() + + def opLongFloatD(self, ro, do): + di1 = {999999110: -1.1, 999999111: 123123.2} + for k in do: + test(math.fabs(do[k] - di1[k]) < 0.01) + test(len(ro) == 4) + test(ro[999999110] - -1.1 < 0.01) + test(ro[999999120] - -100.4 < 0.01) + test(ro[999999111] - 123123.2 < 0.01) + test(ro[999999130] - 0.5 < 0.01) + self.called() + + def opStringStringD(self, ro, do): + di1 = {'foo': 'abc -1.1', 'bar': 'abc 123123.2'} + test(do == di1) + test(len(ro) == 4) + test(ro["foo"] == "abc -1.1") + test(ro["FOO"] == "abc -100.4") + test(ro["bar"] == "abc 123123.2") + test(ro["BAR"] == "abc 0.5") + self.called() + + def opStringMyEnumD(self, ro, do): + di1 = {'abc': Test.MyEnum.enum1, '': Test.MyEnum.enum2} + test(do == di1) + test(len(ro) == 4) + test(ro["abc"] == Test.MyEnum.enum1) + test(ro["qwerty"] == Test.MyEnum.enum3) + test(ro[""] == Test.MyEnum.enum2) + test(ro["Hello!!"] == Test.MyEnum.enum2) + self.called() + + def opMyEnumStringD(self, ro, do): + di1 = {Test.MyEnum.enum1: 'abc'} + test(do == di1) + test(len(ro) == 3) + test(ro[Test.MyEnum.enum1] == "abc") + test(ro[Test.MyEnum.enum2] == "Hello!!") + test(ro[Test.MyEnum.enum3] == "qwerty") + self.called() + + def opMyStructMyEnumD(self, ro, do): + s11 = Test.MyStruct() + s11.i = 1 + s11.j = 1 + s12 = Test.MyStruct() + s12.i = 1 + s12.j = 2 + s22 = Test.MyStruct() + s22.i = 2 + s22.j = 2 + s23 = Test.MyStruct() + s23.i = 2 + s23.j = 3 + di1 = {s11: Test.MyEnum.enum1, s12: Test.MyEnum.enum2} + test(do == di1) + test(len(ro) == 4) + test(ro[s11] == Test.MyEnum.enum1) + test(ro[s12] == Test.MyEnum.enum2) + test(ro[s22] == Test.MyEnum.enum3) + test(ro[s23] == Test.MyEnum.enum2) + self.called() + + def opIntS(self, r): + for j in range(0, len(r)): + test(r[j] == -j) + self.called() + + def opDerived(self): + self.called() + + def exCB(self, ex): + test(False) + +def twowaysNewAMI(communicator, p): + cb = Callback() + p.begin_ice_ping(cb.ping, cb.exCB) + cb.check() + + cb = Callback() + p.begin_ice_isA("::Test::MyClass", cb.isA, cb.exCB) + cb.check() + + cb = Callback() + p.begin_ice_id(cb.id, cb.exCB) + cb.check() + + cb = Callback() + p.begin_ice_ids(cb.ids, cb.exCB) + cb.check() + + r = p.begin_opVoid() + p.end_opVoid(r) + + cb = Callback() + p.begin_opVoid(cb.opVoid, cb.exCB) + cb.check() + + r = p.begin_opByte(0xff, 0x0f) + (ret, p3) = p.end_opByte(r) + test(p3 == 0xf0) + test(ret == 0xff) + + cb = Callback() + p.begin_opByte(0xff, 0x0f, cb.opByte, cb.exCB) + cb.check() + + cb = Callback() + p.begin_opBool(True, False, cb.opBool, cb.exCB) + cb.check() + + cb = Callback() + p.begin_opShortIntLong(10, 11, 12, cb.opShortIntLong, cb.exCB) + cb.check() + + cb = Callback() + p.begin_opFloatDouble(3.14, 1.1E10, cb.opFloatDouble, cb.exCB) + cb.check() + + cb = Callback() + p.begin_opString("hello", "world", cb.opString, cb.exCB) + cb.check() + + cb = Callback() + p.begin_opMyEnum(Test.MyEnum.enum2, cb.opMyEnum, cb.exCB) + cb.check() + + cb = Callback(communicator) + p.begin_opMyClass(p, cb.opMyClass, cb.exCB) + cb.check() + + si1 = Test.Structure() + si1.p = p + si1.e = Test.MyEnum.enum3 + si1.s = Test.AnotherStruct() + si1.s.s = "abc" + si2 = Test.Structure() + si2.p = None + si2.e = Test.MyEnum.enum2 + si2.s = Test.AnotherStruct() + si2.s.s = "def" + + cb = Callback(communicator) + p.begin_opStruct(si1, si2, cb.opStruct, cb.exCB) + cb.check() + + bsi1 = (0x01, 0x11, 0x12, 0x22) + bsi2 = (0xf1, 0xf2, 0xf3, 0xf4) + + cb = Callback() + p.begin_opByteS(bsi1, bsi2, cb.opByteS, cb.exCB) + cb.check() + + bsi1 = (True, True, False) + bsi2 = (False,) + + cb = Callback() + p.begin_opBoolS(bsi1, bsi2, cb.opBoolS, cb.exCB) + cb.check() + + ssi = (1, 2, 3) + isi = (5, 6, 7, 8) + lsi = (10, 30, 20) + + cb = Callback() + p.begin_opShortIntLongS(ssi, isi, lsi, cb.opShortIntLongS, cb.exCB) + cb.check() + + fsi = (3.14, 1.11) + dsi = (1.1E10, 1.2E10, 1.3E10) + + cb = Callback() + p.begin_opFloatDoubleS(fsi, dsi, cb.opFloatDoubleS, cb.exCB) + cb.check() + + ssi1 = ('abc', 'de', 'fghi') + ssi2 = ('xyz',) + + cb = Callback() + p.begin_opStringS(ssi1, ssi2, cb.opStringS, cb.exCB) + cb.check() + + bsi1 = ((0x01, 0x11, 0x12), (0xff,)) + bsi2 = ((0x0e,), (0xf2, 0xf1)) + + cb = Callback() + p.begin_opByteSS(bsi1, bsi2, cb.opByteSS, cb.exCB) + cb.check() + + fsi = ((3.14,), (1.11,), ()) + dsi = ((1.1E10, 1.2E10, 1.3E10),) + + cb = Callback() + p.begin_opFloatDoubleSS(fsi, dsi, cb.opFloatDoubleSS, cb.exCB) + cb.check() + + ssi1 = (('abc',), ('de', 'fghi')) + ssi2 = ((), (), ('xyz',)) + + cb = Callback() + p.begin_opStringSS(ssi1, ssi2, cb.opStringSS, cb.exCB) + cb.check() + + di1 = {10: True, 100: False} + di2 = {10: True, 11: False, 101: True} + + cb = Callback() + p.begin_opByteBoolD(di1, di2, cb.opByteBoolD, cb.exCB) + cb.check() + + di1 = {110: -1, 1100: 123123} + di2 = {110: -1, 111: -100, 1101: 0} + + cb = Callback() + p.begin_opShortIntD(di1, di2, cb.opShortIntD, cb.exCB) + cb.check() + + di1 = {999999110: -1.1, 999999111: 123123.2} + di2 = {999999110: -1.1, 999999120: -100.4, 999999130: 0.5} + + cb = Callback() + p.begin_opLongFloatD(di1, di2, cb.opLongFloatD, cb.exCB) + cb.check() + + di1 = {'foo': 'abc -1.1', 'bar': 'abc 123123.2'} + di2 = {'foo': 'abc -1.1', 'FOO': 'abc -100.4', 'BAR': 'abc 0.5'} + + cb = Callback() + p.begin_opStringStringD(di1, di2, cb.opStringStringD, cb.exCB) + cb.check() + + di1 = {'abc': Test.MyEnum.enum1, '': Test.MyEnum.enum2} + di2 = {'abc': Test.MyEnum.enum1, 'qwerty': Test.MyEnum.enum3, 'Hello!!': Test.MyEnum.enum2} + + cb = Callback() + p.begin_opStringMyEnumD(di1, di2, cb.opStringMyEnumD, cb.exCB) + cb.check() + + di1 = {Test.MyEnum.enum1: 'abc'} + di2 = {Test.MyEnum.enum2: 'Hello!!', Test.MyEnum.enum3: 'qwerty'} + + cb = Callback() + p.begin_opMyEnumStringD(di1, di2, cb.opMyEnumStringD, cb.exCB) + cb.check() + + s11 = Test.MyStruct() + s11.i = 1 + s11.j = 1 + s12 = Test.MyStruct() + s12.i = 1 + s12.j = 2 + s22 = Test.MyStruct() + s22.i = 2 + s22.j = 2 + s23 = Test.MyStruct() + s23.i = 2 + s23.j = 3 + di1 = {s11: Test.MyEnum.enum1, s12: Test.MyEnum.enum2} + di2 = {s11: Test.MyEnum.enum1, s22: Test.MyEnum.enum3, s23: Test.MyEnum.enum2} + + cb = Callback() + p.begin_opMyStructMyEnumD(di1, di2, cb.opMyStructMyEnumD, cb.exCB) + cb.check() + + lengths = ( 0, 1, 2, 126, 127, 128, 129, 253, 254, 255, 256, 257, 1000 ) + for l in lengths: + s = [] + for i in range(l): + s.append(i) + cb = Callback(l) + p.begin_opIntS(s, cb.opIntS, cb.exCB) + cb.check() + + ctx = {'one': 'ONE', 'two': 'TWO', 'three': 'THREE'} + + test(len(p.ice_getContext()) == 0) + r = p.begin_opContext() + c = p.end_opContext(r) + test(c != ctx) + + test(len(p.ice_getContext()) == 0) + r = p.begin_opContext(_ctx=ctx) + c = p.end_opContext(r) + test(c == ctx) + + p2 = Test.MyClassPrx.checkedCast(p.ice_context(ctx)) + test(p2.ice_getContext() == ctx) + r = p2.begin_opContext() + c = p2.end_opContext(r) + test(c == ctx) + + r = p2.begin_opContext(_ctx=ctx) + c = p2.end_opContext(r) + test(c == ctx) + + # + # Test implicit context propagation + # + impls = ( 'Shared', 'PerThread' ) + for i in impls: + initData = Ice.InitializationData() + initData.properties = communicator.getProperties().clone() + initData.properties.setProperty('Ice.ImplicitContext', i) + ic = Ice.initialize(data=initData) + + ctx = {'one': 'ONE', 'two': 'TWO', 'three': 'THREE'} + + p3 = Test.MyClassPrx.uncheckedCast(ic.stringToProxy("test:default -p 12010")) + + ic.getImplicitContext().setContext(ctx) + test(ic.getImplicitContext().getContext() == ctx) + r = p3.begin_opContext() + c = p3.end_opContext(r) + test(c == ctx) + + ic.getImplicitContext().put('zero', 'ZERO') + + ctx = ic.getImplicitContext().getContext() + r = p3.begin_opContext() + c = p3.end_opContext(r) + test(c == ctx) + + prxContext = {'one': 'UN', 'four': 'QUATRE'} + + combined = {} + combined.update(ctx) + combined.update(prxContext) + test(combined['one'] == 'UN') + + p3 = Test.MyClassPrx.uncheckedCast(p3.ice_context(prxContext)) + ic.getImplicitContext().setContext({}) + r = p3.begin_opContext() + c = p3.end_opContext(r) + test(c == prxContext) + + ic.getImplicitContext().setContext(ctx) + r = p3.begin_opContext() + c = p3.end_opContext(r) + test(c == combined) + + ic.destroy() + + derived = Test.MyDerivedClassPrx.checkedCast(p) + test(derived) + cb = Callback() + derived.begin_opDerived(cb.opDerived, cb.exCB) + cb.check() diff --git a/py/test/Ice/proxy/TestAMD.ice b/py/test/Ice/proxy/TestAMD.ice index 12b39fc4028..95186ccd283 100644 --- a/py/test/Ice/proxy/TestAMD.ice +++ b/py/test/Ice/proxy/TestAMD.ice @@ -15,14 +15,14 @@ module Test { -["ami", "amd"] class MyClass +["amd"] class MyClass { void shutdown(); Ice::Context getContext(); }; -["ami", "amd"] class MyDerivedClass extends MyClass +["amd"] class MyDerivedClass extends MyClass { Object* echo(Object* obj); }; diff --git a/py/test/Ice/retry/AllTests.py b/py/test/Ice/retry/AllTests.py index cc19f232c6f..12d498c2b94 100644 --- a/py/test/Ice/retry/AllTests.py +++ b/py/test/Ice/retry/AllTests.py @@ -33,24 +33,18 @@ class CallbackBase: self._cond.notify() self._cond.release() -class AMIRegular(CallbackBase): - def __init__(self): - CallbackBase.__init__(self) - - def ice_response(self): +class CallbackSuccess(CallbackBase): + def response(self): self.called() - def ice_exception(self, ex): + def exception(self, ex): test(False) -class AMIException(CallbackBase): - def __init__(self): - CallbackBase.__init__(self) - - def ice_response(self): +class CallbackFail(CallbackBase): + def response(self): test(False) - def ice_exception(self, ex): + def exception(self, ex): test(isinstance(ex, Ice.ConnectionLostException)) self.called() @@ -87,23 +81,22 @@ def allTests(communicator): retry1.op(False) print "ok" - cb1 = AMIRegular() - cb2 = AMIException() + cb1 = CallbackSuccess() + cb2 = CallbackFail() print "calling regular AMI operation with first proxy...", - retry1.op_async(cb1, False) + retry1.begin_op(False, cb1.response, cb1.exception) cb1.check() print "ok" print "calling AMI operation to kill connection with second proxy...", - retry2.op_async(cb2, True) + retry2.begin_op(True, cb2.response, cb2.exception) cb2.check() print "ok" print "calling regular AMI operation with first proxy again...", - retry1.op_async(cb1, False) + retry1.begin_op(False, cb1.response, cb1.exception) cb1.check() print "ok" return retry1 - return retry1 diff --git a/py/test/Ice/retry/Test.ice b/py/test/Ice/retry/Test.ice index 6a48fa388a3..d8a1c67e2a2 100644 --- a/py/test/Ice/retry/Test.ice +++ b/py/test/Ice/retry/Test.ice @@ -15,7 +15,7 @@ module Test interface Retry { - ["ami"] void op(bool kill); + void op(bool kill); void shutdown(); }; diff --git a/py/test/Ice/slicing/exceptions/AllTests.py b/py/test/Ice/slicing/exceptions/AllTests.py index 79e09026355..b6913be8bab 100644 --- a/py/test/Ice/slicing/exceptions/AllTests.py +++ b/py/test/Ice/slicing/exceptions/AllTests.py @@ -37,11 +37,11 @@ class CallbackBase: self._cond.notify() self._cond.release() -class AMI_Test_baseAsBaseI(CallbackBase): - def ice_response(self): +class Callback(CallbackBase): + def response(self): test(False) - def ice_exception(self, exc): + def exception_baseAsBase(self, exc): try: raise exc except Test.Base, b: @@ -51,11 +51,7 @@ class AMI_Test_baseAsBaseI(CallbackBase): test(False) self.called() -class AMI_Test_unknownDerivedAsBaseI(CallbackBase): - def ice_response(self): - test(False) - - def ice_exception(self, exc): + def exception_unknownDerivedAsBase(self, exc): try: raise exc except Test.Base, b: @@ -65,11 +61,7 @@ class AMI_Test_unknownDerivedAsBaseI(CallbackBase): test(False) self.called() -class AMI_Test_knownDerivedAsBaseI(CallbackBase): - def ice_response(self): - test(False) - - def ice_exception(self, exc): + def exception_knownDerivedAsBase(self, exc): try: raise exc except Test.KnownDerived, k: @@ -80,11 +72,7 @@ class AMI_Test_knownDerivedAsBaseI(CallbackBase): test(False) self.called() -class AMI_Test_knownDerivedAsKnownDerivedI(CallbackBase): - def ice_response(self): - test(False) - - def ice_exception(self, exc): + def exception_knownDerivedAsKnownDerived(self, exc): try: raise exc except Test.KnownDerived, k: @@ -95,11 +83,7 @@ class AMI_Test_knownDerivedAsKnownDerivedI(CallbackBase): test(False) self.called() -class AMI_Test_unknownIntermediateAsBaseI(CallbackBase): - def ice_response(self): - test(False) - - def ice_exception(self, exc): + def exception_unknownIntermediateAsBase(self, exc): try: raise exc except Test.Base, b: @@ -109,11 +93,7 @@ class AMI_Test_unknownIntermediateAsBaseI(CallbackBase): test(False) self.called() -class AMI_Test_knownIntermediateAsBaseI(CallbackBase): - def ice_response(self): - test(False) - - def ice_exception(self, exc): + def exception_knownIntermediateAsBase(self, exc): try: raise exc except Test.KnownIntermediate, ki: @@ -124,11 +104,7 @@ class AMI_Test_knownIntermediateAsBaseI(CallbackBase): test(False) self.called() -class AMI_Test_knownMostDerivedAsBaseI(CallbackBase): - def ice_response(self): - test(False) - - def ice_exception(self, exc): + def exception_knownMostDerivedAsBase(self, exc): try: raise exc except Test.KnownMostDerived, kmd: @@ -140,11 +116,7 @@ class AMI_Test_knownMostDerivedAsBaseI(CallbackBase): test(False) self.called() -class AMI_Test_knownIntermediateAsKnownIntermediateI(CallbackBase): - def ice_response(self): - test(False) - - def ice_exception(self, exc): + def exception_knownIntermediateAsKnownIntermediate(self, exc): try: raise exc except Test.KnownIntermediate, ki: @@ -155,11 +127,7 @@ class AMI_Test_knownIntermediateAsKnownIntermediateI(CallbackBase): test(False) self.called() -class AMI_Test_knownMostDerivedAsKnownMostDerivedI(CallbackBase): - def ice_response(self): - test(False) - - def ice_exception(self, exc): + def exception_knownMostDerivedAsKnownMostDerived(self, exc): try: raise exc except Test.KnownMostDerived, kmd: @@ -171,11 +139,7 @@ class AMI_Test_knownMostDerivedAsKnownMostDerivedI(CallbackBase): test(False) self.called() -class AMI_Test_knownMostDerivedAsKnownIntermediateI(CallbackBase): - def ice_response(self): - test(False) - - def ice_exception(self, exc): + def exception_knownMostDerivedAsKnownIntermediate(self, exc): try: raise exc except Test.KnownMostDerived, kmd: @@ -187,11 +151,7 @@ class AMI_Test_knownMostDerivedAsKnownIntermediateI(CallbackBase): test(False) self.called() -class AMI_Test_unknownMostDerived1AsBaseI(CallbackBase): - def ice_response(self): - test(False) - - def ice_exception(self, exc): + def exception_unknownMostDerived1AsBase(self, exc): try: raise exc except Test.KnownIntermediate, ki: @@ -202,11 +162,7 @@ class AMI_Test_unknownMostDerived1AsBaseI(CallbackBase): test(False) self.called() -class AMI_Test_unknownMostDerived1AsKnownIntermediateI(CallbackBase): - def ice_response(self): - test(False) - - def ice_exception(self, exc): + def exception_unknownMostDerived1AsKnownIntermediate(self, exc): try: raise exc except Test.KnownIntermediate, ki: @@ -217,11 +173,7 @@ class AMI_Test_unknownMostDerived1AsKnownIntermediateI(CallbackBase): test(False) self.called() -class AMI_Test_unknownMostDerived2AsBaseI(CallbackBase): - def ice_response(self): - test(False) - - def ice_exception(self, exc): + def exception_unknownMostDerived2AsBase(self, exc): try: raise exc except Test.Base, b: @@ -247,8 +199,8 @@ def allTests(communicator): print "ok" print "base (AMI)... ", - cb = AMI_Test_baseAsBaseI() - t.baseAsBase_async(cb) + cb = Callback() + t.begin_baseAsBase(cb.response, cb.exception_baseAsBase) cb.check() print "ok" @@ -264,8 +216,8 @@ def allTests(communicator): print "ok" print "slicing of unknown derived (AMI)... ", - cb = AMI_Test_unknownDerivedAsBaseI() - t.unknownDerivedAsBase_async(cb) + cb = Callback() + t.begin_unknownDerivedAsBase(cb.response, cb.exception_unknownDerivedAsBase) cb.check() print "ok" @@ -282,8 +234,8 @@ def allTests(communicator): print "ok" print "non-slicing of known derived as base (AMI)... ", - cb = AMI_Test_knownDerivedAsBaseI() - t.knownDerivedAsBase_async(cb) + cb = Callback() + t.begin_knownDerivedAsBase(cb.response, cb.exception_knownDerivedAsBase) cb.check() print "ok" @@ -300,8 +252,8 @@ def allTests(communicator): print "ok" print "non-slicing of known derived as derived (AMI)... ", - cb = AMI_Test_knownDerivedAsKnownDerivedI() - t.knownDerivedAsKnownDerived_async(cb) + cb = Callback() + t.begin_knownDerivedAsKnownDerived(cb.response, cb.exception_knownDerivedAsKnownDerived) cb.check() print "ok" @@ -317,8 +269,8 @@ def allTests(communicator): print "ok" print "slicing of unknown intermediate as base (AMI)... ", - cb = AMI_Test_unknownIntermediateAsBaseI() - t.unknownIntermediateAsBase_async(cb) + cb = Callback() + t.begin_unknownIntermediateAsBase(cb.response, cb.exception_unknownIntermediateAsBase) cb.check() print "ok" @@ -335,8 +287,8 @@ def allTests(communicator): print "ok" print "slicing of known intermediate as base (AMI)... ", - cb = AMI_Test_knownIntermediateAsBaseI() - t.knownIntermediateAsBase_async(cb) + cb = Callback() + t.begin_knownIntermediateAsBase(cb.response, cb.exception_knownIntermediateAsBase) cb.check() print "ok" @@ -354,8 +306,8 @@ def allTests(communicator): print "ok" print "slicing of known most derived as base (AMI)... ", - cb = AMI_Test_knownMostDerivedAsBaseI() - t.knownMostDerivedAsBase_async(cb) + cb = Callback() + t.begin_knownMostDerivedAsBase(cb.response, cb.exception_knownMostDerivedAsBase) cb.check() print "ok" @@ -372,8 +324,8 @@ def allTests(communicator): print "ok" print "non-slicing of known intermediate as intermediate (AMI)... ", - cb = AMI_Test_knownIntermediateAsKnownIntermediateI() - t.knownIntermediateAsKnownIntermediate_async(cb) + cb = Callback() + t.begin_knownIntermediateAsKnownIntermediate(cb.response, cb.exception_knownIntermediateAsKnownIntermediate) cb.check() print "ok" @@ -391,8 +343,8 @@ def allTests(communicator): print "ok" print "non-slicing of known most derived as intermediate (AMI)... ", - cb = AMI_Test_knownMostDerivedAsKnownIntermediateI() - t.knownMostDerivedAsKnownIntermediate_async(cb) + cb = Callback() + t.begin_knownMostDerivedAsKnownIntermediate(cb.response, cb.exception_knownMostDerivedAsKnownIntermediate) cb.check() print "ok" @@ -410,8 +362,8 @@ def allTests(communicator): print "ok" print "non-slicing of known most derived as most derived (AMI)... ", - cb = AMI_Test_knownMostDerivedAsKnownMostDerivedI() - t.knownMostDerivedAsKnownMostDerived_async(cb) + cb = Callback() + t.begin_knownMostDerivedAsKnownMostDerived(cb.response, cb.exception_knownMostDerivedAsKnownMostDerived) cb.check() print "ok" @@ -428,8 +380,8 @@ def allTests(communicator): print "ok" print "slicing of unknown most derived, known intermediate as base (AMI)... ", - cb = AMI_Test_unknownMostDerived1AsBaseI() - t.unknownMostDerived1AsBase_async(cb) + cb = Callback() + t.begin_unknownMostDerived1AsBase(cb.response, cb.exception_unknownMostDerived1AsBase) cb.check() print "ok" @@ -446,8 +398,8 @@ def allTests(communicator): print "ok" print "slicing of unknown most derived, known intermediate as intermediate (AMI)... ", - cb = AMI_Test_unknownMostDerived1AsKnownIntermediateI() - t.unknownMostDerived1AsKnownIntermediate_async(cb) + cb = Callback() + t.begin_unknownMostDerived1AsKnownIntermediate(cb.response, cb.exception_unknownMostDerived1AsKnownIntermediate) cb.check() print "ok" @@ -463,8 +415,8 @@ def allTests(communicator): print "ok" print "slicing of unknown most derived, unknown intermediate as base (AMI)... ", - cb = AMI_Test_unknownMostDerived2AsBaseI() - t.unknownMostDerived2AsBase_async(cb) + cb = Callback() + t.begin_unknownMostDerived2AsBase(cb.response, cb.exception_unknownMostDerived2AsBase) cb.check() print "ok" diff --git a/py/test/Ice/slicing/exceptions/Test.ice b/py/test/Ice/slicing/exceptions/Test.ice index a5918458a6c..60d3c2e7466 100644 --- a/py/test/Ice/slicing/exceptions/Test.ice +++ b/py/test/Ice/slicing/exceptions/Test.ice @@ -33,7 +33,7 @@ exception KnownMostDerived extends KnownIntermediate string kmd; }; -["ami"] interface TestIntf +interface TestIntf { void baseAsBase() throws Base; void unknownDerivedAsBase() throws Base; diff --git a/py/test/Ice/slicing/exceptions/TestAMD.ice b/py/test/Ice/slicing/exceptions/TestAMD.ice index f878338c995..49512216729 100644 --- a/py/test/Ice/slicing/exceptions/TestAMD.ice +++ b/py/test/Ice/slicing/exceptions/TestAMD.ice @@ -33,7 +33,7 @@ exception KnownMostDerived extends KnownIntermediate string kmd; }; -["ami", "amd"] interface TestIntf +["amd"] interface TestIntf { void baseAsBase() throws Base; void unknownDerivedAsBase() throws Base; diff --git a/py/test/Ice/slicing/objects/AllTests.py b/py/test/Ice/slicing/objects/AllTests.py index 34efd2d973c..45c8004d65c 100644 --- a/py/test/Ice/slicing/objects/AllTests.py +++ b/py/test/Ice/slicing/objects/AllTests.py @@ -37,8 +37,8 @@ class CallbackBase: self._cond.notify() self._cond.release() -class AMI_Test_SBaseAsObjectI(CallbackBase): - def ice_response(self, o): +class Callback(CallbackBase): + def response_SBaseAsObject(self, o): test(o) test(o.ice_id() == "::Test::SBase") sb = o @@ -46,64 +46,39 @@ class AMI_Test_SBaseAsObjectI(CallbackBase): test(sb.sb == "SBase.sb") self.called() - def ice_exception(self, exc): - test(False) - -class AMI_Test_SBaseAsSBaseI(CallbackBase): - def ice_response(self, sb): + def response_SBaseAsSBase(self, sb): test(sb.sb == "SBase.sb") self.called() - def ice_exception(self, exc): - test(False) - -class AMI_Test_SBSKnownDerivedAsSBaseI(CallbackBase): - def ice_response(self, sb): + def response_SBSKnownDerivedAsSBase(self, sb): sbskd = sb test(isinstance(sbskd, Test.SBSKnownDerived)) test(sbskd.sbskd == "SBSKnownDerived.sbskd") self.called() - def ice_exception(self, exc): - test(False) - -class AMI_Test_SBSKnownDerivedAsSBSKnownDerivedI(CallbackBase): - def ice_response(self, sbskd): + def response_SBSKnownDerivedAsSBSKnownDerived(self, sbskd): test(sbskd.sbskd == "SBSKnownDerived.sbskd") self.called() - def ice_exception(self, exc): - test(False) - -class AMI_Test_SBSUnknownDerivedAsSBaseI(CallbackBase): - def ice_response(self, sb): + def response_SBSUnknownDerivedAsSBase(self, sb): test(sb.sb == "SBSUnknownDerived.sb") self.called() - def ice_exception(self, exc): - test(False) - -class AMI_Test_SUnknownAsObjectI(CallbackBase): - def ice_response(self, o): + def response_SUnknownAsObject(self, o): test(False) - def ice_exception(self, exc): + def exception_SUnknownAsObject(self, exc): test(exc.ice_name() == "Ice::NoObjectFactoryException") self.called() -class AMI_Test_oneElementCycleI(CallbackBase): - def ice_response(self, b): + def response_oneElementCycle(self, b): test(b) test(b.ice_id() == "::Test::B") test(b.sb == "B1.sb") test(b.pb == b) self.called() - def ice_exception(self, exc): - test(False) - -class AMI_Test_twoElementCycleI(CallbackBase): - def ice_response(self, b1): + def response_twoElementCycle(self, b1): test(b1) test(b1.ice_id() == "::Test::B") test(b1.sb == "B1.sb") @@ -115,11 +90,7 @@ class AMI_Test_twoElementCycleI(CallbackBase): test(b2.pb == b1) self.called() - def ice_exception(self, exc): - test(False) - -class AMI_Test_D1AsBI(CallbackBase): - def ice_response(self, b1): + def response_D1AsB(self, b1): test(b1) test(b1.ice_id() == "::Test::D1") test(b1.sb == "D1.sb") @@ -139,11 +110,7 @@ class AMI_Test_D1AsBI(CallbackBase): test(b2.ice_id() == "::Test::B") self.called() - def ice_exception(self, exc): - test(False) - -class AMI_Test_D1AsD1I(CallbackBase): - def ice_response(self, d1): + def response_D1AsD1(self, d1): test(d1) test(d1.ice_id() == "::Test::D1") test(d1.sb == "D1.sb") @@ -157,11 +124,7 @@ class AMI_Test_D1AsD1I(CallbackBase): test(b2.pb == d1) self.called() - def ice_exception(self, exc): - test(False) - -class AMI_Test_D2AsBI(CallbackBase): - def ice_response(self, b2): + def response_D2AsB(self, b2): test(b2) test(b2.ice_id() == "::Test::B") test(b2.sb == "D2.sb") @@ -179,11 +142,7 @@ class AMI_Test_D2AsBI(CallbackBase): test(d1.pd1 == b2) self.called() - def ice_exception(self, exc): - test(False) - -class AMI_Test_paramTest1I(CallbackBase): - def ice_response(self, b1, b2): + def response_paramTest1(self, b1, b2): test(b1) test(b1.ice_id() == "::Test::D1") test(b1.sb == "D1.sb") @@ -199,35 +158,19 @@ class AMI_Test_paramTest1I(CallbackBase): test(b2.pb == b1) self.called() - def ice_exception(self, exc): - test(False) - -class AMI_Test_returnTest1I(CallbackBase): - def ice_response(self, r, p1, p2): + def response_returnTest1(self, r, p1, p2): test(r == p1) self.called() - def ice_exception(self, exc): - test(False) - -class AMI_Test_returnTest2I(CallbackBase): - def ice_response(self, r, p1, p2): + def response_returnTest2(self, r, p1, p2): test(r == p1) self.called() - def ice_exception(self, exc): - test(False) - -class AMI_Test_returnTest3I(CallbackBase): - def ice_response(self, b): + def response_returnTest3(self, b): self.r = b self.called() - def ice_exception(self, exc): - test(False) - -class AMI_Test_paramTest3I(CallbackBase): - def ice_response(self, ret, p1, p2): + def response_paramTest3(self, ret, p1, p2): test(p1) test(p1.sb == "D2.sb (p1 1)") test(p1.pb == None) @@ -244,11 +187,7 @@ class AMI_Test_paramTest3I(CallbackBase): test(ret.ice_id() == "::Test::D1") self.called() - def ice_exception(self, exc): - test(False) - -class AMI_Test_paramTest4I(CallbackBase): - def ice_response(self, ret, b): + def response_paramTest4(self, ret, b): test(b) test(b.sb == "D4.sb (1)") test(b.pb == None) @@ -260,31 +199,16 @@ class AMI_Test_paramTest4I(CallbackBase): test(ret.ice_id() == "::Test::B") self.called() - def ice_exception(self, exc): - test(False) - -class AMI_Test_sequenceTestI(CallbackBase): - def ice_response(self, ss): + def response_sequenceTest(self, ss): self.r = ss self.called() - def ice_exception(self, exc): - test(False) - -class AMI_Test_dictionaryTestI(CallbackBase): - def ice_response(self, r, bout): + def response_dictionaryTest(self, r, bout): self.r = r self.bout = bout self.called() - def ice_exception(self, exc): - test(False) - -class AMI_Test_throwBaseAsBaseI(CallbackBase): - def ice_response(self): - test(False) - - def ice_exception(self, ex): + def exception_throwBaseAsBase(self, ex): test(ex.ice_name() == "Test::BaseException") e = ex test(isinstance(e, Test.BaseException)) @@ -294,11 +218,7 @@ class AMI_Test_throwBaseAsBaseI(CallbackBase): test(e.pb.pb == e.pb) self.called() -class AMI_Test_throwDerivedAsBaseI(CallbackBase): - def ice_response(self): - test(False) - - def ice_exception(self, ex): + def exception_throwDerivedAsBase(self, ex): test(ex.ice_name() == "Test::DerivedException") e = ex test(isinstance(e, Test.DerivedException)) @@ -314,11 +234,7 @@ class AMI_Test_throwDerivedAsBaseI(CallbackBase): test(e.pd1.pd1 == e.pd1) self.called() -class AMI_Test_throwDerivedAsDerivedI(CallbackBase): - def ice_response(self): - test(False) - - def ice_exception(self, ex): + def exception_throwDerivedAsDerived(self, ex): test(ex.ice_name() == "Test::DerivedException") e = ex test(isinstance(e, Test.DerivedException)) @@ -334,11 +250,7 @@ class AMI_Test_throwDerivedAsDerivedI(CallbackBase): test(e.pd1.pd1 == e.pd1) self.called() -class AMI_Test_throwUnknownDerivedAsBaseI(CallbackBase): - def ice_response(self): - test(False) - - def ice_exception(self, ex): + def exception_throwUnknownDerivedAsBase(self, ex): test(ex.ice_name() == "Test::BaseException") e = ex test(isinstance(e, Test.BaseException)) @@ -348,12 +260,14 @@ class AMI_Test_throwUnknownDerivedAsBaseI(CallbackBase): test(e.pb.pb == e.pb) self.called() -class AMI_Test_useForwardI(CallbackBase): - def ice_response(self, f): + def response_useForward(self, f): test(f) self.called() - def ice_exception(self, exc): + def response(self): + test(False) + + def exception(self, exc): test(False) def allTests(communicator): @@ -375,8 +289,8 @@ def allTests(communicator): print "ok" print "base as Object (AMI)... ", - cb = AMI_Test_SBaseAsObjectI() - t.SBaseAsObject_async(cb) + cb = Callback() + t.begin_SBaseAsObject(cb.response_SBaseAsObject, cb.exception) cb.check() print "ok" @@ -389,8 +303,8 @@ def allTests(communicator): print "ok" print "base as base (AMI)... ", - cb = AMI_Test_SBaseAsSBaseI() - t.SBaseAsSBase_async(cb) + cb = Callback() + t.begin_SBaseAsSBase(cb.response_SBaseAsSBase, cb.exception) cb.check() print "ok" @@ -407,8 +321,8 @@ def allTests(communicator): print "ok" print "base with known derived as base (AMI)... ", - cb = AMI_Test_SBSKnownDerivedAsSBaseI() - t.SBSKnownDerivedAsSBase_async(cb) + cb = Callback() + t.begin_SBSKnownDerivedAsSBase(cb.response_SBSKnownDerivedAsSBase, cb.exception) cb.check() print "ok" @@ -421,8 +335,8 @@ def allTests(communicator): print "ok" print "base with known derived as known derived (AMI)... ", - cb = AMI_Test_SBSKnownDerivedAsSBSKnownDerivedI() - t.SBSKnownDerivedAsSBSKnownDerived_async(cb) + cb = Callback() + t.begin_SBSKnownDerivedAsSBSKnownDerived(cb.response_SBSKnownDerivedAsSBSKnownDerived, cb.exception) cb.check() print "ok" @@ -435,8 +349,8 @@ def allTests(communicator): print "ok" print "base with unknown derived as base (AMI)... ", - cb = AMI_Test_SBSUnknownDerivedAsSBaseI() - t.SBSUnknownDerivedAsSBase_async(cb) + cb = Callback() + t.begin_SBSUnknownDerivedAsSBase(cb.response_SBSUnknownDerivedAsSBase, cb.exception) cb.check() print "ok" @@ -452,8 +366,8 @@ def allTests(communicator): print "unknown with Object as Object (AMI)... ", try: - cb = AMI_Test_SUnknownAsObjectI() - t.SUnknownAsObject_async(cb) + cb = Callback() + t.begin_SUnknownAsObject(cb.response_SUnknownAsObject, cb.exception_SUnknownAsObject) cb.check() except Ice.NoObjectFactoryException: pass @@ -473,8 +387,8 @@ def allTests(communicator): print "ok" print "one-element cycle (AMI)... ", - cb = AMI_Test_oneElementCycleI() - t.oneElementCycle_async(cb) + cb = Callback() + t.begin_oneElementCycle(cb.response_oneElementCycle, cb.exception) cb.check() print "ok" @@ -495,8 +409,8 @@ def allTests(communicator): print "ok" print "two-element cycle (AMI)... ", - cb = AMI_Test_twoElementCycleI() - t.twoElementCycle_async(cb) + cb = Callback() + t.begin_twoElementCycle(cb.response_twoElementCycle, cb.exception) cb.check() print "ok" @@ -525,8 +439,8 @@ def allTests(communicator): print "ok" print "known derived pointer slicing as base (AMI)... ", - cb = AMI_Test_D1AsBI() - t.D1AsB_async(cb) + cb = Callback() + t.begin_D1AsB(cb.response_D1AsB, cb.exception) cb.check() print "ok" @@ -549,8 +463,8 @@ def allTests(communicator): print "ok" print "known derived pointer slicing as derived (AMI)... ", - cb = AMI_Test_D1AsD1I() - t.D1AsD1_async(cb) + cb = Callback() + t.begin_D1AsD1(cb.response_D1AsD1, cb.exception) cb.check() print "ok" @@ -577,8 +491,8 @@ def allTests(communicator): print "ok" print "unknown derived pointer slicing as base (AMI)... ", - cb = AMI_Test_D2AsBI() - t.D2AsB_async(cb) + cb = Callback() + t.begin_D2AsB(cb.response_D2AsB, cb.exception) cb.check() print "ok" @@ -604,8 +518,8 @@ def allTests(communicator): print "ok" print "param ptr slicing with known first (AMI)... ", - cb = AMI_Test_paramTest1I() - t.paramTest1_async(cb) + cb = Callback() + t.begin_paramTest1(cb.response_paramTest1, cb.exception) cb.check() print "ok" @@ -641,8 +555,8 @@ def allTests(communicator): print "ok" print "return value identity with known first (AMI)... ", - cb = AMI_Test_returnTest1I() - t.returnTest1_async(cb) + cb = Callback() + t.begin_returnTest1(cb.response_returnTest1, cb.exception) cb.check() print "ok" @@ -655,8 +569,8 @@ def allTests(communicator): print "ok" print "return value identity with unknown first (AMI)... ", - cb = AMI_Test_returnTest2I() - t.returnTest2_async(cb) + cb = Callback() + t.begin_returnTest2(cb.response_returnTest2, cb.exception) cb.check() print "ok" @@ -712,8 +626,8 @@ def allTests(communicator): d1.pb = d3 d1.pd1 = d3 - cb = AMI_Test_returnTest3I() - t.returnTest3_async(cb, d1, d3) + cb = Callback() + t.begin_returnTest3(d1, d3, cb.response_returnTest3, cb.exception) cb.check() b1 = cb.r @@ -793,8 +707,8 @@ def allTests(communicator): d1.pb = d3 d1.pd1 = d3 - cb = AMI_Test_returnTest3I() - t.returnTest3_async(cb, d3, d1) + cb = Callback() + t.begin_returnTest3(d3, d1, cb.response_returnTest3, cb.exception) cb.check() b1 = cb.r @@ -845,8 +759,8 @@ def allTests(communicator): print "ok" print "remainder unmarshaling (3 instances) (AMI)... ", - cb = AMI_Test_paramTest3I() - t.paramTest3_async(cb) + cb = Callback() + t.begin_paramTest3(cb.response_paramTest3, cb.exception) cb.check() print "ok" @@ -868,8 +782,8 @@ def allTests(communicator): print "ok" print "remainder unmarshaling (4 instances) (AMI)... ", - cb = AMI_Test_paramTest4I() - t.paramTest4_async(cb) + cb = Callback() + t.begin_paramTest4(cb.response_paramTest4, cb.exception) cb.check() print "ok" @@ -915,8 +829,8 @@ def allTests(communicator): b2.sb = "B.sb(2)" b2.pb = b1 - cb = AMI_Test_returnTest3I() - t.returnTest3_async(cb, d3, b2) + cb = Callback() + t.begin_returnTest3(d3, b2, cb.response_returnTest3, cb.exception) cb.check() r = cb.r @@ -977,8 +891,8 @@ def allTests(communicator): d12.sd1 = "D1.sd1(2)" d12.pd1 = d11 - cb = AMI_Test_returnTest3I() - t.returnTest3_async(cb, d3, d12) + cb = Callback() + t.begin_returnTest3(d3, d12, cb.response_returnTest3, cb.exception) cb.check() r = cb.r @@ -1108,8 +1022,8 @@ def allTests(communicator): ss2 = Test.SS2() ss2.s = (ss2b, ss2d1, ss2d3) - cb = AMI_Test_sequenceTestI() - t.sequenceTest_async(cb, ss1, ss2) + cb = Callback() + t.begin_sequenceTest(ss1, ss2, cb.response_sequenceTest, cb.exception) cb.check() ss = cb.r @@ -1198,8 +1112,8 @@ def allTests(communicator): d1.pd1 = None bin[i] = d1 - cb = AMI_Test_dictionaryTestI() - t.dictionaryTest_async(cb, bin) + cb = Callback() + t.begin_dictionaryTest(bin, cb.response_dictionaryTest, cb.exception) cb.check() bout = cb.bout r = cb.r @@ -1248,8 +1162,8 @@ def allTests(communicator): print "ok" print "base exception thrown as base exception (AMI)... ", - cb = AMI_Test_throwBaseAsBaseI() - t.throwBaseAsBase_async(cb) + cb = Callback() + t.begin_throwBaseAsBase(cb.response, cb.exception_throwBaseAsBase) cb.check() print "ok" @@ -1274,8 +1188,8 @@ def allTests(communicator): print "ok" print "derived exception thrown as base exception (AMI)... ", - cb = AMI_Test_throwDerivedAsBaseI() - t.throwDerivedAsBase_async(cb) + cb = Callback() + t.begin_throwDerivedAsBase(cb.response, cb.exception_throwDerivedAsBase) cb.check() print "ok" @@ -1300,8 +1214,8 @@ def allTests(communicator): print "ok" print "derived exception thrown as derived exception (AMI)... ", - cb = AMI_Test_throwDerivedAsDerivedI() - t.throwDerivedAsDerived_async(cb) + cb = Callback() + t.begin_throwDerivedAsDerived(cb.response, cb.exception_throwDerivedAsDerived) cb.check() print "ok" @@ -1320,8 +1234,8 @@ def allTests(communicator): print "ok" print "unknown derived exception thrown as base exception (AMI)... ", - cb = AMI_Test_throwUnknownDerivedAsBaseI() - t.throwUnknownDerivedAsBase_async(cb) + cb = Callback() + t.begin_throwUnknownDerivedAsBase(cb.response, cb.exception_throwUnknownDerivedAsBase) cb.check() print "ok" @@ -1334,8 +1248,8 @@ def allTests(communicator): print "ok" print "forward-declared class (AMI)... ", - cb = AMI_Test_useForwardI() - t.useForward_async(cb) + cb = Callback() + t.begin_useForward(cb.response_useForward, cb.exception) cb.check() print "ok" diff --git a/py/test/Ice/slicing/objects/Test.ice b/py/test/Ice/slicing/objects/Test.ice index 3e617f07fbe..fa823d2d829 100644 --- a/py/test/Ice/slicing/objects/Test.ice +++ b/py/test/Ice/slicing/objects/Test.ice @@ -67,9 +67,9 @@ exception DerivedException extends BaseException D1 pd1; }; -class Forward; // Forward-declared class defined in another compilation unit +class Forward; /* Forward-declared class defined in another compilation unit */ -["ami"] interface TestIntf +interface TestIntf { Object SBaseAsObject(); SBase SBaseAsSBase(); diff --git a/py/test/Ice/slicing/objects/TestAMD.ice b/py/test/Ice/slicing/objects/TestAMD.ice index c809d0a7972..e9510c039cf 100644 --- a/py/test/Ice/slicing/objects/TestAMD.ice +++ b/py/test/Ice/slicing/objects/TestAMD.ice @@ -67,9 +67,9 @@ exception DerivedException extends BaseException D1 pd1; }; -class Forward; // Forward-declared class defined in another compilation unit +class Forward; /* Forward-declared class defined in another compilation unit */ -["ami", "amd"] interface TestIntf +["amd"] interface TestIntf { Object SBaseAsObject(); SBase SBaseAsSBase(); diff --git a/py/test/Ice/timeout/AllTests.py b/py/test/Ice/timeout/AllTests.py index cd9f6da9005..3e9e20d73cf 100644 --- a/py/test/Ice/timeout/AllTests.py +++ b/py/test/Ice/timeout/AllTests.py @@ -31,33 +31,17 @@ class CallbackBase: self._called = False return True -class AMISendData(CallbackBase): - def ice_response(self): +class Callback(CallbackBase): + def response(self): self.called() - def ice_exception(self, ex): + def exception(self, ex): test(False) -class AMISendDataEx(CallbackBase): - def ice_response(self): + def responseEx(self): test(False) - def ice_exception(self, ex): - test(isinstance(ex, Ice.TimeoutException)) - self.called() - -class AMISleep(CallbackBase): - def ice_response(self): - self.called() - - def ice_exception(self, ex): - test(False) - -class AMISleepEx(CallbackBase): - def ice_response(self): - test(False) - - def ice_exception(self, ex): + def exceptionEx(self, ex): test(isinstance(ex, Ice.TimeoutException)) self.called() @@ -147,16 +131,16 @@ def allTests(communicator, collocated): # Expect TimeoutException. # to = Test.TimeoutPrx.uncheckedCast(obj.ice_timeout(500)) - cb = AMISleepEx() - to.sleep_async(cb, 2000) + cb = Callback() + to.begin_sleep(2000, cb.responseEx, cb.exceptionEx) cb.check() # # Expect success. # timeout.op() # Ensure adapter is active. to = Test.TimeoutPrx.uncheckedCast(obj.ice_timeout(1000)) - cb = AMISleep() - to.sleep_async(cb, 500) + cb = Callback() + to.begin_sleep(500, cb.response, cb.exception) cb.check() print "ok" @@ -166,8 +150,8 @@ def allTests(communicator, collocated): # to = Test.TimeoutPrx.uncheckedCast(obj.ice_timeout(500)) to.holdAdapter(2000) - cb = AMISendDataEx() - to.sendData_async(cb, seq) + cb = Callback() + to.begin_sendData(seq, cb.responseEx, cb.exceptionEx) cb.check() # # Expect success. @@ -175,8 +159,8 @@ def allTests(communicator, collocated): timeout.op() # Ensure adapter is active. to = Test.TimeoutPrx.uncheckedCast(obj.ice_timeout(1000)) to.holdAdapter(500) - cb = AMISendData() - to.sendData_async(cb, seq) + cb = Callback() + to.begin_sendData(seq, cb.response, cb.exception) cb.check() print "ok" diff --git a/py/test/Ice/timeout/Test.ice b/py/test/Ice/timeout/Test.ice index 4ba0c07ab71..da79b50d478 100644 --- a/py/test/Ice/timeout/Test.ice +++ b/py/test/Ice/timeout/Test.ice @@ -17,9 +17,9 @@ sequence<byte> ByteSeq; interface Timeout { - ["ami"] void op(); - ["ami"] void sendData(ByteSeq seq); - ["ami"] void sleep(int to); + void op(); + void sendData(ByteSeq seq); + void sleep(int to); void holdAdapter(int to); |