aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/ProtoRPC/ProtoRPC.h
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2018-10-08 15:49:17 -0700
committerGravatar Muxi Yan <mxyan@google.com>2018-10-08 15:49:17 -0700
commit5e790a3117c90c391209646dee8ae984164b1e04 (patch)
tree378326a670dd7d6d6612c6c91acf71f7582d5fe5 /src/objective-c/ProtoRPC/ProtoRPC.h
parent9fbc9105a62e5ca309d5152407dea0db86cc1709 (diff)
Proto-related changes
Diffstat (limited to 'src/objective-c/ProtoRPC/ProtoRPC.h')
-rw-r--r--src/objective-c/ProtoRPC/ProtoRPC.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/objective-c/ProtoRPC/ProtoRPC.h b/src/objective-c/ProtoRPC/ProtoRPC.h
index 45d3526092..1a27cac2a3 100644
--- a/src/objective-c/ProtoRPC/ProtoRPC.h
+++ b/src/objective-c/ProtoRPC/ProtoRPC.h
@@ -21,6 +21,55 @@
#import "ProtoMethod.h"
+@class GPBMessage;
+
+/** A unary-request RPC call with Protobuf. */
+@interface GRPCUnaryProtoCall : NSObject
+
+/**
+ * Users should not use this initializer directly. Call objects will be created, initialized, and
+ * returned to users by methods of the generated service.
+ */
+- (instancetype)initWithRequestOptions:(GRPCRequestOptions *)requestOptions
+ message:(GPBMessage *)message
+ responseHandler:(id<GRPCResponseHandler>)handler
+ callOptions:(GRPCCallOptions *)callOptions
+ responseClass:(Class)responseClass;
+
+/** Cancel the call at best effort. */
+- (void)cancel;
+
+@end
+
+/** A client-streaming RPC call with Protobuf. */
+@interface GRPCStreamingProtoCall : NSObject
+
+/**
+ * Users should not use this initializer directly. Call objects will be created, initialized, and
+ * returned to users by methods of the generated service.
+ */
+- (instancetype)initWithRequestOptions:(GRPCRequestOptions *)requestOptions
+ responseHandler:(id<GRPCResponseHandler>)handler
+ callOptions:(GRPCCallOptions *)callOptions
+ responseClass:(Class)responseClass;
+
+/** Cancel the call at best effort. */
+- (void)cancel;
+
+/**
+ * Send a message to the server. The message should be a Protobuf message which will be serialized
+ * internally.
+ */
+- (void)writeWithMessage:(GPBMessage *)message;
+
+/**
+ * Finish the RPC request and half-close the call. The server may still send messages and/or
+ * trailers to the client.
+ */
+- (void)finish;
+
+@end
+
__attribute__((deprecated("Please use GRPCProtoCall."))) @interface ProtoRPC
: GRPCCall