GRXWriteable.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2015 gRPC authors.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 #import <Foundation/Foundation.h>
20 
25 @protocol GRXWriteable <NSObject>
26 
28 - (void)writeValue:(id)value;
29 
35 - (void)writesFinishedWithError:(NSError *)errorOrNil;
36 @end
37 
38 typedef void (^GRXValueHandler)(id value);
39 typedef void (^GRXCompletionHandler)(NSError *errorOrNil);
40 typedef void (^GRXSingleHandler)(id value, NSError *errorOrNil);
41 typedef void (^GRXEventHandler)(BOOL done, id value, NSError *error);
42 
47 @interface GRXWriteable : NSObject <GRXWriteable>
48 
49 + (instancetype)writeableWithSingleHandler:(GRXSingleHandler)handler;
50 + (instancetype)writeableWithEventHandler:(GRXEventHandler)handler;
51 
52 - (instancetype)initWithValueHandler:(GRXValueHandler)valueHandler
53  completionHandler:(GRXCompletionHandler)completionHandler
54  NS_DESIGNATED_INITIALIZER;
55 @end
error
grpc_error_handle error
Definition: retry_filter.cc:499
BOOL
int BOOL
Definition: undname.c:46
GRXSingleHandler
void(^ GRXSingleHandler)(id value, NSError *errorOrNil)
Definition: GRXWriteable.h:40
GRXWriteable
Definition: GRXWriteable.h:47
GRXWriteable-p
Definition: GRXWriteable.h:25
done
struct tab * done
Definition: bloaty/third_party/zlib/examples/enough.c:176
value
const char * value
Definition: hpack_parser_table.cc:165
GRXValueHandler
void(^ GRXValueHandler)(id value)
Definition: GRXWriteable.h:38
GRXEventHandler
void(^ GRXEventHandler)(BOOL done, id value, NSError *error)
Definition: GRXWriteable.h:41
GRXCompletionHandler
void(^ GRXCompletionHandler)(NSError *errorOrNil)
Definition: GRXWriteable.h:39


grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:59:48