diff options
author | Benoit Foucher <benoit@zeroc.com> | 2017-02-06 11:17:34 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2017-02-06 11:17:34 +0100 |
commit | 18ab8207bd14def950fd399c60d9ee54fab75d3b (patch) | |
tree | a82af333127184acc6be6e0969919cb20be5e8b3 /cpp/src/slice2objc | |
parent | Fixed ICE-7548 - getAdminProxy no longer returns 0 if synchronization is in p... (diff) | |
download | ice-18ab8207bd14def950fd399c60d9ee54fab75d3b.tar.bz2 ice-18ab8207bd14def950fd399c60d9ee54fab75d3b.tar.xz ice-18ab8207bd14def950fd399c60d9ee54fab75d3b.zip |
Fixed ICE-7169 and ICE-7375 - add option to specify if batch requests flushed with the communicator/connection should be compressed
Diffstat (limited to 'cpp/src/slice2objc')
-rw-r--r-- | cpp/src/slice2objc/Gen.cpp | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/cpp/src/slice2objc/Gen.cpp b/cpp/src/slice2objc/Gen.cpp index 80b5609417e..7ad7d9883e6 100644 --- a/cpp/src/slice2objc/Gen.cpp +++ b/cpp/src/slice2objc/Gen.cpp @@ -1214,15 +1214,29 @@ Slice::Gen::TypesVisitor::visitOperation(const OperationPtr& p) if(cl->isLocal() && (cl->hasMetaData("async-oneway") || p->hasMetaData("async-oneway"))) { - // TODO: add support for parameters when needed. - _H << nl << "-(id<ICEAsyncResult>) begin_" << name << deprecateSymbol << ";"; - _H << nl << "-(id<ICEAsyncResult>) begin_" << name << ":(void(^)(ICEException*))exception" - << deprecateSymbol << ";"; - _H << nl << "-(id<ICEAsyncResult>) begin_" << name - << ":(void(^)(ICEException*))exception sent:(void(^)(BOOL))sent" - << deprecateSymbol << ";"; - _H << nl << "-(void) end_" << name << ":(id<ICEAsyncResult>)result" - << deprecateSymbol << ";"; + string marshalParams = getMarshalParams(p); + string unmarshalParams = getUnmarshalParams(p); + + _H << nl << "-(id<ICEAsyncResult>) begin_" << name << marshalParams << deprecateSymbol << ";"; + _H << nl << "-(id<ICEAsyncResult>) begin_" << name << marshalParams; + if(!marshalParams.empty()) + { + _H << " exception"; + } + _H << ":(void(^)(ICEException*))exception" << deprecateSymbol << ";"; + _H << nl << "-(id<ICEAsyncResult>) begin_" << name << marshalParams; + if(!marshalParams.empty()) + { + _H << " exception"; + } + _H << ":(void(^)(ICEException*))exception sent:(void(^)(BOOL))sent" << deprecateSymbol << ";"; + + _H << nl << "-(void) end_" << name << unmarshalParams; + if(!unmarshalParams.empty()) + { + _H << " result"; + } + _H << ":(id<ICEAsyncResult>)result" << deprecateSymbol << ";"; } } |