blob: be7a1ddde60ae10085c649e12c9aa08ce29341c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
|
// **********************************************************************
//
// Copyright (c) 2003-2015 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 <objc/Ice/Config.h>
#import <objc/Ice/Format.h> // for ICEFormatType
#import <Foundation/NSData.h>
//
// Forward declarations
//
@class ICEObject;
@protocol ICEObjectPrx;
@protocol ICESlicedData;
@class ICEUserException;
@class ICEEncodingVersion;
ICE_API @interface ICEInternalPrefixTable : NSObject
@end
typedef enum
{
ICEOptionalFormatF1 = 0,
ICEOptionalFormatF2 = 1,
ICEOptionalFormatF4 = 2,
ICEOptionalFormatF8 = 3,
ICEOptionalFormatSize = 4,
ICEOptionalFormatVSize = 5,
ICEOptionalFormatFSize = 6,
ICEOptionalFormatClass = 7
} ICEOptionalFormat;
ICE_API @protocol ICEReadObjectCallback <NSObject>
-(void)invoke:(ICEObject*)obj;
@end
//
// ICENone singleton to specify not set optionals.
//
extern id ICENone;
typedef struct
{
Class key;
Class value;
} ICEKeyValueTypeHelper;
ICE_API @protocol ICEInputStream <NSObject>
-(void) setSliceObjects:(BOOL)b;
-(BOOL) readBool;
-(NSMutableData*) newBoolSeq;
-(NSMutableData*) readBoolSeq;
-(ICEByte) readByte;
-(NSMutableData*) newByteSeq;
-(NSMutableData*) readByteSeq;
-(NSData*) readByteSeqNoCopy;
-(ICEShort) readShort;
-(NSMutableData*) newShortSeq;
-(NSMutableData*) readShortSeq;
-(ICEInt) readInt;
-(NSMutableData*) newIntSeq;
-(NSMutableData*) readIntSeq;
-(ICELong) readLong;
-(NSMutableData*) newLongSeq;
-(NSMutableData*) readLongSeq;
-(ICEFloat) readFloat;
-(NSMutableData*) newFloatSeq;
-(NSMutableData*) readFloatSeq;
-(ICEDouble) readDouble;
-(NSMutableData*) newDoubleSeq;
-(NSMutableData*) readDoubleSeq;
-(NSMutableString*) newString;
-(NSMutableString*) readString;
-(NSMutableArray*) newStringSeq;
-(NSMutableArray*) readStringSeq;
-(ICEInt) readEnumerator:(ICEInt)min max:(ICEInt)max;
-(NSMutableData*) newEnumSeq:(ICEInt)min max:(ICEInt)max;
-(NSMutableData*) readEnumSeq:(ICEInt)min max:(ICEInt)max;
-(id<ICEObjectPrx>) newProxy:(Class)c;
-(id<ICEObjectPrx>) readProxy:(Class)c;
-(void) newObject:(ICEObject*ICE_STRONG_QUALIFIER*)object;
-(void) newObject:(ICEObject*ICE_STRONG_QUALIFIER*)object expectedType:(Class)type;
-(void) readObject:(ICEObject**)object;
-(void) readObject:(ICEObject**)object expectedType:(Class)type;
-(NSMutableArray*) newObjectSeq:(Class)expectedType;
-(NSMutableArray*) readObjectSeq:(Class)expectedType;
-(NSMutableDictionary*) newObjectDict:(Class)keyType expectedType:(Class)type;
-(NSMutableDictionary*) readObjectDict:(Class)keyType expectedType:(Class)type;
-(NSMutableArray*) newSequence:(Class)type;
-(NSMutableArray*) readSequence:(Class)type;
-(NSMutableDictionary*) newDictionary:(ICEKeyValueTypeHelper)type;
-(NSMutableDictionary*) readDictionary:(ICEKeyValueTypeHelper)type;
-(BOOL) readOptional:(ICEInt)tag format:(ICEOptionalFormat)format;
-(ICEInt) readSize;
-(ICEInt) readAndCheckSeqSize:(ICEInt)minSize;
-(void) throwException;
-(void) startObject;
-(id<ICESlicedData>) endObject:(BOOL)preserve NS_RETURNS_RETAINED;
-(void) startException;
-(id<ICESlicedData>) endException:(BOOL)preserve NS_RETURNS_RETAINED;
-(void) startSlice;
-(void) endSlice;
-(void) skipSlice;
-(ICEEncodingVersion*) startEncapsulation;
-(void) endEncapsulation;
-(ICEEncodingVersion*) skipEncapsulation;
-(ICEEncodingVersion*) getEncoding;
-(void) readPendingObjects;
-(void) rewind;
-(void) skip:(ICEInt)sz;
-(void) skipSize;
@end
ICE_API @protocol ICEOutputStream <NSObject>
-(void) writeBool:(BOOL)v;
-(void) writeBoolSeq:(NSData*)v;
-(void) writeByte:(ICEByte)v;
-(void) writeByteSeq:(NSData*)v;
-(void) writeShort:(ICEShort)v;
-(void) writeShortSeq:(NSData*)v;
-(void) writeInt:(ICEInt)v;
-(void) writeIntSeq:(NSData*)v;
-(void) writeLong:(ICELong)v;
-(void) writeLongSeq:(NSData*)v;
-(void) writeFloat:(ICEFloat)v;
-(void) writeFloatSeq:(NSData*)v;
-(void) writeDouble:(ICEDouble)v;
-(void) writeDoubleSeq:(NSData*)v;
-(void) writeString:(NSString*)v;
-(void) writeStringSeq:(NSArray*)v;
-(void) writeEnumerator:(ICEInt)v min:(ICEInt)min max:(ICEInt)max;
-(void) writeEnumSeq:(NSData*)v min:(ICEInt)min max:(ICEInt)max;
-(void) writeProxy:(id<ICEObjectPrx>)v;
-(void) writeObject:(ICEObject*)v;
-(void) writeObjectSeq:(NSArray*)v;
-(void) writeObjectDict:(NSDictionary*)v helper:(Class)helper;
-(void) writeSequence:(NSArray*)arr helper:(Class)helper;
-(void) writeDictionary:(NSDictionary*)dictionary helper:(ICEKeyValueTypeHelper)helper;
-(BOOL) writeOptional:(ICEInt)tag format:(ICEOptionalFormat)format;
-(void) writeSize:(ICEInt)v;
-(void) writeException:(ICEUserException*)v;
-(void) startObject:(id<ICESlicedData>)slicedData;
-(void) endObject;
-(void) startException:(id<ICESlicedData>)slicedData;
-(void) endException;
-(void) startSlice:(NSString*)typeId compactId:(ICEInt)compactId lastSlice:(BOOL)lastSlice;
-(void) endSlice;
-(void) startEncapsulation;
-(void) startEncapsulation:(ICEEncodingVersion*)encoding format:(ICEFormatType)format;
-(void) endEncapsulation;
-(ICEEncodingVersion*) getEncoding;
-(void) writePendingObjects;
-(NSMutableData*) finished;
-(NSData*) finishedNoCopy;
-(void) reset:(BOOL)clearBuffer;
@end
//
// Helper protocol implemented by helpers for marshaling/un-marshaling
// Slice types.
//
ICE_API @protocol ICEStreamHelper
+(id) readRetained:(id<ICEInputStream>)stream NS_RETURNS_RETAINED;
+(id) read:(id<ICEInputStream>)stream;
+(void) write:(id)obj stream:(id<ICEOutputStream>)stream;
+(id) readOptionalRetained:(id<ICEInputStream>)stream tag:(ICEInt)tag;
+(id) readOptional:(id<ICEInputStream>)stream tag:(ICEInt)tag;
+(void) writeOptional:(id)obj stream:(id<ICEOutputStream>)stream tag:(ICEInt)tag;
+(ICEInt) minWireSize;
@end
ICE_API @interface ICEStreamHelper : NSObject<ICEStreamHelper>
@end
//
// Helper classes for streaming Slice types
//
ICE_API @interface ICEBoolHelper : ICEStreamHelper
@end
ICE_API @interface ICEByteHelper : ICEStreamHelper
@end
ICE_API @interface ICEShortHelper : ICEStreamHelper
@end
ICE_API @interface ICEIntHelper : ICEStreamHelper
@end
ICE_API @interface ICELongHelper : ICEStreamHelper
@end
ICE_API @interface ICEFloatHelper : ICEStreamHelper
@end
ICE_API @interface ICEDoubleHelper : ICEStreamHelper
@end
ICE_API @interface ICEStringHelper : ICEStreamHelper
@end
ICE_API @interface ICEObjectHelper : ICEStreamHelper
+(void)read:(ICEObject**)v stream:(id<ICEInputStream>)stream;
+(void)readOptional:(id*)v stream:(id<ICEInputStream>)stream tag:(ICEInt)tag;
@end
ICE_API @interface ICEProxyHelper : ICEStreamHelper
@end
ICE_API @interface ICEEnumHelper : ICEStreamHelper
+(ICEInt) getMinValue;
+(ICEInt) getMaxValue;
@end
ICE_API @interface ICEStructHelper : ICEStreamHelper
+(id) readRetained:(id<ICEInputStream>)stream value:(id)v NS_RETURNS_RETAINED;
+(id) read:(id<ICEInputStream>)stream value:(id)v;
+(Class) getOptionalHelper;
@end
ICE_API @protocol ICESequenceStreamHelper<ICEStreamHelper>
+(Class) getElementHelper;
+(ICEInt) count:(id)obj;
@end
ICE_API @interface ICEArraySequenceHelper : ICEStreamHelper<ICESequenceStreamHelper>
+(Class) getOptionalHelper;
@end
ICE_API @interface ICEDataSequenceHelper : ICEStreamHelper<ICESequenceStreamHelper>
@end
ICE_API @interface ICEBoolSequenceHelper : ICEDataSequenceHelper
@end
ICE_API @interface ICEByteSequenceHelper : ICEDataSequenceHelper
@end
ICE_API @interface ICEShortSequenceHelper : ICEDataSequenceHelper
@end
ICE_API @interface ICEIntSequenceHelper : ICEDataSequenceHelper
@end
ICE_API @interface ICELongSequenceHelper : ICEDataSequenceHelper
@end
ICE_API @interface ICEFloatSequenceHelper : ICEDataSequenceHelper
@end
ICE_API @interface ICEDoubleSequenceHelper : ICEDataSequenceHelper
@end
ICE_API @interface ICEEnumSequenceHelper : ICEDataSequenceHelper
@end
ICE_API @interface ICEStringSequenceHelper : ICEArraySequenceHelper
@end
ICE_API @interface ICEObjectSequenceHelper : ICEArraySequenceHelper
@end
ICE_API @interface ICEProxySequenceHelper : ICEArraySequenceHelper
@end
ICE_API @protocol ICEDictionaryStreamHelper<ICEStreamHelper>
+(ICEInt) count:(id)obj;
@end
ICE_API @interface ICEDictionaryHelper : ICEStreamHelper<ICEDictionaryStreamHelper>
+(Class) getOptionalHelper;
@end
ICE_API @interface ICEObjectDictionaryHelper : ICEDictionaryHelper
@end
//
// Helper for optionals
//
ICE_API @protocol ICEOptionalStreamHelper
+(id) readRetained:(id<ICEInputStream>)stream helper:(Class)helper NS_RETURNS_RETAINED;
+(void) write:(id)obj stream:(id<ICEOutputStream>)stream helper:(Class)helper;
+(ICEOptionalFormat) optionalFormat;
@end
ICE_API @interface ICEFixedLengthOptionalHelper : NSObject<ICEOptionalStreamHelper>
@end
ICE_API @interface ICEVarLengthOptionalHelper : NSObject<ICEOptionalStreamHelper>
@end
ICE_API @interface ICEFixedSequenceOptionalHelper : NSObject<ICEOptionalStreamHelper>
@end
ICE_API @interface ICEFixedSize1SequenceOptionalHelper : NSObject<ICEOptionalStreamHelper>
@end
ICE_API @interface ICEFixedDictionaryOptionalHelper : NSObject<ICEOptionalStreamHelper>
@end
ICE_API @interface CompactIdMapHelper : NSObject
+(void) initialize;
+(void) registerClass:(NSString*)type value:(ICEInt)value;
@end
ICE_API @interface ICEOptionalGetter : NSObject
+(BOOL) get:(id)value value:(id ICE_STRONG_QUALIFIER*)v type:(Class)cl;
+(BOOL) getRetained:(id)value value:(id ICE_STRONG_QUALIFIER*)v type:(Class)cl;
+(BOOL) getByte:(id)value value:(ICEByte*)v;
+(BOOL) getBool:(id)value value:(BOOL*)v;
+(BOOL) getShort:(id)value value:(ICEShort*)v;
+(BOOL) getInt:(id)value value:(ICEInt*)v;
+(BOOL) getLong:(id)value value:(ICELong*)v;
+(BOOL) getFloat:(id)value value:(ICEFloat*)v;
+(BOOL) getDouble:(id)value value:(ICEDouble*)v;
@end
|