summaryrefslogtreecommitdiff
path: root/cpp/src/slice2objc/Gen.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2017-02-06 11:17:34 +0100
committerBenoit Foucher <benoit@zeroc.com>2017-02-06 11:17:34 +0100
commit18ab8207bd14def950fd399c60d9ee54fab75d3b (patch)
treea82af333127184acc6be6e0969919cb20be5e8b3 /cpp/src/slice2objc/Gen.cpp
parentFixed ICE-7548 - getAdminProxy no longer returns 0 if synchronization is in p... (diff)
downloadice-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/Gen.cpp')
-rw-r--r--cpp/src/slice2objc/Gen.cpp32
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 << ";";
}
}