1 | /** |
---|
2 | * Autogenerated by Thrift |
---|
3 | * |
---|
4 | * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING |
---|
5 | */ |
---|
6 | |
---|
7 | #import <Cocoa/Cocoa.h> |
---|
8 | |
---|
9 | #import <TProtocol.h> |
---|
10 | #import <TApplicationException.h> |
---|
11 | #import <TProtocolUtil.h> |
---|
12 | |
---|
13 | |
---|
14 | #import "hadoopfs.h" |
---|
15 | |
---|
16 | |
---|
17 | @implementation hadoopfsConstants |
---|
18 | + (void) initialize { |
---|
19 | } |
---|
20 | @end |
---|
21 | |
---|
22 | @implementation ThriftHandle |
---|
23 | - (id) initWithId: (int64_t) id |
---|
24 | { |
---|
25 | self = [super init]; |
---|
26 | __id = id; |
---|
27 | __id_isset = YES; |
---|
28 | return self; |
---|
29 | } |
---|
30 | |
---|
31 | - (void) dealloc |
---|
32 | { |
---|
33 | [super dealloc]; |
---|
34 | } |
---|
35 | |
---|
36 | - (int64_t) id { |
---|
37 | return __id; |
---|
38 | } |
---|
39 | |
---|
40 | - (void) setId: (int64_t) id { |
---|
41 | __id = id; |
---|
42 | __id_isset = YES; |
---|
43 | } |
---|
44 | |
---|
45 | - (BOOL) idIsSet { |
---|
46 | return __id_isset; |
---|
47 | } |
---|
48 | |
---|
49 | - (void) unsetId { |
---|
50 | __id_isset = NO; |
---|
51 | } |
---|
52 | |
---|
53 | - (void) read: (id <TProtocol>) inProtocol |
---|
54 | { |
---|
55 | NSString * fieldName; |
---|
56 | int fieldType; |
---|
57 | int fieldID; |
---|
58 | |
---|
59 | [inProtocol readStructBeginReturningName: NULL]; |
---|
60 | while (true) |
---|
61 | { |
---|
62 | [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; |
---|
63 | if (fieldType == TType_STOP) { |
---|
64 | break; |
---|
65 | } |
---|
66 | switch (fieldID) |
---|
67 | { |
---|
68 | case -1: |
---|
69 | if (fieldType == TType_I64) { |
---|
70 | int64_t fieldValue = [inProtocol readI64]; |
---|
71 | [self setId: fieldValue]; |
---|
72 | } else { |
---|
73 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
74 | } |
---|
75 | break; |
---|
76 | default: |
---|
77 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
78 | break; |
---|
79 | } |
---|
80 | [inProtocol readFieldEnd]; |
---|
81 | } |
---|
82 | [inProtocol readStructEnd]; |
---|
83 | } |
---|
84 | |
---|
85 | - (void) write: (id <TProtocol>) outProtocol { |
---|
86 | [outProtocol writeStructBeginWithName: @"ThriftHandle"]; |
---|
87 | if (__id_isset) { |
---|
88 | [outProtocol writeFieldBeginWithName: @"id" type: TType_I64 fieldID: -1]; |
---|
89 | [outProtocol writeI64: __id]; |
---|
90 | [outProtocol writeFieldEnd]; |
---|
91 | } |
---|
92 | [outProtocol writeFieldStop]; |
---|
93 | [outProtocol writeStructEnd]; |
---|
94 | } |
---|
95 | |
---|
96 | - (NSString *) description { |
---|
97 | NSMutableString * ms = [NSMutableString stringWithString: @"ThriftHandle("]; |
---|
98 | [ms appendString: @"id:"]; |
---|
99 | [ms appendFormat: @"%qi", __id]; |
---|
100 | [ms appendString: @")"]; |
---|
101 | return [ms copy]; |
---|
102 | } |
---|
103 | |
---|
104 | @end |
---|
105 | |
---|
106 | @implementation Pathname |
---|
107 | - (id) initWithPathname: (NSString *) pathname |
---|
108 | { |
---|
109 | self = [super init]; |
---|
110 | __pathname = [pathname retain]; |
---|
111 | __pathname_isset = YES; |
---|
112 | return self; |
---|
113 | } |
---|
114 | |
---|
115 | - (void) dealloc |
---|
116 | { |
---|
117 | [__pathname release]; |
---|
118 | [super dealloc]; |
---|
119 | } |
---|
120 | |
---|
121 | - (NSString *) pathname { |
---|
122 | return [[__pathname retain] autorelease]; |
---|
123 | } |
---|
124 | |
---|
125 | - (void) setPathname: (NSString *) pathname { |
---|
126 | [pathname retain]; |
---|
127 | [__pathname release]; |
---|
128 | __pathname = pathname; |
---|
129 | __pathname_isset = YES; |
---|
130 | } |
---|
131 | |
---|
132 | - (BOOL) pathnameIsSet { |
---|
133 | return __pathname_isset; |
---|
134 | } |
---|
135 | |
---|
136 | - (void) unsetPathname { |
---|
137 | [__pathname release]; |
---|
138 | __pathname = nil; |
---|
139 | __pathname_isset = NO; |
---|
140 | } |
---|
141 | |
---|
142 | - (void) read: (id <TProtocol>) inProtocol |
---|
143 | { |
---|
144 | NSString * fieldName; |
---|
145 | int fieldType; |
---|
146 | int fieldID; |
---|
147 | |
---|
148 | [inProtocol readStructBeginReturningName: NULL]; |
---|
149 | while (true) |
---|
150 | { |
---|
151 | [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; |
---|
152 | if (fieldType == TType_STOP) { |
---|
153 | break; |
---|
154 | } |
---|
155 | switch (fieldID) |
---|
156 | { |
---|
157 | case -1: |
---|
158 | if (fieldType == TType_STRING) { |
---|
159 | NSString * fieldValue = [inProtocol readString]; |
---|
160 | [self setPathname: fieldValue]; |
---|
161 | } else { |
---|
162 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
163 | } |
---|
164 | break; |
---|
165 | default: |
---|
166 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
167 | break; |
---|
168 | } |
---|
169 | [inProtocol readFieldEnd]; |
---|
170 | } |
---|
171 | [inProtocol readStructEnd]; |
---|
172 | } |
---|
173 | |
---|
174 | - (void) write: (id <TProtocol>) outProtocol { |
---|
175 | [outProtocol writeStructBeginWithName: @"Pathname"]; |
---|
176 | if (__pathname_isset) { |
---|
177 | if (__pathname != nil) { |
---|
178 | [outProtocol writeFieldBeginWithName: @"pathname" type: TType_STRING fieldID: -1]; |
---|
179 | [outProtocol writeString: __pathname]; |
---|
180 | [outProtocol writeFieldEnd]; |
---|
181 | } |
---|
182 | } |
---|
183 | [outProtocol writeFieldStop]; |
---|
184 | [outProtocol writeStructEnd]; |
---|
185 | } |
---|
186 | |
---|
187 | - (NSString *) description { |
---|
188 | NSMutableString * ms = [NSMutableString stringWithString: @"Pathname("]; |
---|
189 | [ms appendString: @"pathname:"]; |
---|
190 | [ms appendFormat: @"\"%@\"", __pathname]; |
---|
191 | [ms appendString: @")"]; |
---|
192 | return [ms copy]; |
---|
193 | } |
---|
194 | |
---|
195 | @end |
---|
196 | |
---|
197 | @implementation FileStatus |
---|
198 | - (id) initWithPath: (NSString *) path length: (int64_t) length isdir: (BOOL) isdir block_replication: (int16_t) block_replication blocksize: (int64_t) blocksize modification_time: (int64_t) modification_time permission: (NSString *) permission owner: (NSString *) owner group: (NSString *) group |
---|
199 | { |
---|
200 | self = [super init]; |
---|
201 | __path = [path retain]; |
---|
202 | __path_isset = YES; |
---|
203 | __length = length; |
---|
204 | __length_isset = YES; |
---|
205 | __isdir = isdir; |
---|
206 | __isdir_isset = YES; |
---|
207 | __block_replication = block_replication; |
---|
208 | __block_replication_isset = YES; |
---|
209 | __blocksize = blocksize; |
---|
210 | __blocksize_isset = YES; |
---|
211 | __modification_time = modification_time; |
---|
212 | __modification_time_isset = YES; |
---|
213 | __permission = [permission retain]; |
---|
214 | __permission_isset = YES; |
---|
215 | __owner = [owner retain]; |
---|
216 | __owner_isset = YES; |
---|
217 | __group = [group retain]; |
---|
218 | __group_isset = YES; |
---|
219 | return self; |
---|
220 | } |
---|
221 | |
---|
222 | - (void) dealloc |
---|
223 | { |
---|
224 | [__path release]; |
---|
225 | [__permission release]; |
---|
226 | [__owner release]; |
---|
227 | [__group release]; |
---|
228 | [super dealloc]; |
---|
229 | } |
---|
230 | |
---|
231 | - (NSString *) path { |
---|
232 | return [[__path retain] autorelease]; |
---|
233 | } |
---|
234 | |
---|
235 | - (void) setPath: (NSString *) path { |
---|
236 | [path retain]; |
---|
237 | [__path release]; |
---|
238 | __path = path; |
---|
239 | __path_isset = YES; |
---|
240 | } |
---|
241 | |
---|
242 | - (BOOL) pathIsSet { |
---|
243 | return __path_isset; |
---|
244 | } |
---|
245 | |
---|
246 | - (void) unsetPath { |
---|
247 | [__path release]; |
---|
248 | __path = nil; |
---|
249 | __path_isset = NO; |
---|
250 | } |
---|
251 | |
---|
252 | - (int64_t) length { |
---|
253 | return __length; |
---|
254 | } |
---|
255 | |
---|
256 | - (void) setLength: (int64_t) length { |
---|
257 | __length = length; |
---|
258 | __length_isset = YES; |
---|
259 | } |
---|
260 | |
---|
261 | - (BOOL) lengthIsSet { |
---|
262 | return __length_isset; |
---|
263 | } |
---|
264 | |
---|
265 | - (void) unsetLength { |
---|
266 | __length_isset = NO; |
---|
267 | } |
---|
268 | |
---|
269 | - (BOOL) isdir { |
---|
270 | return __isdir; |
---|
271 | } |
---|
272 | |
---|
273 | - (void) setIsdir: (BOOL) isdir { |
---|
274 | __isdir = isdir; |
---|
275 | __isdir_isset = YES; |
---|
276 | } |
---|
277 | |
---|
278 | - (BOOL) isdirIsSet { |
---|
279 | return __isdir_isset; |
---|
280 | } |
---|
281 | |
---|
282 | - (void) unsetIsdir { |
---|
283 | __isdir_isset = NO; |
---|
284 | } |
---|
285 | |
---|
286 | - (int16_t) block_replication { |
---|
287 | return __block_replication; |
---|
288 | } |
---|
289 | |
---|
290 | - (void) setBlock_replication: (int16_t) block_replication { |
---|
291 | __block_replication = block_replication; |
---|
292 | __block_replication_isset = YES; |
---|
293 | } |
---|
294 | |
---|
295 | - (BOOL) block_replicationIsSet { |
---|
296 | return __block_replication_isset; |
---|
297 | } |
---|
298 | |
---|
299 | - (void) unsetBlock_replication { |
---|
300 | __block_replication_isset = NO; |
---|
301 | } |
---|
302 | |
---|
303 | - (int64_t) blocksize { |
---|
304 | return __blocksize; |
---|
305 | } |
---|
306 | |
---|
307 | - (void) setBlocksize: (int64_t) blocksize { |
---|
308 | __blocksize = blocksize; |
---|
309 | __blocksize_isset = YES; |
---|
310 | } |
---|
311 | |
---|
312 | - (BOOL) blocksizeIsSet { |
---|
313 | return __blocksize_isset; |
---|
314 | } |
---|
315 | |
---|
316 | - (void) unsetBlocksize { |
---|
317 | __blocksize_isset = NO; |
---|
318 | } |
---|
319 | |
---|
320 | - (int64_t) modification_time { |
---|
321 | return __modification_time; |
---|
322 | } |
---|
323 | |
---|
324 | - (void) setModification_time: (int64_t) modification_time { |
---|
325 | __modification_time = modification_time; |
---|
326 | __modification_time_isset = YES; |
---|
327 | } |
---|
328 | |
---|
329 | - (BOOL) modification_timeIsSet { |
---|
330 | return __modification_time_isset; |
---|
331 | } |
---|
332 | |
---|
333 | - (void) unsetModification_time { |
---|
334 | __modification_time_isset = NO; |
---|
335 | } |
---|
336 | |
---|
337 | - (NSString *) permission { |
---|
338 | return [[__permission retain] autorelease]; |
---|
339 | } |
---|
340 | |
---|
341 | - (void) setPermission: (NSString *) permission { |
---|
342 | [permission retain]; |
---|
343 | [__permission release]; |
---|
344 | __permission = permission; |
---|
345 | __permission_isset = YES; |
---|
346 | } |
---|
347 | |
---|
348 | - (BOOL) permissionIsSet { |
---|
349 | return __permission_isset; |
---|
350 | } |
---|
351 | |
---|
352 | - (void) unsetPermission { |
---|
353 | [__permission release]; |
---|
354 | __permission = nil; |
---|
355 | __permission_isset = NO; |
---|
356 | } |
---|
357 | |
---|
358 | - (NSString *) owner { |
---|
359 | return [[__owner retain] autorelease]; |
---|
360 | } |
---|
361 | |
---|
362 | - (void) setOwner: (NSString *) owner { |
---|
363 | [owner retain]; |
---|
364 | [__owner release]; |
---|
365 | __owner = owner; |
---|
366 | __owner_isset = YES; |
---|
367 | } |
---|
368 | |
---|
369 | - (BOOL) ownerIsSet { |
---|
370 | return __owner_isset; |
---|
371 | } |
---|
372 | |
---|
373 | - (void) unsetOwner { |
---|
374 | [__owner release]; |
---|
375 | __owner = nil; |
---|
376 | __owner_isset = NO; |
---|
377 | } |
---|
378 | |
---|
379 | - (NSString *) group { |
---|
380 | return [[__group retain] autorelease]; |
---|
381 | } |
---|
382 | |
---|
383 | - (void) setGroup: (NSString *) group { |
---|
384 | [group retain]; |
---|
385 | [__group release]; |
---|
386 | __group = group; |
---|
387 | __group_isset = YES; |
---|
388 | } |
---|
389 | |
---|
390 | - (BOOL) groupIsSet { |
---|
391 | return __group_isset; |
---|
392 | } |
---|
393 | |
---|
394 | - (void) unsetGroup { |
---|
395 | [__group release]; |
---|
396 | __group = nil; |
---|
397 | __group_isset = NO; |
---|
398 | } |
---|
399 | |
---|
400 | - (void) read: (id <TProtocol>) inProtocol |
---|
401 | { |
---|
402 | NSString * fieldName; |
---|
403 | int fieldType; |
---|
404 | int fieldID; |
---|
405 | |
---|
406 | [inProtocol readStructBeginReturningName: NULL]; |
---|
407 | while (true) |
---|
408 | { |
---|
409 | [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; |
---|
410 | if (fieldType == TType_STOP) { |
---|
411 | break; |
---|
412 | } |
---|
413 | switch (fieldID) |
---|
414 | { |
---|
415 | case 1: |
---|
416 | if (fieldType == TType_STRING) { |
---|
417 | NSString * fieldValue = [inProtocol readString]; |
---|
418 | [self setPath: fieldValue]; |
---|
419 | } else { |
---|
420 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
421 | } |
---|
422 | break; |
---|
423 | case 2: |
---|
424 | if (fieldType == TType_I64) { |
---|
425 | int64_t fieldValue = [inProtocol readI64]; |
---|
426 | [self setLength: fieldValue]; |
---|
427 | } else { |
---|
428 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
429 | } |
---|
430 | break; |
---|
431 | case 3: |
---|
432 | if (fieldType == TType_BOOL) { |
---|
433 | BOOL fieldValue = [inProtocol readBool]; |
---|
434 | [self setIsdir: fieldValue]; |
---|
435 | } else { |
---|
436 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
437 | } |
---|
438 | break; |
---|
439 | case 4: |
---|
440 | if (fieldType == TType_I16) { |
---|
441 | int16_t fieldValue = [inProtocol readI16]; |
---|
442 | [self setBlock_replication: fieldValue]; |
---|
443 | } else { |
---|
444 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
445 | } |
---|
446 | break; |
---|
447 | case 5: |
---|
448 | if (fieldType == TType_I64) { |
---|
449 | int64_t fieldValue = [inProtocol readI64]; |
---|
450 | [self setBlocksize: fieldValue]; |
---|
451 | } else { |
---|
452 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
453 | } |
---|
454 | break; |
---|
455 | case 6: |
---|
456 | if (fieldType == TType_I64) { |
---|
457 | int64_t fieldValue = [inProtocol readI64]; |
---|
458 | [self setModification_time: fieldValue]; |
---|
459 | } else { |
---|
460 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
461 | } |
---|
462 | break; |
---|
463 | case 7: |
---|
464 | if (fieldType == TType_STRING) { |
---|
465 | NSString * fieldValue = [inProtocol readString]; |
---|
466 | [self setPermission: fieldValue]; |
---|
467 | } else { |
---|
468 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
469 | } |
---|
470 | break; |
---|
471 | case 8: |
---|
472 | if (fieldType == TType_STRING) { |
---|
473 | NSString * fieldValue = [inProtocol readString]; |
---|
474 | [self setOwner: fieldValue]; |
---|
475 | } else { |
---|
476 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
477 | } |
---|
478 | break; |
---|
479 | case 9: |
---|
480 | if (fieldType == TType_STRING) { |
---|
481 | NSString * fieldValue = [inProtocol readString]; |
---|
482 | [self setGroup: fieldValue]; |
---|
483 | } else { |
---|
484 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
485 | } |
---|
486 | break; |
---|
487 | default: |
---|
488 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
489 | break; |
---|
490 | } |
---|
491 | [inProtocol readFieldEnd]; |
---|
492 | } |
---|
493 | [inProtocol readStructEnd]; |
---|
494 | } |
---|
495 | |
---|
496 | - (void) write: (id <TProtocol>) outProtocol { |
---|
497 | [outProtocol writeStructBeginWithName: @"FileStatus"]; |
---|
498 | if (__path_isset) { |
---|
499 | if (__path != nil) { |
---|
500 | [outProtocol writeFieldBeginWithName: @"path" type: TType_STRING fieldID: 1]; |
---|
501 | [outProtocol writeString: __path]; |
---|
502 | [outProtocol writeFieldEnd]; |
---|
503 | } |
---|
504 | } |
---|
505 | if (__length_isset) { |
---|
506 | [outProtocol writeFieldBeginWithName: @"length" type: TType_I64 fieldID: 2]; |
---|
507 | [outProtocol writeI64: __length]; |
---|
508 | [outProtocol writeFieldEnd]; |
---|
509 | } |
---|
510 | if (__isdir_isset) { |
---|
511 | [outProtocol writeFieldBeginWithName: @"isdir" type: TType_BOOL fieldID: 3]; |
---|
512 | [outProtocol writeBool: __isdir]; |
---|
513 | [outProtocol writeFieldEnd]; |
---|
514 | } |
---|
515 | if (__block_replication_isset) { |
---|
516 | [outProtocol writeFieldBeginWithName: @"block_replication" type: TType_I16 fieldID: 4]; |
---|
517 | [outProtocol writeI16: __block_replication]; |
---|
518 | [outProtocol writeFieldEnd]; |
---|
519 | } |
---|
520 | if (__blocksize_isset) { |
---|
521 | [outProtocol writeFieldBeginWithName: @"blocksize" type: TType_I64 fieldID: 5]; |
---|
522 | [outProtocol writeI64: __blocksize]; |
---|
523 | [outProtocol writeFieldEnd]; |
---|
524 | } |
---|
525 | if (__modification_time_isset) { |
---|
526 | [outProtocol writeFieldBeginWithName: @"modification_time" type: TType_I64 fieldID: 6]; |
---|
527 | [outProtocol writeI64: __modification_time]; |
---|
528 | [outProtocol writeFieldEnd]; |
---|
529 | } |
---|
530 | if (__permission_isset) { |
---|
531 | if (__permission != nil) { |
---|
532 | [outProtocol writeFieldBeginWithName: @"permission" type: TType_STRING fieldID: 7]; |
---|
533 | [outProtocol writeString: __permission]; |
---|
534 | [outProtocol writeFieldEnd]; |
---|
535 | } |
---|
536 | } |
---|
537 | if (__owner_isset) { |
---|
538 | if (__owner != nil) { |
---|
539 | [outProtocol writeFieldBeginWithName: @"owner" type: TType_STRING fieldID: 8]; |
---|
540 | [outProtocol writeString: __owner]; |
---|
541 | [outProtocol writeFieldEnd]; |
---|
542 | } |
---|
543 | } |
---|
544 | if (__group_isset) { |
---|
545 | if (__group != nil) { |
---|
546 | [outProtocol writeFieldBeginWithName: @"group" type: TType_STRING fieldID: 9]; |
---|
547 | [outProtocol writeString: __group]; |
---|
548 | [outProtocol writeFieldEnd]; |
---|
549 | } |
---|
550 | } |
---|
551 | [outProtocol writeFieldStop]; |
---|
552 | [outProtocol writeStructEnd]; |
---|
553 | } |
---|
554 | |
---|
555 | - (NSString *) description { |
---|
556 | NSMutableString * ms = [NSMutableString stringWithString: @"FileStatus("]; |
---|
557 | [ms appendString: @"path:"]; |
---|
558 | [ms appendFormat: @"\"%@\"", __path]; |
---|
559 | [ms appendString: @",length:"]; |
---|
560 | [ms appendFormat: @"%qi", __length]; |
---|
561 | [ms appendString: @",isdir:"]; |
---|
562 | [ms appendFormat: @"%i", __isdir]; |
---|
563 | [ms appendString: @",block_replication:"]; |
---|
564 | [ms appendFormat: @"%hi", __block_replication]; |
---|
565 | [ms appendString: @",blocksize:"]; |
---|
566 | [ms appendFormat: @"%qi", __blocksize]; |
---|
567 | [ms appendString: @",modification_time:"]; |
---|
568 | [ms appendFormat: @"%qi", __modification_time]; |
---|
569 | [ms appendString: @",permission:"]; |
---|
570 | [ms appendFormat: @"\"%@\"", __permission]; |
---|
571 | [ms appendString: @",owner:"]; |
---|
572 | [ms appendFormat: @"\"%@\"", __owner]; |
---|
573 | [ms appendString: @",group:"]; |
---|
574 | [ms appendFormat: @"\"%@\"", __group]; |
---|
575 | [ms appendString: @")"]; |
---|
576 | return [ms copy]; |
---|
577 | } |
---|
578 | |
---|
579 | @end |
---|
580 | |
---|
581 | @implementation BlockLocation |
---|
582 | - (id) initWithHosts: (NSArray *) hosts names: (NSArray *) names offset: (int64_t) offset length: (int64_t) length |
---|
583 | { |
---|
584 | self = [super init]; |
---|
585 | __hosts = [hosts retain]; |
---|
586 | __hosts_isset = YES; |
---|
587 | __names = [names retain]; |
---|
588 | __names_isset = YES; |
---|
589 | __offset = offset; |
---|
590 | __offset_isset = YES; |
---|
591 | __length = length; |
---|
592 | __length_isset = YES; |
---|
593 | return self; |
---|
594 | } |
---|
595 | |
---|
596 | - (void) dealloc |
---|
597 | { |
---|
598 | [__hosts release]; |
---|
599 | [__names release]; |
---|
600 | [super dealloc]; |
---|
601 | } |
---|
602 | |
---|
603 | - (NSArray *) hosts { |
---|
604 | return [[__hosts retain] autorelease]; |
---|
605 | } |
---|
606 | |
---|
607 | - (void) setHosts: (NSArray *) hosts { |
---|
608 | [hosts retain]; |
---|
609 | [__hosts release]; |
---|
610 | __hosts = hosts; |
---|
611 | __hosts_isset = YES; |
---|
612 | } |
---|
613 | |
---|
614 | - (BOOL) hostsIsSet { |
---|
615 | return __hosts_isset; |
---|
616 | } |
---|
617 | |
---|
618 | - (void) unsetHosts { |
---|
619 | [__hosts release]; |
---|
620 | __hosts = nil; |
---|
621 | __hosts_isset = NO; |
---|
622 | } |
---|
623 | |
---|
624 | - (NSArray *) names { |
---|
625 | return [[__names retain] autorelease]; |
---|
626 | } |
---|
627 | |
---|
628 | - (void) setNames: (NSArray *) names { |
---|
629 | [names retain]; |
---|
630 | [__names release]; |
---|
631 | __names = names; |
---|
632 | __names_isset = YES; |
---|
633 | } |
---|
634 | |
---|
635 | - (BOOL) namesIsSet { |
---|
636 | return __names_isset; |
---|
637 | } |
---|
638 | |
---|
639 | - (void) unsetNames { |
---|
640 | [__names release]; |
---|
641 | __names = nil; |
---|
642 | __names_isset = NO; |
---|
643 | } |
---|
644 | |
---|
645 | - (int64_t) offset { |
---|
646 | return __offset; |
---|
647 | } |
---|
648 | |
---|
649 | - (void) setOffset: (int64_t) offset { |
---|
650 | __offset = offset; |
---|
651 | __offset_isset = YES; |
---|
652 | } |
---|
653 | |
---|
654 | - (BOOL) offsetIsSet { |
---|
655 | return __offset_isset; |
---|
656 | } |
---|
657 | |
---|
658 | - (void) unsetOffset { |
---|
659 | __offset_isset = NO; |
---|
660 | } |
---|
661 | |
---|
662 | - (int64_t) length { |
---|
663 | return __length; |
---|
664 | } |
---|
665 | |
---|
666 | - (void) setLength: (int64_t) length { |
---|
667 | __length = length; |
---|
668 | __length_isset = YES; |
---|
669 | } |
---|
670 | |
---|
671 | - (BOOL) lengthIsSet { |
---|
672 | return __length_isset; |
---|
673 | } |
---|
674 | |
---|
675 | - (void) unsetLength { |
---|
676 | __length_isset = NO; |
---|
677 | } |
---|
678 | |
---|
679 | - (void) read: (id <TProtocol>) inProtocol |
---|
680 | { |
---|
681 | NSString * fieldName; |
---|
682 | int fieldType; |
---|
683 | int fieldID; |
---|
684 | |
---|
685 | [inProtocol readStructBeginReturningName: NULL]; |
---|
686 | while (true) |
---|
687 | { |
---|
688 | [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; |
---|
689 | if (fieldType == TType_STOP) { |
---|
690 | break; |
---|
691 | } |
---|
692 | switch (fieldID) |
---|
693 | { |
---|
694 | case 1: |
---|
695 | if (fieldType == TType_LIST) { |
---|
696 | int _size0; |
---|
697 | [inProtocol readListBeginReturningElementType: NULL size: &_size0]; |
---|
698 | NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size0]; |
---|
699 | int _i1; |
---|
700 | for (_i1 = 0; _i1 < _size0; ++_i1) |
---|
701 | { |
---|
702 | NSString * _elem2 = [inProtocol readString]; |
---|
703 | [fieldValue addObject: _elem2]; |
---|
704 | } |
---|
705 | [inProtocol readListEnd]; |
---|
706 | [self setHosts: fieldValue]; |
---|
707 | [fieldValue release]; |
---|
708 | } else { |
---|
709 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
710 | } |
---|
711 | break; |
---|
712 | case 2: |
---|
713 | if (fieldType == TType_LIST) { |
---|
714 | int _size3; |
---|
715 | [inProtocol readListBeginReturningElementType: NULL size: &_size3]; |
---|
716 | NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size3]; |
---|
717 | int _i4; |
---|
718 | for (_i4 = 0; _i4 < _size3; ++_i4) |
---|
719 | { |
---|
720 | NSString * _elem5 = [inProtocol readString]; |
---|
721 | [fieldValue addObject: _elem5]; |
---|
722 | } |
---|
723 | [inProtocol readListEnd]; |
---|
724 | [self setNames: fieldValue]; |
---|
725 | [fieldValue release]; |
---|
726 | } else { |
---|
727 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
728 | } |
---|
729 | break; |
---|
730 | case 3: |
---|
731 | if (fieldType == TType_I64) { |
---|
732 | int64_t fieldValue = [inProtocol readI64]; |
---|
733 | [self setOffset: fieldValue]; |
---|
734 | } else { |
---|
735 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
736 | } |
---|
737 | break; |
---|
738 | case 4: |
---|
739 | if (fieldType == TType_I64) { |
---|
740 | int64_t fieldValue = [inProtocol readI64]; |
---|
741 | [self setLength: fieldValue]; |
---|
742 | } else { |
---|
743 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
744 | } |
---|
745 | break; |
---|
746 | default: |
---|
747 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
748 | break; |
---|
749 | } |
---|
750 | [inProtocol readFieldEnd]; |
---|
751 | } |
---|
752 | [inProtocol readStructEnd]; |
---|
753 | } |
---|
754 | |
---|
755 | - (void) write: (id <TProtocol>) outProtocol { |
---|
756 | [outProtocol writeStructBeginWithName: @"BlockLocation"]; |
---|
757 | if (__hosts_isset) { |
---|
758 | if (__hosts != nil) { |
---|
759 | [outProtocol writeFieldBeginWithName: @"hosts" type: TType_LIST fieldID: 1]; |
---|
760 | { |
---|
761 | [outProtocol writeListBeginWithElementType: TType_STRING size: [__hosts count]]; |
---|
762 | int i7; |
---|
763 | for (i7 = 0; i7 < [__hosts count]; i7++) |
---|
764 | { |
---|
765 | [outProtocol writeString: [__hosts objectAtIndex: i7]]; |
---|
766 | } |
---|
767 | [outProtocol writeListEnd]; |
---|
768 | } |
---|
769 | [outProtocol writeFieldEnd]; |
---|
770 | } |
---|
771 | } |
---|
772 | if (__names_isset) { |
---|
773 | if (__names != nil) { |
---|
774 | [outProtocol writeFieldBeginWithName: @"names" type: TType_LIST fieldID: 2]; |
---|
775 | { |
---|
776 | [outProtocol writeListBeginWithElementType: TType_STRING size: [__names count]]; |
---|
777 | int i9; |
---|
778 | for (i9 = 0; i9 < [__names count]; i9++) |
---|
779 | { |
---|
780 | [outProtocol writeString: [__names objectAtIndex: i9]]; |
---|
781 | } |
---|
782 | [outProtocol writeListEnd]; |
---|
783 | } |
---|
784 | [outProtocol writeFieldEnd]; |
---|
785 | } |
---|
786 | } |
---|
787 | if (__offset_isset) { |
---|
788 | [outProtocol writeFieldBeginWithName: @"offset" type: TType_I64 fieldID: 3]; |
---|
789 | [outProtocol writeI64: __offset]; |
---|
790 | [outProtocol writeFieldEnd]; |
---|
791 | } |
---|
792 | if (__length_isset) { |
---|
793 | [outProtocol writeFieldBeginWithName: @"length" type: TType_I64 fieldID: 4]; |
---|
794 | [outProtocol writeI64: __length]; |
---|
795 | [outProtocol writeFieldEnd]; |
---|
796 | } |
---|
797 | [outProtocol writeFieldStop]; |
---|
798 | [outProtocol writeStructEnd]; |
---|
799 | } |
---|
800 | |
---|
801 | - (NSString *) description { |
---|
802 | NSMutableString * ms = [NSMutableString stringWithString: @"BlockLocation("]; |
---|
803 | [ms appendString: @"hosts:"]; |
---|
804 | [ms appendFormat: @"%@", __hosts]; |
---|
805 | [ms appendString: @",names:"]; |
---|
806 | [ms appendFormat: @"%@", __names]; |
---|
807 | [ms appendString: @",offset:"]; |
---|
808 | [ms appendFormat: @"%qi", __offset]; |
---|
809 | [ms appendString: @",length:"]; |
---|
810 | [ms appendFormat: @"%qi", __length]; |
---|
811 | [ms appendString: @")"]; |
---|
812 | return [ms copy]; |
---|
813 | } |
---|
814 | |
---|
815 | @end |
---|
816 | |
---|
817 | @implementation MalformedInputException |
---|
818 | - (id) init |
---|
819 | { |
---|
820 | return [super initWithName: @"MalformedInputException" reason: @"unknown" userInfo: nil]; |
---|
821 | } |
---|
822 | - (id) initWithMessage: (NSString *) message |
---|
823 | { |
---|
824 | self = [self init]; |
---|
825 | __message = [message retain]; |
---|
826 | __message_isset = YES; |
---|
827 | return self; |
---|
828 | } |
---|
829 | |
---|
830 | - (void) dealloc |
---|
831 | { |
---|
832 | [__message release]; |
---|
833 | [super dealloc]; |
---|
834 | } |
---|
835 | |
---|
836 | - (NSString *) message { |
---|
837 | return [[__message retain] autorelease]; |
---|
838 | } |
---|
839 | |
---|
840 | - (void) setMessage: (NSString *) message { |
---|
841 | [message retain]; |
---|
842 | [__message release]; |
---|
843 | __message = message; |
---|
844 | __message_isset = YES; |
---|
845 | } |
---|
846 | |
---|
847 | - (BOOL) messageIsSet { |
---|
848 | return __message_isset; |
---|
849 | } |
---|
850 | |
---|
851 | - (void) unsetMessage { |
---|
852 | [__message release]; |
---|
853 | __message = nil; |
---|
854 | __message_isset = NO; |
---|
855 | } |
---|
856 | |
---|
857 | - (void) read: (id <TProtocol>) inProtocol |
---|
858 | { |
---|
859 | NSString * fieldName; |
---|
860 | int fieldType; |
---|
861 | int fieldID; |
---|
862 | |
---|
863 | [inProtocol readStructBeginReturningName: NULL]; |
---|
864 | while (true) |
---|
865 | { |
---|
866 | [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; |
---|
867 | if (fieldType == TType_STOP) { |
---|
868 | break; |
---|
869 | } |
---|
870 | switch (fieldID) |
---|
871 | { |
---|
872 | case -1: |
---|
873 | if (fieldType == TType_STRING) { |
---|
874 | NSString * fieldValue = [inProtocol readString]; |
---|
875 | [self setMessage: fieldValue]; |
---|
876 | } else { |
---|
877 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
878 | } |
---|
879 | break; |
---|
880 | default: |
---|
881 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
882 | break; |
---|
883 | } |
---|
884 | [inProtocol readFieldEnd]; |
---|
885 | } |
---|
886 | [inProtocol readStructEnd]; |
---|
887 | } |
---|
888 | |
---|
889 | - (void) write: (id <TProtocol>) outProtocol { |
---|
890 | [outProtocol writeStructBeginWithName: @"MalformedInputException"]; |
---|
891 | if (__message_isset) { |
---|
892 | if (__message != nil) { |
---|
893 | [outProtocol writeFieldBeginWithName: @"message" type: TType_STRING fieldID: -1]; |
---|
894 | [outProtocol writeString: __message]; |
---|
895 | [outProtocol writeFieldEnd]; |
---|
896 | } |
---|
897 | } |
---|
898 | [outProtocol writeFieldStop]; |
---|
899 | [outProtocol writeStructEnd]; |
---|
900 | } |
---|
901 | |
---|
902 | - (NSString *) description { |
---|
903 | NSMutableString * ms = [NSMutableString stringWithString: @"MalformedInputException("]; |
---|
904 | [ms appendString: @"message:"]; |
---|
905 | [ms appendFormat: @"\"%@\"", __message]; |
---|
906 | [ms appendString: @")"]; |
---|
907 | return [ms copy]; |
---|
908 | } |
---|
909 | |
---|
910 | @end |
---|
911 | |
---|
912 | @implementation ThriftIOException |
---|
913 | - (id) init |
---|
914 | { |
---|
915 | return [super initWithName: @"ThriftIOException" reason: @"unknown" userInfo: nil]; |
---|
916 | } |
---|
917 | - (id) initWithMessage: (NSString *) message |
---|
918 | { |
---|
919 | self = [self init]; |
---|
920 | __message = [message retain]; |
---|
921 | __message_isset = YES; |
---|
922 | return self; |
---|
923 | } |
---|
924 | |
---|
925 | - (void) dealloc |
---|
926 | { |
---|
927 | [__message release]; |
---|
928 | [super dealloc]; |
---|
929 | } |
---|
930 | |
---|
931 | - (NSString *) message { |
---|
932 | return [[__message retain] autorelease]; |
---|
933 | } |
---|
934 | |
---|
935 | - (void) setMessage: (NSString *) message { |
---|
936 | [message retain]; |
---|
937 | [__message release]; |
---|
938 | __message = message; |
---|
939 | __message_isset = YES; |
---|
940 | } |
---|
941 | |
---|
942 | - (BOOL) messageIsSet { |
---|
943 | return __message_isset; |
---|
944 | } |
---|
945 | |
---|
946 | - (void) unsetMessage { |
---|
947 | [__message release]; |
---|
948 | __message = nil; |
---|
949 | __message_isset = NO; |
---|
950 | } |
---|
951 | |
---|
952 | - (void) read: (id <TProtocol>) inProtocol |
---|
953 | { |
---|
954 | NSString * fieldName; |
---|
955 | int fieldType; |
---|
956 | int fieldID; |
---|
957 | |
---|
958 | [inProtocol readStructBeginReturningName: NULL]; |
---|
959 | while (true) |
---|
960 | { |
---|
961 | [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; |
---|
962 | if (fieldType == TType_STOP) { |
---|
963 | break; |
---|
964 | } |
---|
965 | switch (fieldID) |
---|
966 | { |
---|
967 | case -1: |
---|
968 | if (fieldType == TType_STRING) { |
---|
969 | NSString * fieldValue = [inProtocol readString]; |
---|
970 | [self setMessage: fieldValue]; |
---|
971 | } else { |
---|
972 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
973 | } |
---|
974 | break; |
---|
975 | default: |
---|
976 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
977 | break; |
---|
978 | } |
---|
979 | [inProtocol readFieldEnd]; |
---|
980 | } |
---|
981 | [inProtocol readStructEnd]; |
---|
982 | } |
---|
983 | |
---|
984 | - (void) write: (id <TProtocol>) outProtocol { |
---|
985 | [outProtocol writeStructBeginWithName: @"ThriftIOException"]; |
---|
986 | if (__message_isset) { |
---|
987 | if (__message != nil) { |
---|
988 | [outProtocol writeFieldBeginWithName: @"message" type: TType_STRING fieldID: -1]; |
---|
989 | [outProtocol writeString: __message]; |
---|
990 | [outProtocol writeFieldEnd]; |
---|
991 | } |
---|
992 | } |
---|
993 | [outProtocol writeFieldStop]; |
---|
994 | [outProtocol writeStructEnd]; |
---|
995 | } |
---|
996 | |
---|
997 | - (NSString *) description { |
---|
998 | NSMutableString * ms = [NSMutableString stringWithString: @"ThriftIOException("]; |
---|
999 | [ms appendString: @"message:"]; |
---|
1000 | [ms appendFormat: @"\"%@\"", __message]; |
---|
1001 | [ms appendString: @")"]; |
---|
1002 | return [ms copy]; |
---|
1003 | } |
---|
1004 | |
---|
1005 | @end |
---|
1006 | |
---|
1007 | @interface SetInactivityTimeoutPeriodResult_ : NSObject { |
---|
1008 | } |
---|
1009 | |
---|
1010 | |
---|
1011 | - (void) read: (id <TProtocol>) inProtocol; |
---|
1012 | - (void) write: (id <TProtocol>) outProtocol; |
---|
1013 | |
---|
1014 | @end |
---|
1015 | |
---|
1016 | @implementation SetInactivityTimeoutPeriodResult_ |
---|
1017 | - (void) read: (id <TProtocol>) inProtocol |
---|
1018 | { |
---|
1019 | NSString * fieldName; |
---|
1020 | int fieldType; |
---|
1021 | int fieldID; |
---|
1022 | |
---|
1023 | [inProtocol readStructBeginReturningName: NULL]; |
---|
1024 | while (true) |
---|
1025 | { |
---|
1026 | [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; |
---|
1027 | if (fieldType == TType_STOP) { |
---|
1028 | break; |
---|
1029 | } |
---|
1030 | switch (fieldID) |
---|
1031 | { |
---|
1032 | default: |
---|
1033 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
1034 | break; |
---|
1035 | } |
---|
1036 | [inProtocol readFieldEnd]; |
---|
1037 | } |
---|
1038 | [inProtocol readStructEnd]; |
---|
1039 | } |
---|
1040 | |
---|
1041 | - (void) write: (id <TProtocol>) outProtocol { |
---|
1042 | [outProtocol writeStructBeginWithName: @"SetInactivityTimeoutPeriodResult_"]; |
---|
1043 | |
---|
1044 | [outProtocol writeFieldStop]; |
---|
1045 | [outProtocol writeStructEnd]; |
---|
1046 | } |
---|
1047 | |
---|
1048 | - (NSString *) description { |
---|
1049 | NSMutableString * ms = [NSMutableString stringWithString: @"SetInactivityTimeoutPeriodResult_("]; |
---|
1050 | [ms appendString: @")"]; |
---|
1051 | return [ms copy]; |
---|
1052 | } |
---|
1053 | |
---|
1054 | @end |
---|
1055 | |
---|
1056 | @interface ShutdownResult_ : NSObject { |
---|
1057 | } |
---|
1058 | |
---|
1059 | |
---|
1060 | - (void) read: (id <TProtocol>) inProtocol; |
---|
1061 | - (void) write: (id <TProtocol>) outProtocol; |
---|
1062 | |
---|
1063 | @end |
---|
1064 | |
---|
1065 | @implementation ShutdownResult_ |
---|
1066 | - (void) read: (id <TProtocol>) inProtocol |
---|
1067 | { |
---|
1068 | NSString * fieldName; |
---|
1069 | int fieldType; |
---|
1070 | int fieldID; |
---|
1071 | |
---|
1072 | [inProtocol readStructBeginReturningName: NULL]; |
---|
1073 | while (true) |
---|
1074 | { |
---|
1075 | [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; |
---|
1076 | if (fieldType == TType_STOP) { |
---|
1077 | break; |
---|
1078 | } |
---|
1079 | switch (fieldID) |
---|
1080 | { |
---|
1081 | default: |
---|
1082 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
1083 | break; |
---|
1084 | } |
---|
1085 | [inProtocol readFieldEnd]; |
---|
1086 | } |
---|
1087 | [inProtocol readStructEnd]; |
---|
1088 | } |
---|
1089 | |
---|
1090 | - (void) write: (id <TProtocol>) outProtocol { |
---|
1091 | [outProtocol writeStructBeginWithName: @"ShutdownResult_"]; |
---|
1092 | |
---|
1093 | [outProtocol writeFieldStop]; |
---|
1094 | [outProtocol writeStructEnd]; |
---|
1095 | } |
---|
1096 | |
---|
1097 | - (NSString *) description { |
---|
1098 | NSMutableString * ms = [NSMutableString stringWithString: @"ShutdownResult_("]; |
---|
1099 | [ms appendString: @")"]; |
---|
1100 | return [ms copy]; |
---|
1101 | } |
---|
1102 | |
---|
1103 | @end |
---|
1104 | |
---|
1105 | @interface CreateResult_ : NSObject { |
---|
1106 | ThriftHandle * __success; |
---|
1107 | ThriftIOException * __ouch; |
---|
1108 | |
---|
1109 | BOOL __success_isset; |
---|
1110 | BOOL __ouch_isset; |
---|
1111 | } |
---|
1112 | |
---|
1113 | - (id) initWithSuccess: (ThriftHandle *) success ouch: (ThriftIOException *) ouch; |
---|
1114 | |
---|
1115 | - (void) read: (id <TProtocol>) inProtocol; |
---|
1116 | - (void) write: (id <TProtocol>) outProtocol; |
---|
1117 | |
---|
1118 | - (ThriftHandle *) success; |
---|
1119 | - (void) setSuccess: (ThriftHandle *) success; |
---|
1120 | - (BOOL) successIsSet; |
---|
1121 | |
---|
1122 | - (ThriftIOException *) ouch; |
---|
1123 | - (void) setOuch: (ThriftIOException *) ouch; |
---|
1124 | - (BOOL) ouchIsSet; |
---|
1125 | |
---|
1126 | @end |
---|
1127 | |
---|
1128 | @implementation CreateResult_ |
---|
1129 | - (id) initWithSuccess: (ThriftHandle *) success ouch: (ThriftIOException *) ouch |
---|
1130 | { |
---|
1131 | self = [super init]; |
---|
1132 | __success = [success retain]; |
---|
1133 | __success_isset = YES; |
---|
1134 | __ouch = [ouch retain]; |
---|
1135 | __ouch_isset = YES; |
---|
1136 | return self; |
---|
1137 | } |
---|
1138 | |
---|
1139 | - (void) dealloc |
---|
1140 | { |
---|
1141 | [__success release]; |
---|
1142 | [__ouch release]; |
---|
1143 | [super dealloc]; |
---|
1144 | } |
---|
1145 | |
---|
1146 | - (ThriftHandle *) success { |
---|
1147 | return [[__success retain] autorelease]; |
---|
1148 | } |
---|
1149 | |
---|
1150 | - (void) setSuccess: (ThriftHandle *) success { |
---|
1151 | [success retain]; |
---|
1152 | [__success release]; |
---|
1153 | __success = success; |
---|
1154 | __success_isset = YES; |
---|
1155 | } |
---|
1156 | |
---|
1157 | - (BOOL) successIsSet { |
---|
1158 | return __success_isset; |
---|
1159 | } |
---|
1160 | |
---|
1161 | - (void) unsetSuccess { |
---|
1162 | [__success release]; |
---|
1163 | __success = nil; |
---|
1164 | __success_isset = NO; |
---|
1165 | } |
---|
1166 | |
---|
1167 | - (ThriftIOException *) ouch { |
---|
1168 | return [[__ouch retain] autorelease]; |
---|
1169 | } |
---|
1170 | |
---|
1171 | - (void) setOuch: (ThriftIOException *) ouch { |
---|
1172 | [ouch retain]; |
---|
1173 | [__ouch release]; |
---|
1174 | __ouch = ouch; |
---|
1175 | __ouch_isset = YES; |
---|
1176 | } |
---|
1177 | |
---|
1178 | - (BOOL) ouchIsSet { |
---|
1179 | return __ouch_isset; |
---|
1180 | } |
---|
1181 | |
---|
1182 | - (void) unsetOuch { |
---|
1183 | [__ouch release]; |
---|
1184 | __ouch = nil; |
---|
1185 | __ouch_isset = NO; |
---|
1186 | } |
---|
1187 | |
---|
1188 | - (void) read: (id <TProtocol>) inProtocol |
---|
1189 | { |
---|
1190 | NSString * fieldName; |
---|
1191 | int fieldType; |
---|
1192 | int fieldID; |
---|
1193 | |
---|
1194 | [inProtocol readStructBeginReturningName: NULL]; |
---|
1195 | while (true) |
---|
1196 | { |
---|
1197 | [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; |
---|
1198 | if (fieldType == TType_STOP) { |
---|
1199 | break; |
---|
1200 | } |
---|
1201 | switch (fieldID) |
---|
1202 | { |
---|
1203 | case 0: |
---|
1204 | if (fieldType == TType_STRUCT) { |
---|
1205 | ThriftHandle *fieldValue = [[ThriftHandle alloc] init]; |
---|
1206 | [fieldValue read: inProtocol]; |
---|
1207 | [self setSuccess: fieldValue]; |
---|
1208 | [fieldValue release]; |
---|
1209 | } else { |
---|
1210 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
1211 | } |
---|
1212 | break; |
---|
1213 | case 1: |
---|
1214 | if (fieldType == TType_STRUCT) { |
---|
1215 | ThriftIOException *fieldValue = [[ThriftIOException alloc] init]; |
---|
1216 | [fieldValue read: inProtocol]; |
---|
1217 | [self setOuch: fieldValue]; |
---|
1218 | [fieldValue release]; |
---|
1219 | } else { |
---|
1220 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
1221 | } |
---|
1222 | break; |
---|
1223 | default: |
---|
1224 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
1225 | break; |
---|
1226 | } |
---|
1227 | [inProtocol readFieldEnd]; |
---|
1228 | } |
---|
1229 | [inProtocol readStructEnd]; |
---|
1230 | } |
---|
1231 | |
---|
1232 | - (void) write: (id <TProtocol>) outProtocol { |
---|
1233 | [outProtocol writeStructBeginWithName: @"CreateResult_"]; |
---|
1234 | |
---|
1235 | if (__success_isset) { |
---|
1236 | if (__success != nil) { |
---|
1237 | [outProtocol writeFieldBeginWithName: @"success" type: TType_STRUCT fieldID: 0]; |
---|
1238 | [__success write: outProtocol]; |
---|
1239 | [outProtocol writeFieldEnd]; |
---|
1240 | } |
---|
1241 | } else if (__ouch_isset) { |
---|
1242 | if (__ouch != nil) { |
---|
1243 | [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1]; |
---|
1244 | [__ouch write: outProtocol]; |
---|
1245 | [outProtocol writeFieldEnd]; |
---|
1246 | } |
---|
1247 | } |
---|
1248 | [outProtocol writeFieldStop]; |
---|
1249 | [outProtocol writeStructEnd]; |
---|
1250 | } |
---|
1251 | |
---|
1252 | - (NSString *) description { |
---|
1253 | NSMutableString * ms = [NSMutableString stringWithString: @"CreateResult_("]; |
---|
1254 | [ms appendString: @"success:"]; |
---|
1255 | [ms appendFormat: @"%@", __success]; |
---|
1256 | [ms appendString: @",ouch:"]; |
---|
1257 | [ms appendFormat: @"%@", __ouch]; |
---|
1258 | [ms appendString: @")"]; |
---|
1259 | return [ms copy]; |
---|
1260 | } |
---|
1261 | |
---|
1262 | @end |
---|
1263 | |
---|
1264 | @interface CreateFileResult_ : NSObject { |
---|
1265 | ThriftHandle * __success; |
---|
1266 | ThriftIOException * __ouch; |
---|
1267 | |
---|
1268 | BOOL __success_isset; |
---|
1269 | BOOL __ouch_isset; |
---|
1270 | } |
---|
1271 | |
---|
1272 | - (id) initWithSuccess: (ThriftHandle *) success ouch: (ThriftIOException *) ouch; |
---|
1273 | |
---|
1274 | - (void) read: (id <TProtocol>) inProtocol; |
---|
1275 | - (void) write: (id <TProtocol>) outProtocol; |
---|
1276 | |
---|
1277 | - (ThriftHandle *) success; |
---|
1278 | - (void) setSuccess: (ThriftHandle *) success; |
---|
1279 | - (BOOL) successIsSet; |
---|
1280 | |
---|
1281 | - (ThriftIOException *) ouch; |
---|
1282 | - (void) setOuch: (ThriftIOException *) ouch; |
---|
1283 | - (BOOL) ouchIsSet; |
---|
1284 | |
---|
1285 | @end |
---|
1286 | |
---|
1287 | @implementation CreateFileResult_ |
---|
1288 | - (id) initWithSuccess: (ThriftHandle *) success ouch: (ThriftIOException *) ouch |
---|
1289 | { |
---|
1290 | self = [super init]; |
---|
1291 | __success = [success retain]; |
---|
1292 | __success_isset = YES; |
---|
1293 | __ouch = [ouch retain]; |
---|
1294 | __ouch_isset = YES; |
---|
1295 | return self; |
---|
1296 | } |
---|
1297 | |
---|
1298 | - (void) dealloc |
---|
1299 | { |
---|
1300 | [__success release]; |
---|
1301 | [__ouch release]; |
---|
1302 | [super dealloc]; |
---|
1303 | } |
---|
1304 | |
---|
1305 | - (ThriftHandle *) success { |
---|
1306 | return [[__success retain] autorelease]; |
---|
1307 | } |
---|
1308 | |
---|
1309 | - (void) setSuccess: (ThriftHandle *) success { |
---|
1310 | [success retain]; |
---|
1311 | [__success release]; |
---|
1312 | __success = success; |
---|
1313 | __success_isset = YES; |
---|
1314 | } |
---|
1315 | |
---|
1316 | - (BOOL) successIsSet { |
---|
1317 | return __success_isset; |
---|
1318 | } |
---|
1319 | |
---|
1320 | - (void) unsetSuccess { |
---|
1321 | [__success release]; |
---|
1322 | __success = nil; |
---|
1323 | __success_isset = NO; |
---|
1324 | } |
---|
1325 | |
---|
1326 | - (ThriftIOException *) ouch { |
---|
1327 | return [[__ouch retain] autorelease]; |
---|
1328 | } |
---|
1329 | |
---|
1330 | - (void) setOuch: (ThriftIOException *) ouch { |
---|
1331 | [ouch retain]; |
---|
1332 | [__ouch release]; |
---|
1333 | __ouch = ouch; |
---|
1334 | __ouch_isset = YES; |
---|
1335 | } |
---|
1336 | |
---|
1337 | - (BOOL) ouchIsSet { |
---|
1338 | return __ouch_isset; |
---|
1339 | } |
---|
1340 | |
---|
1341 | - (void) unsetOuch { |
---|
1342 | [__ouch release]; |
---|
1343 | __ouch = nil; |
---|
1344 | __ouch_isset = NO; |
---|
1345 | } |
---|
1346 | |
---|
1347 | - (void) read: (id <TProtocol>) inProtocol |
---|
1348 | { |
---|
1349 | NSString * fieldName; |
---|
1350 | int fieldType; |
---|
1351 | int fieldID; |
---|
1352 | |
---|
1353 | [inProtocol readStructBeginReturningName: NULL]; |
---|
1354 | while (true) |
---|
1355 | { |
---|
1356 | [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; |
---|
1357 | if (fieldType == TType_STOP) { |
---|
1358 | break; |
---|
1359 | } |
---|
1360 | switch (fieldID) |
---|
1361 | { |
---|
1362 | case 0: |
---|
1363 | if (fieldType == TType_STRUCT) { |
---|
1364 | ThriftHandle *fieldValue = [[ThriftHandle alloc] init]; |
---|
1365 | [fieldValue read: inProtocol]; |
---|
1366 | [self setSuccess: fieldValue]; |
---|
1367 | [fieldValue release]; |
---|
1368 | } else { |
---|
1369 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
1370 | } |
---|
1371 | break; |
---|
1372 | case 1: |
---|
1373 | if (fieldType == TType_STRUCT) { |
---|
1374 | ThriftIOException *fieldValue = [[ThriftIOException alloc] init]; |
---|
1375 | [fieldValue read: inProtocol]; |
---|
1376 | [self setOuch: fieldValue]; |
---|
1377 | [fieldValue release]; |
---|
1378 | } else { |
---|
1379 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
1380 | } |
---|
1381 | break; |
---|
1382 | default: |
---|
1383 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
1384 | break; |
---|
1385 | } |
---|
1386 | [inProtocol readFieldEnd]; |
---|
1387 | } |
---|
1388 | [inProtocol readStructEnd]; |
---|
1389 | } |
---|
1390 | |
---|
1391 | - (void) write: (id <TProtocol>) outProtocol { |
---|
1392 | [outProtocol writeStructBeginWithName: @"CreateFileResult_"]; |
---|
1393 | |
---|
1394 | if (__success_isset) { |
---|
1395 | if (__success != nil) { |
---|
1396 | [outProtocol writeFieldBeginWithName: @"success" type: TType_STRUCT fieldID: 0]; |
---|
1397 | [__success write: outProtocol]; |
---|
1398 | [outProtocol writeFieldEnd]; |
---|
1399 | } |
---|
1400 | } else if (__ouch_isset) { |
---|
1401 | if (__ouch != nil) { |
---|
1402 | [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1]; |
---|
1403 | [__ouch write: outProtocol]; |
---|
1404 | [outProtocol writeFieldEnd]; |
---|
1405 | } |
---|
1406 | } |
---|
1407 | [outProtocol writeFieldStop]; |
---|
1408 | [outProtocol writeStructEnd]; |
---|
1409 | } |
---|
1410 | |
---|
1411 | - (NSString *) description { |
---|
1412 | NSMutableString * ms = [NSMutableString stringWithString: @"CreateFileResult_("]; |
---|
1413 | [ms appendString: @"success:"]; |
---|
1414 | [ms appendFormat: @"%@", __success]; |
---|
1415 | [ms appendString: @",ouch:"]; |
---|
1416 | [ms appendFormat: @"%@", __ouch]; |
---|
1417 | [ms appendString: @")"]; |
---|
1418 | return [ms copy]; |
---|
1419 | } |
---|
1420 | |
---|
1421 | @end |
---|
1422 | |
---|
1423 | @interface OpenResult_ : NSObject { |
---|
1424 | ThriftHandle * __success; |
---|
1425 | ThriftIOException * __ouch; |
---|
1426 | |
---|
1427 | BOOL __success_isset; |
---|
1428 | BOOL __ouch_isset; |
---|
1429 | } |
---|
1430 | |
---|
1431 | - (id) initWithSuccess: (ThriftHandle *) success ouch: (ThriftIOException *) ouch; |
---|
1432 | |
---|
1433 | - (void) read: (id <TProtocol>) inProtocol; |
---|
1434 | - (void) write: (id <TProtocol>) outProtocol; |
---|
1435 | |
---|
1436 | - (ThriftHandle *) success; |
---|
1437 | - (void) setSuccess: (ThriftHandle *) success; |
---|
1438 | - (BOOL) successIsSet; |
---|
1439 | |
---|
1440 | - (ThriftIOException *) ouch; |
---|
1441 | - (void) setOuch: (ThriftIOException *) ouch; |
---|
1442 | - (BOOL) ouchIsSet; |
---|
1443 | |
---|
1444 | @end |
---|
1445 | |
---|
1446 | @implementation OpenResult_ |
---|
1447 | - (id) initWithSuccess: (ThriftHandle *) success ouch: (ThriftIOException *) ouch |
---|
1448 | { |
---|
1449 | self = [super init]; |
---|
1450 | __success = [success retain]; |
---|
1451 | __success_isset = YES; |
---|
1452 | __ouch = [ouch retain]; |
---|
1453 | __ouch_isset = YES; |
---|
1454 | return self; |
---|
1455 | } |
---|
1456 | |
---|
1457 | - (void) dealloc |
---|
1458 | { |
---|
1459 | [__success release]; |
---|
1460 | [__ouch release]; |
---|
1461 | [super dealloc]; |
---|
1462 | } |
---|
1463 | |
---|
1464 | - (ThriftHandle *) success { |
---|
1465 | return [[__success retain] autorelease]; |
---|
1466 | } |
---|
1467 | |
---|
1468 | - (void) setSuccess: (ThriftHandle *) success { |
---|
1469 | [success retain]; |
---|
1470 | [__success release]; |
---|
1471 | __success = success; |
---|
1472 | __success_isset = YES; |
---|
1473 | } |
---|
1474 | |
---|
1475 | - (BOOL) successIsSet { |
---|
1476 | return __success_isset; |
---|
1477 | } |
---|
1478 | |
---|
1479 | - (void) unsetSuccess { |
---|
1480 | [__success release]; |
---|
1481 | __success = nil; |
---|
1482 | __success_isset = NO; |
---|
1483 | } |
---|
1484 | |
---|
1485 | - (ThriftIOException *) ouch { |
---|
1486 | return [[__ouch retain] autorelease]; |
---|
1487 | } |
---|
1488 | |
---|
1489 | - (void) setOuch: (ThriftIOException *) ouch { |
---|
1490 | [ouch retain]; |
---|
1491 | [__ouch release]; |
---|
1492 | __ouch = ouch; |
---|
1493 | __ouch_isset = YES; |
---|
1494 | } |
---|
1495 | |
---|
1496 | - (BOOL) ouchIsSet { |
---|
1497 | return __ouch_isset; |
---|
1498 | } |
---|
1499 | |
---|
1500 | - (void) unsetOuch { |
---|
1501 | [__ouch release]; |
---|
1502 | __ouch = nil; |
---|
1503 | __ouch_isset = NO; |
---|
1504 | } |
---|
1505 | |
---|
1506 | - (void) read: (id <TProtocol>) inProtocol |
---|
1507 | { |
---|
1508 | NSString * fieldName; |
---|
1509 | int fieldType; |
---|
1510 | int fieldID; |
---|
1511 | |
---|
1512 | [inProtocol readStructBeginReturningName: NULL]; |
---|
1513 | while (true) |
---|
1514 | { |
---|
1515 | [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; |
---|
1516 | if (fieldType == TType_STOP) { |
---|
1517 | break; |
---|
1518 | } |
---|
1519 | switch (fieldID) |
---|
1520 | { |
---|
1521 | case 0: |
---|
1522 | if (fieldType == TType_STRUCT) { |
---|
1523 | ThriftHandle *fieldValue = [[ThriftHandle alloc] init]; |
---|
1524 | [fieldValue read: inProtocol]; |
---|
1525 | [self setSuccess: fieldValue]; |
---|
1526 | [fieldValue release]; |
---|
1527 | } else { |
---|
1528 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
1529 | } |
---|
1530 | break; |
---|
1531 | case 1: |
---|
1532 | if (fieldType == TType_STRUCT) { |
---|
1533 | ThriftIOException *fieldValue = [[ThriftIOException alloc] init]; |
---|
1534 | [fieldValue read: inProtocol]; |
---|
1535 | [self setOuch: fieldValue]; |
---|
1536 | [fieldValue release]; |
---|
1537 | } else { |
---|
1538 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
1539 | } |
---|
1540 | break; |
---|
1541 | default: |
---|
1542 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
1543 | break; |
---|
1544 | } |
---|
1545 | [inProtocol readFieldEnd]; |
---|
1546 | } |
---|
1547 | [inProtocol readStructEnd]; |
---|
1548 | } |
---|
1549 | |
---|
1550 | - (void) write: (id <TProtocol>) outProtocol { |
---|
1551 | [outProtocol writeStructBeginWithName: @"OpenResult_"]; |
---|
1552 | |
---|
1553 | if (__success_isset) { |
---|
1554 | if (__success != nil) { |
---|
1555 | [outProtocol writeFieldBeginWithName: @"success" type: TType_STRUCT fieldID: 0]; |
---|
1556 | [__success write: outProtocol]; |
---|
1557 | [outProtocol writeFieldEnd]; |
---|
1558 | } |
---|
1559 | } else if (__ouch_isset) { |
---|
1560 | if (__ouch != nil) { |
---|
1561 | [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1]; |
---|
1562 | [__ouch write: outProtocol]; |
---|
1563 | [outProtocol writeFieldEnd]; |
---|
1564 | } |
---|
1565 | } |
---|
1566 | [outProtocol writeFieldStop]; |
---|
1567 | [outProtocol writeStructEnd]; |
---|
1568 | } |
---|
1569 | |
---|
1570 | - (NSString *) description { |
---|
1571 | NSMutableString * ms = [NSMutableString stringWithString: @"OpenResult_("]; |
---|
1572 | [ms appendString: @"success:"]; |
---|
1573 | [ms appendFormat: @"%@", __success]; |
---|
1574 | [ms appendString: @",ouch:"]; |
---|
1575 | [ms appendFormat: @"%@", __ouch]; |
---|
1576 | [ms appendString: @")"]; |
---|
1577 | return [ms copy]; |
---|
1578 | } |
---|
1579 | |
---|
1580 | @end |
---|
1581 | |
---|
1582 | @interface AppendResult_ : NSObject { |
---|
1583 | ThriftHandle * __success; |
---|
1584 | ThriftIOException * __ouch; |
---|
1585 | |
---|
1586 | BOOL __success_isset; |
---|
1587 | BOOL __ouch_isset; |
---|
1588 | } |
---|
1589 | |
---|
1590 | - (id) initWithSuccess: (ThriftHandle *) success ouch: (ThriftIOException *) ouch; |
---|
1591 | |
---|
1592 | - (void) read: (id <TProtocol>) inProtocol; |
---|
1593 | - (void) write: (id <TProtocol>) outProtocol; |
---|
1594 | |
---|
1595 | - (ThriftHandle *) success; |
---|
1596 | - (void) setSuccess: (ThriftHandle *) success; |
---|
1597 | - (BOOL) successIsSet; |
---|
1598 | |
---|
1599 | - (ThriftIOException *) ouch; |
---|
1600 | - (void) setOuch: (ThriftIOException *) ouch; |
---|
1601 | - (BOOL) ouchIsSet; |
---|
1602 | |
---|
1603 | @end |
---|
1604 | |
---|
1605 | @implementation AppendResult_ |
---|
1606 | - (id) initWithSuccess: (ThriftHandle *) success ouch: (ThriftIOException *) ouch |
---|
1607 | { |
---|
1608 | self = [super init]; |
---|
1609 | __success = [success retain]; |
---|
1610 | __success_isset = YES; |
---|
1611 | __ouch = [ouch retain]; |
---|
1612 | __ouch_isset = YES; |
---|
1613 | return self; |
---|
1614 | } |
---|
1615 | |
---|
1616 | - (void) dealloc |
---|
1617 | { |
---|
1618 | [__success release]; |
---|
1619 | [__ouch release]; |
---|
1620 | [super dealloc]; |
---|
1621 | } |
---|
1622 | |
---|
1623 | - (ThriftHandle *) success { |
---|
1624 | return [[__success retain] autorelease]; |
---|
1625 | } |
---|
1626 | |
---|
1627 | - (void) setSuccess: (ThriftHandle *) success { |
---|
1628 | [success retain]; |
---|
1629 | [__success release]; |
---|
1630 | __success = success; |
---|
1631 | __success_isset = YES; |
---|
1632 | } |
---|
1633 | |
---|
1634 | - (BOOL) successIsSet { |
---|
1635 | return __success_isset; |
---|
1636 | } |
---|
1637 | |
---|
1638 | - (void) unsetSuccess { |
---|
1639 | [__success release]; |
---|
1640 | __success = nil; |
---|
1641 | __success_isset = NO; |
---|
1642 | } |
---|
1643 | |
---|
1644 | - (ThriftIOException *) ouch { |
---|
1645 | return [[__ouch retain] autorelease]; |
---|
1646 | } |
---|
1647 | |
---|
1648 | - (void) setOuch: (ThriftIOException *) ouch { |
---|
1649 | [ouch retain]; |
---|
1650 | [__ouch release]; |
---|
1651 | __ouch = ouch; |
---|
1652 | __ouch_isset = YES; |
---|
1653 | } |
---|
1654 | |
---|
1655 | - (BOOL) ouchIsSet { |
---|
1656 | return __ouch_isset; |
---|
1657 | } |
---|
1658 | |
---|
1659 | - (void) unsetOuch { |
---|
1660 | [__ouch release]; |
---|
1661 | __ouch = nil; |
---|
1662 | __ouch_isset = NO; |
---|
1663 | } |
---|
1664 | |
---|
1665 | - (void) read: (id <TProtocol>) inProtocol |
---|
1666 | { |
---|
1667 | NSString * fieldName; |
---|
1668 | int fieldType; |
---|
1669 | int fieldID; |
---|
1670 | |
---|
1671 | [inProtocol readStructBeginReturningName: NULL]; |
---|
1672 | while (true) |
---|
1673 | { |
---|
1674 | [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; |
---|
1675 | if (fieldType == TType_STOP) { |
---|
1676 | break; |
---|
1677 | } |
---|
1678 | switch (fieldID) |
---|
1679 | { |
---|
1680 | case 0: |
---|
1681 | if (fieldType == TType_STRUCT) { |
---|
1682 | ThriftHandle *fieldValue = [[ThriftHandle alloc] init]; |
---|
1683 | [fieldValue read: inProtocol]; |
---|
1684 | [self setSuccess: fieldValue]; |
---|
1685 | [fieldValue release]; |
---|
1686 | } else { |
---|
1687 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
1688 | } |
---|
1689 | break; |
---|
1690 | case 1: |
---|
1691 | if (fieldType == TType_STRUCT) { |
---|
1692 | ThriftIOException *fieldValue = [[ThriftIOException alloc] init]; |
---|
1693 | [fieldValue read: inProtocol]; |
---|
1694 | [self setOuch: fieldValue]; |
---|
1695 | [fieldValue release]; |
---|
1696 | } else { |
---|
1697 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
1698 | } |
---|
1699 | break; |
---|
1700 | default: |
---|
1701 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
1702 | break; |
---|
1703 | } |
---|
1704 | [inProtocol readFieldEnd]; |
---|
1705 | } |
---|
1706 | [inProtocol readStructEnd]; |
---|
1707 | } |
---|
1708 | |
---|
1709 | - (void) write: (id <TProtocol>) outProtocol { |
---|
1710 | [outProtocol writeStructBeginWithName: @"AppendResult_"]; |
---|
1711 | |
---|
1712 | if (__success_isset) { |
---|
1713 | if (__success != nil) { |
---|
1714 | [outProtocol writeFieldBeginWithName: @"success" type: TType_STRUCT fieldID: 0]; |
---|
1715 | [__success write: outProtocol]; |
---|
1716 | [outProtocol writeFieldEnd]; |
---|
1717 | } |
---|
1718 | } else if (__ouch_isset) { |
---|
1719 | if (__ouch != nil) { |
---|
1720 | [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1]; |
---|
1721 | [__ouch write: outProtocol]; |
---|
1722 | [outProtocol writeFieldEnd]; |
---|
1723 | } |
---|
1724 | } |
---|
1725 | [outProtocol writeFieldStop]; |
---|
1726 | [outProtocol writeStructEnd]; |
---|
1727 | } |
---|
1728 | |
---|
1729 | - (NSString *) description { |
---|
1730 | NSMutableString * ms = [NSMutableString stringWithString: @"AppendResult_("]; |
---|
1731 | [ms appendString: @"success:"]; |
---|
1732 | [ms appendFormat: @"%@", __success]; |
---|
1733 | [ms appendString: @",ouch:"]; |
---|
1734 | [ms appendFormat: @"%@", __ouch]; |
---|
1735 | [ms appendString: @")"]; |
---|
1736 | return [ms copy]; |
---|
1737 | } |
---|
1738 | |
---|
1739 | @end |
---|
1740 | |
---|
1741 | @interface WriteResult_ : NSObject { |
---|
1742 | BOOL __success; |
---|
1743 | ThriftIOException * __ouch; |
---|
1744 | |
---|
1745 | BOOL __success_isset; |
---|
1746 | BOOL __ouch_isset; |
---|
1747 | } |
---|
1748 | |
---|
1749 | - (id) initWithSuccess: (BOOL) success ouch: (ThriftIOException *) ouch; |
---|
1750 | |
---|
1751 | - (void) read: (id <TProtocol>) inProtocol; |
---|
1752 | - (void) write: (id <TProtocol>) outProtocol; |
---|
1753 | |
---|
1754 | - (BOOL) success; |
---|
1755 | - (void) setSuccess: (BOOL) success; |
---|
1756 | - (BOOL) successIsSet; |
---|
1757 | |
---|
1758 | - (ThriftIOException *) ouch; |
---|
1759 | - (void) setOuch: (ThriftIOException *) ouch; |
---|
1760 | - (BOOL) ouchIsSet; |
---|
1761 | |
---|
1762 | @end |
---|
1763 | |
---|
1764 | @implementation WriteResult_ |
---|
1765 | - (id) initWithSuccess: (BOOL) success ouch: (ThriftIOException *) ouch |
---|
1766 | { |
---|
1767 | self = [super init]; |
---|
1768 | __success = success; |
---|
1769 | __success_isset = YES; |
---|
1770 | __ouch = [ouch retain]; |
---|
1771 | __ouch_isset = YES; |
---|
1772 | return self; |
---|
1773 | } |
---|
1774 | |
---|
1775 | - (void) dealloc |
---|
1776 | { |
---|
1777 | [__ouch release]; |
---|
1778 | [super dealloc]; |
---|
1779 | } |
---|
1780 | |
---|
1781 | - (BOOL) success { |
---|
1782 | return __success; |
---|
1783 | } |
---|
1784 | |
---|
1785 | - (void) setSuccess: (BOOL) success { |
---|
1786 | __success = success; |
---|
1787 | __success_isset = YES; |
---|
1788 | } |
---|
1789 | |
---|
1790 | - (BOOL) successIsSet { |
---|
1791 | return __success_isset; |
---|
1792 | } |
---|
1793 | |
---|
1794 | - (void) unsetSuccess { |
---|
1795 | __success_isset = NO; |
---|
1796 | } |
---|
1797 | |
---|
1798 | - (ThriftIOException *) ouch { |
---|
1799 | return [[__ouch retain] autorelease]; |
---|
1800 | } |
---|
1801 | |
---|
1802 | - (void) setOuch: (ThriftIOException *) ouch { |
---|
1803 | [ouch retain]; |
---|
1804 | [__ouch release]; |
---|
1805 | __ouch = ouch; |
---|
1806 | __ouch_isset = YES; |
---|
1807 | } |
---|
1808 | |
---|
1809 | - (BOOL) ouchIsSet { |
---|
1810 | return __ouch_isset; |
---|
1811 | } |
---|
1812 | |
---|
1813 | - (void) unsetOuch { |
---|
1814 | [__ouch release]; |
---|
1815 | __ouch = nil; |
---|
1816 | __ouch_isset = NO; |
---|
1817 | } |
---|
1818 | |
---|
1819 | - (void) read: (id <TProtocol>) inProtocol |
---|
1820 | { |
---|
1821 | NSString * fieldName; |
---|
1822 | int fieldType; |
---|
1823 | int fieldID; |
---|
1824 | |
---|
1825 | [inProtocol readStructBeginReturningName: NULL]; |
---|
1826 | while (true) |
---|
1827 | { |
---|
1828 | [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; |
---|
1829 | if (fieldType == TType_STOP) { |
---|
1830 | break; |
---|
1831 | } |
---|
1832 | switch (fieldID) |
---|
1833 | { |
---|
1834 | case 0: |
---|
1835 | if (fieldType == TType_BOOL) { |
---|
1836 | BOOL fieldValue = [inProtocol readBool]; |
---|
1837 | [self setSuccess: fieldValue]; |
---|
1838 | } else { |
---|
1839 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
1840 | } |
---|
1841 | break; |
---|
1842 | case 1: |
---|
1843 | if (fieldType == TType_STRUCT) { |
---|
1844 | ThriftIOException *fieldValue = [[ThriftIOException alloc] init]; |
---|
1845 | [fieldValue read: inProtocol]; |
---|
1846 | [self setOuch: fieldValue]; |
---|
1847 | [fieldValue release]; |
---|
1848 | } else { |
---|
1849 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
1850 | } |
---|
1851 | break; |
---|
1852 | default: |
---|
1853 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
1854 | break; |
---|
1855 | } |
---|
1856 | [inProtocol readFieldEnd]; |
---|
1857 | } |
---|
1858 | [inProtocol readStructEnd]; |
---|
1859 | } |
---|
1860 | |
---|
1861 | - (void) write: (id <TProtocol>) outProtocol { |
---|
1862 | [outProtocol writeStructBeginWithName: @"WriteResult_"]; |
---|
1863 | |
---|
1864 | if (__success_isset) { |
---|
1865 | [outProtocol writeFieldBeginWithName: @"success" type: TType_BOOL fieldID: 0]; |
---|
1866 | [outProtocol writeBool: __success]; |
---|
1867 | [outProtocol writeFieldEnd]; |
---|
1868 | } else if (__ouch_isset) { |
---|
1869 | if (__ouch != nil) { |
---|
1870 | [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1]; |
---|
1871 | [__ouch write: outProtocol]; |
---|
1872 | [outProtocol writeFieldEnd]; |
---|
1873 | } |
---|
1874 | } |
---|
1875 | [outProtocol writeFieldStop]; |
---|
1876 | [outProtocol writeStructEnd]; |
---|
1877 | } |
---|
1878 | |
---|
1879 | - (NSString *) description { |
---|
1880 | NSMutableString * ms = [NSMutableString stringWithString: @"WriteResult_("]; |
---|
1881 | [ms appendString: @"success:"]; |
---|
1882 | [ms appendFormat: @"%i", __success]; |
---|
1883 | [ms appendString: @",ouch:"]; |
---|
1884 | [ms appendFormat: @"%@", __ouch]; |
---|
1885 | [ms appendString: @")"]; |
---|
1886 | return [ms copy]; |
---|
1887 | } |
---|
1888 | |
---|
1889 | @end |
---|
1890 | |
---|
1891 | @interface ReadResult_ : NSObject { |
---|
1892 | NSString * __success; |
---|
1893 | ThriftIOException * __ouch; |
---|
1894 | |
---|
1895 | BOOL __success_isset; |
---|
1896 | BOOL __ouch_isset; |
---|
1897 | } |
---|
1898 | |
---|
1899 | - (id) initWithSuccess: (NSString *) success ouch: (ThriftIOException *) ouch; |
---|
1900 | |
---|
1901 | - (void) read: (id <TProtocol>) inProtocol; |
---|
1902 | - (void) write: (id <TProtocol>) outProtocol; |
---|
1903 | |
---|
1904 | - (NSString *) success; |
---|
1905 | - (void) setSuccess: (NSString *) success; |
---|
1906 | - (BOOL) successIsSet; |
---|
1907 | |
---|
1908 | - (ThriftIOException *) ouch; |
---|
1909 | - (void) setOuch: (ThriftIOException *) ouch; |
---|
1910 | - (BOOL) ouchIsSet; |
---|
1911 | |
---|
1912 | @end |
---|
1913 | |
---|
1914 | @implementation ReadResult_ |
---|
1915 | - (id) initWithSuccess: (NSString *) success ouch: (ThriftIOException *) ouch |
---|
1916 | { |
---|
1917 | self = [super init]; |
---|
1918 | __success = [success retain]; |
---|
1919 | __success_isset = YES; |
---|
1920 | __ouch = [ouch retain]; |
---|
1921 | __ouch_isset = YES; |
---|
1922 | return self; |
---|
1923 | } |
---|
1924 | |
---|
1925 | - (void) dealloc |
---|
1926 | { |
---|
1927 | [__success release]; |
---|
1928 | [__ouch release]; |
---|
1929 | [super dealloc]; |
---|
1930 | } |
---|
1931 | |
---|
1932 | - (NSString *) success { |
---|
1933 | return [[__success retain] autorelease]; |
---|
1934 | } |
---|
1935 | |
---|
1936 | - (void) setSuccess: (NSString *) success { |
---|
1937 | [success retain]; |
---|
1938 | [__success release]; |
---|
1939 | __success = success; |
---|
1940 | __success_isset = YES; |
---|
1941 | } |
---|
1942 | |
---|
1943 | - (BOOL) successIsSet { |
---|
1944 | return __success_isset; |
---|
1945 | } |
---|
1946 | |
---|
1947 | - (void) unsetSuccess { |
---|
1948 | [__success release]; |
---|
1949 | __success = nil; |
---|
1950 | __success_isset = NO; |
---|
1951 | } |
---|
1952 | |
---|
1953 | - (ThriftIOException *) ouch { |
---|
1954 | return [[__ouch retain] autorelease]; |
---|
1955 | } |
---|
1956 | |
---|
1957 | - (void) setOuch: (ThriftIOException *) ouch { |
---|
1958 | [ouch retain]; |
---|
1959 | [__ouch release]; |
---|
1960 | __ouch = ouch; |
---|
1961 | __ouch_isset = YES; |
---|
1962 | } |
---|
1963 | |
---|
1964 | - (BOOL) ouchIsSet { |
---|
1965 | return __ouch_isset; |
---|
1966 | } |
---|
1967 | |
---|
1968 | - (void) unsetOuch { |
---|
1969 | [__ouch release]; |
---|
1970 | __ouch = nil; |
---|
1971 | __ouch_isset = NO; |
---|
1972 | } |
---|
1973 | |
---|
1974 | - (void) read: (id <TProtocol>) inProtocol |
---|
1975 | { |
---|
1976 | NSString * fieldName; |
---|
1977 | int fieldType; |
---|
1978 | int fieldID; |
---|
1979 | |
---|
1980 | [inProtocol readStructBeginReturningName: NULL]; |
---|
1981 | while (true) |
---|
1982 | { |
---|
1983 | [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; |
---|
1984 | if (fieldType == TType_STOP) { |
---|
1985 | break; |
---|
1986 | } |
---|
1987 | switch (fieldID) |
---|
1988 | { |
---|
1989 | case 0: |
---|
1990 | if (fieldType == TType_STRING) { |
---|
1991 | NSString * fieldValue = [inProtocol readString]; |
---|
1992 | [self setSuccess: fieldValue]; |
---|
1993 | } else { |
---|
1994 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
1995 | } |
---|
1996 | break; |
---|
1997 | case 1: |
---|
1998 | if (fieldType == TType_STRUCT) { |
---|
1999 | ThriftIOException *fieldValue = [[ThriftIOException alloc] init]; |
---|
2000 | [fieldValue read: inProtocol]; |
---|
2001 | [self setOuch: fieldValue]; |
---|
2002 | [fieldValue release]; |
---|
2003 | } else { |
---|
2004 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
2005 | } |
---|
2006 | break; |
---|
2007 | default: |
---|
2008 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
2009 | break; |
---|
2010 | } |
---|
2011 | [inProtocol readFieldEnd]; |
---|
2012 | } |
---|
2013 | [inProtocol readStructEnd]; |
---|
2014 | } |
---|
2015 | |
---|
2016 | - (void) write: (id <TProtocol>) outProtocol { |
---|
2017 | [outProtocol writeStructBeginWithName: @"ReadResult_"]; |
---|
2018 | |
---|
2019 | if (__success_isset) { |
---|
2020 | if (__success != nil) { |
---|
2021 | [outProtocol writeFieldBeginWithName: @"success" type: TType_STRING fieldID: 0]; |
---|
2022 | [outProtocol writeString: __success]; |
---|
2023 | [outProtocol writeFieldEnd]; |
---|
2024 | } |
---|
2025 | } else if (__ouch_isset) { |
---|
2026 | if (__ouch != nil) { |
---|
2027 | [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1]; |
---|
2028 | [__ouch write: outProtocol]; |
---|
2029 | [outProtocol writeFieldEnd]; |
---|
2030 | } |
---|
2031 | } |
---|
2032 | [outProtocol writeFieldStop]; |
---|
2033 | [outProtocol writeStructEnd]; |
---|
2034 | } |
---|
2035 | |
---|
2036 | - (NSString *) description { |
---|
2037 | NSMutableString * ms = [NSMutableString stringWithString: @"ReadResult_("]; |
---|
2038 | [ms appendString: @"success:"]; |
---|
2039 | [ms appendFormat: @"\"%@\"", __success]; |
---|
2040 | [ms appendString: @",ouch:"]; |
---|
2041 | [ms appendFormat: @"%@", __ouch]; |
---|
2042 | [ms appendString: @")"]; |
---|
2043 | return [ms copy]; |
---|
2044 | } |
---|
2045 | |
---|
2046 | @end |
---|
2047 | |
---|
2048 | @interface CloseResult_ : NSObject { |
---|
2049 | BOOL __success; |
---|
2050 | ThriftIOException * __ouch; |
---|
2051 | |
---|
2052 | BOOL __success_isset; |
---|
2053 | BOOL __ouch_isset; |
---|
2054 | } |
---|
2055 | |
---|
2056 | - (id) initWithSuccess: (BOOL) success ouch: (ThriftIOException *) ouch; |
---|
2057 | |
---|
2058 | - (void) read: (id <TProtocol>) inProtocol; |
---|
2059 | - (void) write: (id <TProtocol>) outProtocol; |
---|
2060 | |
---|
2061 | - (BOOL) success; |
---|
2062 | - (void) setSuccess: (BOOL) success; |
---|
2063 | - (BOOL) successIsSet; |
---|
2064 | |
---|
2065 | - (ThriftIOException *) ouch; |
---|
2066 | - (void) setOuch: (ThriftIOException *) ouch; |
---|
2067 | - (BOOL) ouchIsSet; |
---|
2068 | |
---|
2069 | @end |
---|
2070 | |
---|
2071 | @implementation CloseResult_ |
---|
2072 | - (id) initWithSuccess: (BOOL) success ouch: (ThriftIOException *) ouch |
---|
2073 | { |
---|
2074 | self = [super init]; |
---|
2075 | __success = success; |
---|
2076 | __success_isset = YES; |
---|
2077 | __ouch = [ouch retain]; |
---|
2078 | __ouch_isset = YES; |
---|
2079 | return self; |
---|
2080 | } |
---|
2081 | |
---|
2082 | - (void) dealloc |
---|
2083 | { |
---|
2084 | [__ouch release]; |
---|
2085 | [super dealloc]; |
---|
2086 | } |
---|
2087 | |
---|
2088 | - (BOOL) success { |
---|
2089 | return __success; |
---|
2090 | } |
---|
2091 | |
---|
2092 | - (void) setSuccess: (BOOL) success { |
---|
2093 | __success = success; |
---|
2094 | __success_isset = YES; |
---|
2095 | } |
---|
2096 | |
---|
2097 | - (BOOL) successIsSet { |
---|
2098 | return __success_isset; |
---|
2099 | } |
---|
2100 | |
---|
2101 | - (void) unsetSuccess { |
---|
2102 | __success_isset = NO; |
---|
2103 | } |
---|
2104 | |
---|
2105 | - (ThriftIOException *) ouch { |
---|
2106 | return [[__ouch retain] autorelease]; |
---|
2107 | } |
---|
2108 | |
---|
2109 | - (void) setOuch: (ThriftIOException *) ouch { |
---|
2110 | [ouch retain]; |
---|
2111 | [__ouch release]; |
---|
2112 | __ouch = ouch; |
---|
2113 | __ouch_isset = YES; |
---|
2114 | } |
---|
2115 | |
---|
2116 | - (BOOL) ouchIsSet { |
---|
2117 | return __ouch_isset; |
---|
2118 | } |
---|
2119 | |
---|
2120 | - (void) unsetOuch { |
---|
2121 | [__ouch release]; |
---|
2122 | __ouch = nil; |
---|
2123 | __ouch_isset = NO; |
---|
2124 | } |
---|
2125 | |
---|
2126 | - (void) read: (id <TProtocol>) inProtocol |
---|
2127 | { |
---|
2128 | NSString * fieldName; |
---|
2129 | int fieldType; |
---|
2130 | int fieldID; |
---|
2131 | |
---|
2132 | [inProtocol readStructBeginReturningName: NULL]; |
---|
2133 | while (true) |
---|
2134 | { |
---|
2135 | [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; |
---|
2136 | if (fieldType == TType_STOP) { |
---|
2137 | break; |
---|
2138 | } |
---|
2139 | switch (fieldID) |
---|
2140 | { |
---|
2141 | case 0: |
---|
2142 | if (fieldType == TType_BOOL) { |
---|
2143 | BOOL fieldValue = [inProtocol readBool]; |
---|
2144 | [self setSuccess: fieldValue]; |
---|
2145 | } else { |
---|
2146 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
2147 | } |
---|
2148 | break; |
---|
2149 | case 1: |
---|
2150 | if (fieldType == TType_STRUCT) { |
---|
2151 | ThriftIOException *fieldValue = [[ThriftIOException alloc] init]; |
---|
2152 | [fieldValue read: inProtocol]; |
---|
2153 | [self setOuch: fieldValue]; |
---|
2154 | [fieldValue release]; |
---|
2155 | } else { |
---|
2156 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
2157 | } |
---|
2158 | break; |
---|
2159 | default: |
---|
2160 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
2161 | break; |
---|
2162 | } |
---|
2163 | [inProtocol readFieldEnd]; |
---|
2164 | } |
---|
2165 | [inProtocol readStructEnd]; |
---|
2166 | } |
---|
2167 | |
---|
2168 | - (void) write: (id <TProtocol>) outProtocol { |
---|
2169 | [outProtocol writeStructBeginWithName: @"CloseResult_"]; |
---|
2170 | |
---|
2171 | if (__success_isset) { |
---|
2172 | [outProtocol writeFieldBeginWithName: @"success" type: TType_BOOL fieldID: 0]; |
---|
2173 | [outProtocol writeBool: __success]; |
---|
2174 | [outProtocol writeFieldEnd]; |
---|
2175 | } else if (__ouch_isset) { |
---|
2176 | if (__ouch != nil) { |
---|
2177 | [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1]; |
---|
2178 | [__ouch write: outProtocol]; |
---|
2179 | [outProtocol writeFieldEnd]; |
---|
2180 | } |
---|
2181 | } |
---|
2182 | [outProtocol writeFieldStop]; |
---|
2183 | [outProtocol writeStructEnd]; |
---|
2184 | } |
---|
2185 | |
---|
2186 | - (NSString *) description { |
---|
2187 | NSMutableString * ms = [NSMutableString stringWithString: @"CloseResult_("]; |
---|
2188 | [ms appendString: @"success:"]; |
---|
2189 | [ms appendFormat: @"%i", __success]; |
---|
2190 | [ms appendString: @",ouch:"]; |
---|
2191 | [ms appendFormat: @"%@", __ouch]; |
---|
2192 | [ms appendString: @")"]; |
---|
2193 | return [ms copy]; |
---|
2194 | } |
---|
2195 | |
---|
2196 | @end |
---|
2197 | |
---|
2198 | @interface RmResult_ : NSObject { |
---|
2199 | BOOL __success; |
---|
2200 | ThriftIOException * __ouch; |
---|
2201 | |
---|
2202 | BOOL __success_isset; |
---|
2203 | BOOL __ouch_isset; |
---|
2204 | } |
---|
2205 | |
---|
2206 | - (id) initWithSuccess: (BOOL) success ouch: (ThriftIOException *) ouch; |
---|
2207 | |
---|
2208 | - (void) read: (id <TProtocol>) inProtocol; |
---|
2209 | - (void) write: (id <TProtocol>) outProtocol; |
---|
2210 | |
---|
2211 | - (BOOL) success; |
---|
2212 | - (void) setSuccess: (BOOL) success; |
---|
2213 | - (BOOL) successIsSet; |
---|
2214 | |
---|
2215 | - (ThriftIOException *) ouch; |
---|
2216 | - (void) setOuch: (ThriftIOException *) ouch; |
---|
2217 | - (BOOL) ouchIsSet; |
---|
2218 | |
---|
2219 | @end |
---|
2220 | |
---|
2221 | @implementation RmResult_ |
---|
2222 | - (id) initWithSuccess: (BOOL) success ouch: (ThriftIOException *) ouch |
---|
2223 | { |
---|
2224 | self = [super init]; |
---|
2225 | __success = success; |
---|
2226 | __success_isset = YES; |
---|
2227 | __ouch = [ouch retain]; |
---|
2228 | __ouch_isset = YES; |
---|
2229 | return self; |
---|
2230 | } |
---|
2231 | |
---|
2232 | - (void) dealloc |
---|
2233 | { |
---|
2234 | [__ouch release]; |
---|
2235 | [super dealloc]; |
---|
2236 | } |
---|
2237 | |
---|
2238 | - (BOOL) success { |
---|
2239 | return __success; |
---|
2240 | } |
---|
2241 | |
---|
2242 | - (void) setSuccess: (BOOL) success { |
---|
2243 | __success = success; |
---|
2244 | __success_isset = YES; |
---|
2245 | } |
---|
2246 | |
---|
2247 | - (BOOL) successIsSet { |
---|
2248 | return __success_isset; |
---|
2249 | } |
---|
2250 | |
---|
2251 | - (void) unsetSuccess { |
---|
2252 | __success_isset = NO; |
---|
2253 | } |
---|
2254 | |
---|
2255 | - (ThriftIOException *) ouch { |
---|
2256 | return [[__ouch retain] autorelease]; |
---|
2257 | } |
---|
2258 | |
---|
2259 | - (void) setOuch: (ThriftIOException *) ouch { |
---|
2260 | [ouch retain]; |
---|
2261 | [__ouch release]; |
---|
2262 | __ouch = ouch; |
---|
2263 | __ouch_isset = YES; |
---|
2264 | } |
---|
2265 | |
---|
2266 | - (BOOL) ouchIsSet { |
---|
2267 | return __ouch_isset; |
---|
2268 | } |
---|
2269 | |
---|
2270 | - (void) unsetOuch { |
---|
2271 | [__ouch release]; |
---|
2272 | __ouch = nil; |
---|
2273 | __ouch_isset = NO; |
---|
2274 | } |
---|
2275 | |
---|
2276 | - (void) read: (id <TProtocol>) inProtocol |
---|
2277 | { |
---|
2278 | NSString * fieldName; |
---|
2279 | int fieldType; |
---|
2280 | int fieldID; |
---|
2281 | |
---|
2282 | [inProtocol readStructBeginReturningName: NULL]; |
---|
2283 | while (true) |
---|
2284 | { |
---|
2285 | [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; |
---|
2286 | if (fieldType == TType_STOP) { |
---|
2287 | break; |
---|
2288 | } |
---|
2289 | switch (fieldID) |
---|
2290 | { |
---|
2291 | case 0: |
---|
2292 | if (fieldType == TType_BOOL) { |
---|
2293 | BOOL fieldValue = [inProtocol readBool]; |
---|
2294 | [self setSuccess: fieldValue]; |
---|
2295 | } else { |
---|
2296 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
2297 | } |
---|
2298 | break; |
---|
2299 | case 1: |
---|
2300 | if (fieldType == TType_STRUCT) { |
---|
2301 | ThriftIOException *fieldValue = [[ThriftIOException alloc] init]; |
---|
2302 | [fieldValue read: inProtocol]; |
---|
2303 | [self setOuch: fieldValue]; |
---|
2304 | [fieldValue release]; |
---|
2305 | } else { |
---|
2306 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
2307 | } |
---|
2308 | break; |
---|
2309 | default: |
---|
2310 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
2311 | break; |
---|
2312 | } |
---|
2313 | [inProtocol readFieldEnd]; |
---|
2314 | } |
---|
2315 | [inProtocol readStructEnd]; |
---|
2316 | } |
---|
2317 | |
---|
2318 | - (void) write: (id <TProtocol>) outProtocol { |
---|
2319 | [outProtocol writeStructBeginWithName: @"RmResult_"]; |
---|
2320 | |
---|
2321 | if (__success_isset) { |
---|
2322 | [outProtocol writeFieldBeginWithName: @"success" type: TType_BOOL fieldID: 0]; |
---|
2323 | [outProtocol writeBool: __success]; |
---|
2324 | [outProtocol writeFieldEnd]; |
---|
2325 | } else if (__ouch_isset) { |
---|
2326 | if (__ouch != nil) { |
---|
2327 | [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1]; |
---|
2328 | [__ouch write: outProtocol]; |
---|
2329 | [outProtocol writeFieldEnd]; |
---|
2330 | } |
---|
2331 | } |
---|
2332 | [outProtocol writeFieldStop]; |
---|
2333 | [outProtocol writeStructEnd]; |
---|
2334 | } |
---|
2335 | |
---|
2336 | - (NSString *) description { |
---|
2337 | NSMutableString * ms = [NSMutableString stringWithString: @"RmResult_("]; |
---|
2338 | [ms appendString: @"success:"]; |
---|
2339 | [ms appendFormat: @"%i", __success]; |
---|
2340 | [ms appendString: @",ouch:"]; |
---|
2341 | [ms appendFormat: @"%@", __ouch]; |
---|
2342 | [ms appendString: @")"]; |
---|
2343 | return [ms copy]; |
---|
2344 | } |
---|
2345 | |
---|
2346 | @end |
---|
2347 | |
---|
2348 | @interface RenameResult_ : NSObject { |
---|
2349 | BOOL __success; |
---|
2350 | ThriftIOException * __ouch; |
---|
2351 | |
---|
2352 | BOOL __success_isset; |
---|
2353 | BOOL __ouch_isset; |
---|
2354 | } |
---|
2355 | |
---|
2356 | - (id) initWithSuccess: (BOOL) success ouch: (ThriftIOException *) ouch; |
---|
2357 | |
---|
2358 | - (void) read: (id <TProtocol>) inProtocol; |
---|
2359 | - (void) write: (id <TProtocol>) outProtocol; |
---|
2360 | |
---|
2361 | - (BOOL) success; |
---|
2362 | - (void) setSuccess: (BOOL) success; |
---|
2363 | - (BOOL) successIsSet; |
---|
2364 | |
---|
2365 | - (ThriftIOException *) ouch; |
---|
2366 | - (void) setOuch: (ThriftIOException *) ouch; |
---|
2367 | - (BOOL) ouchIsSet; |
---|
2368 | |
---|
2369 | @end |
---|
2370 | |
---|
2371 | @implementation RenameResult_ |
---|
2372 | - (id) initWithSuccess: (BOOL) success ouch: (ThriftIOException *) ouch |
---|
2373 | { |
---|
2374 | self = [super init]; |
---|
2375 | __success = success; |
---|
2376 | __success_isset = YES; |
---|
2377 | __ouch = [ouch retain]; |
---|
2378 | __ouch_isset = YES; |
---|
2379 | return self; |
---|
2380 | } |
---|
2381 | |
---|
2382 | - (void) dealloc |
---|
2383 | { |
---|
2384 | [__ouch release]; |
---|
2385 | [super dealloc]; |
---|
2386 | } |
---|
2387 | |
---|
2388 | - (BOOL) success { |
---|
2389 | return __success; |
---|
2390 | } |
---|
2391 | |
---|
2392 | - (void) setSuccess: (BOOL) success { |
---|
2393 | __success = success; |
---|
2394 | __success_isset = YES; |
---|
2395 | } |
---|
2396 | |
---|
2397 | - (BOOL) successIsSet { |
---|
2398 | return __success_isset; |
---|
2399 | } |
---|
2400 | |
---|
2401 | - (void) unsetSuccess { |
---|
2402 | __success_isset = NO; |
---|
2403 | } |
---|
2404 | |
---|
2405 | - (ThriftIOException *) ouch { |
---|
2406 | return [[__ouch retain] autorelease]; |
---|
2407 | } |
---|
2408 | |
---|
2409 | - (void) setOuch: (ThriftIOException *) ouch { |
---|
2410 | [ouch retain]; |
---|
2411 | [__ouch release]; |
---|
2412 | __ouch = ouch; |
---|
2413 | __ouch_isset = YES; |
---|
2414 | } |
---|
2415 | |
---|
2416 | - (BOOL) ouchIsSet { |
---|
2417 | return __ouch_isset; |
---|
2418 | } |
---|
2419 | |
---|
2420 | - (void) unsetOuch { |
---|
2421 | [__ouch release]; |
---|
2422 | __ouch = nil; |
---|
2423 | __ouch_isset = NO; |
---|
2424 | } |
---|
2425 | |
---|
2426 | - (void) read: (id <TProtocol>) inProtocol |
---|
2427 | { |
---|
2428 | NSString * fieldName; |
---|
2429 | int fieldType; |
---|
2430 | int fieldID; |
---|
2431 | |
---|
2432 | [inProtocol readStructBeginReturningName: NULL]; |
---|
2433 | while (true) |
---|
2434 | { |
---|
2435 | [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; |
---|
2436 | if (fieldType == TType_STOP) { |
---|
2437 | break; |
---|
2438 | } |
---|
2439 | switch (fieldID) |
---|
2440 | { |
---|
2441 | case 0: |
---|
2442 | if (fieldType == TType_BOOL) { |
---|
2443 | BOOL fieldValue = [inProtocol readBool]; |
---|
2444 | [self setSuccess: fieldValue]; |
---|
2445 | } else { |
---|
2446 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
2447 | } |
---|
2448 | break; |
---|
2449 | case 1: |
---|
2450 | if (fieldType == TType_STRUCT) { |
---|
2451 | ThriftIOException *fieldValue = [[ThriftIOException alloc] init]; |
---|
2452 | [fieldValue read: inProtocol]; |
---|
2453 | [self setOuch: fieldValue]; |
---|
2454 | [fieldValue release]; |
---|
2455 | } else { |
---|
2456 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
2457 | } |
---|
2458 | break; |
---|
2459 | default: |
---|
2460 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
2461 | break; |
---|
2462 | } |
---|
2463 | [inProtocol readFieldEnd]; |
---|
2464 | } |
---|
2465 | [inProtocol readStructEnd]; |
---|
2466 | } |
---|
2467 | |
---|
2468 | - (void) write: (id <TProtocol>) outProtocol { |
---|
2469 | [outProtocol writeStructBeginWithName: @"RenameResult_"]; |
---|
2470 | |
---|
2471 | if (__success_isset) { |
---|
2472 | [outProtocol writeFieldBeginWithName: @"success" type: TType_BOOL fieldID: 0]; |
---|
2473 | [outProtocol writeBool: __success]; |
---|
2474 | [outProtocol writeFieldEnd]; |
---|
2475 | } else if (__ouch_isset) { |
---|
2476 | if (__ouch != nil) { |
---|
2477 | [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1]; |
---|
2478 | [__ouch write: outProtocol]; |
---|
2479 | [outProtocol writeFieldEnd]; |
---|
2480 | } |
---|
2481 | } |
---|
2482 | [outProtocol writeFieldStop]; |
---|
2483 | [outProtocol writeStructEnd]; |
---|
2484 | } |
---|
2485 | |
---|
2486 | - (NSString *) description { |
---|
2487 | NSMutableString * ms = [NSMutableString stringWithString: @"RenameResult_("]; |
---|
2488 | [ms appendString: @"success:"]; |
---|
2489 | [ms appendFormat: @"%i", __success]; |
---|
2490 | [ms appendString: @",ouch:"]; |
---|
2491 | [ms appendFormat: @"%@", __ouch]; |
---|
2492 | [ms appendString: @")"]; |
---|
2493 | return [ms copy]; |
---|
2494 | } |
---|
2495 | |
---|
2496 | @end |
---|
2497 | |
---|
2498 | @interface MkdirsResult_ : NSObject { |
---|
2499 | BOOL __success; |
---|
2500 | ThriftIOException * __ouch; |
---|
2501 | |
---|
2502 | BOOL __success_isset; |
---|
2503 | BOOL __ouch_isset; |
---|
2504 | } |
---|
2505 | |
---|
2506 | - (id) initWithSuccess: (BOOL) success ouch: (ThriftIOException *) ouch; |
---|
2507 | |
---|
2508 | - (void) read: (id <TProtocol>) inProtocol; |
---|
2509 | - (void) write: (id <TProtocol>) outProtocol; |
---|
2510 | |
---|
2511 | - (BOOL) success; |
---|
2512 | - (void) setSuccess: (BOOL) success; |
---|
2513 | - (BOOL) successIsSet; |
---|
2514 | |
---|
2515 | - (ThriftIOException *) ouch; |
---|
2516 | - (void) setOuch: (ThriftIOException *) ouch; |
---|
2517 | - (BOOL) ouchIsSet; |
---|
2518 | |
---|
2519 | @end |
---|
2520 | |
---|
2521 | @implementation MkdirsResult_ |
---|
2522 | - (id) initWithSuccess: (BOOL) success ouch: (ThriftIOException *) ouch |
---|
2523 | { |
---|
2524 | self = [super init]; |
---|
2525 | __success = success; |
---|
2526 | __success_isset = YES; |
---|
2527 | __ouch = [ouch retain]; |
---|
2528 | __ouch_isset = YES; |
---|
2529 | return self; |
---|
2530 | } |
---|
2531 | |
---|
2532 | - (void) dealloc |
---|
2533 | { |
---|
2534 | [__ouch release]; |
---|
2535 | [super dealloc]; |
---|
2536 | } |
---|
2537 | |
---|
2538 | - (BOOL) success { |
---|
2539 | return __success; |
---|
2540 | } |
---|
2541 | |
---|
2542 | - (void) setSuccess: (BOOL) success { |
---|
2543 | __success = success; |
---|
2544 | __success_isset = YES; |
---|
2545 | } |
---|
2546 | |
---|
2547 | - (BOOL) successIsSet { |
---|
2548 | return __success_isset; |
---|
2549 | } |
---|
2550 | |
---|
2551 | - (void) unsetSuccess { |
---|
2552 | __success_isset = NO; |
---|
2553 | } |
---|
2554 | |
---|
2555 | - (ThriftIOException *) ouch { |
---|
2556 | return [[__ouch retain] autorelease]; |
---|
2557 | } |
---|
2558 | |
---|
2559 | - (void) setOuch: (ThriftIOException *) ouch { |
---|
2560 | [ouch retain]; |
---|
2561 | [__ouch release]; |
---|
2562 | __ouch = ouch; |
---|
2563 | __ouch_isset = YES; |
---|
2564 | } |
---|
2565 | |
---|
2566 | - (BOOL) ouchIsSet { |
---|
2567 | return __ouch_isset; |
---|
2568 | } |
---|
2569 | |
---|
2570 | - (void) unsetOuch { |
---|
2571 | [__ouch release]; |
---|
2572 | __ouch = nil; |
---|
2573 | __ouch_isset = NO; |
---|
2574 | } |
---|
2575 | |
---|
2576 | - (void) read: (id <TProtocol>) inProtocol |
---|
2577 | { |
---|
2578 | NSString * fieldName; |
---|
2579 | int fieldType; |
---|
2580 | int fieldID; |
---|
2581 | |
---|
2582 | [inProtocol readStructBeginReturningName: NULL]; |
---|
2583 | while (true) |
---|
2584 | { |
---|
2585 | [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; |
---|
2586 | if (fieldType == TType_STOP) { |
---|
2587 | break; |
---|
2588 | } |
---|
2589 | switch (fieldID) |
---|
2590 | { |
---|
2591 | case 0: |
---|
2592 | if (fieldType == TType_BOOL) { |
---|
2593 | BOOL fieldValue = [inProtocol readBool]; |
---|
2594 | [self setSuccess: fieldValue]; |
---|
2595 | } else { |
---|
2596 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
2597 | } |
---|
2598 | break; |
---|
2599 | case 1: |
---|
2600 | if (fieldType == TType_STRUCT) { |
---|
2601 | ThriftIOException *fieldValue = [[ThriftIOException alloc] init]; |
---|
2602 | [fieldValue read: inProtocol]; |
---|
2603 | [self setOuch: fieldValue]; |
---|
2604 | [fieldValue release]; |
---|
2605 | } else { |
---|
2606 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
2607 | } |
---|
2608 | break; |
---|
2609 | default: |
---|
2610 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
2611 | break; |
---|
2612 | } |
---|
2613 | [inProtocol readFieldEnd]; |
---|
2614 | } |
---|
2615 | [inProtocol readStructEnd]; |
---|
2616 | } |
---|
2617 | |
---|
2618 | - (void) write: (id <TProtocol>) outProtocol { |
---|
2619 | [outProtocol writeStructBeginWithName: @"MkdirsResult_"]; |
---|
2620 | |
---|
2621 | if (__success_isset) { |
---|
2622 | [outProtocol writeFieldBeginWithName: @"success" type: TType_BOOL fieldID: 0]; |
---|
2623 | [outProtocol writeBool: __success]; |
---|
2624 | [outProtocol writeFieldEnd]; |
---|
2625 | } else if (__ouch_isset) { |
---|
2626 | if (__ouch != nil) { |
---|
2627 | [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1]; |
---|
2628 | [__ouch write: outProtocol]; |
---|
2629 | [outProtocol writeFieldEnd]; |
---|
2630 | } |
---|
2631 | } |
---|
2632 | [outProtocol writeFieldStop]; |
---|
2633 | [outProtocol writeStructEnd]; |
---|
2634 | } |
---|
2635 | |
---|
2636 | - (NSString *) description { |
---|
2637 | NSMutableString * ms = [NSMutableString stringWithString: @"MkdirsResult_("]; |
---|
2638 | [ms appendString: @"success:"]; |
---|
2639 | [ms appendFormat: @"%i", __success]; |
---|
2640 | [ms appendString: @",ouch:"]; |
---|
2641 | [ms appendFormat: @"%@", __ouch]; |
---|
2642 | [ms appendString: @")"]; |
---|
2643 | return [ms copy]; |
---|
2644 | } |
---|
2645 | |
---|
2646 | @end |
---|
2647 | |
---|
2648 | @interface ExistsResult_ : NSObject { |
---|
2649 | BOOL __success; |
---|
2650 | ThriftIOException * __ouch; |
---|
2651 | |
---|
2652 | BOOL __success_isset; |
---|
2653 | BOOL __ouch_isset; |
---|
2654 | } |
---|
2655 | |
---|
2656 | - (id) initWithSuccess: (BOOL) success ouch: (ThriftIOException *) ouch; |
---|
2657 | |
---|
2658 | - (void) read: (id <TProtocol>) inProtocol; |
---|
2659 | - (void) write: (id <TProtocol>) outProtocol; |
---|
2660 | |
---|
2661 | - (BOOL) success; |
---|
2662 | - (void) setSuccess: (BOOL) success; |
---|
2663 | - (BOOL) successIsSet; |
---|
2664 | |
---|
2665 | - (ThriftIOException *) ouch; |
---|
2666 | - (void) setOuch: (ThriftIOException *) ouch; |
---|
2667 | - (BOOL) ouchIsSet; |
---|
2668 | |
---|
2669 | @end |
---|
2670 | |
---|
2671 | @implementation ExistsResult_ |
---|
2672 | - (id) initWithSuccess: (BOOL) success ouch: (ThriftIOException *) ouch |
---|
2673 | { |
---|
2674 | self = [super init]; |
---|
2675 | __success = success; |
---|
2676 | __success_isset = YES; |
---|
2677 | __ouch = [ouch retain]; |
---|
2678 | __ouch_isset = YES; |
---|
2679 | return self; |
---|
2680 | } |
---|
2681 | |
---|
2682 | - (void) dealloc |
---|
2683 | { |
---|
2684 | [__ouch release]; |
---|
2685 | [super dealloc]; |
---|
2686 | } |
---|
2687 | |
---|
2688 | - (BOOL) success { |
---|
2689 | return __success; |
---|
2690 | } |
---|
2691 | |
---|
2692 | - (void) setSuccess: (BOOL) success { |
---|
2693 | __success = success; |
---|
2694 | __success_isset = YES; |
---|
2695 | } |
---|
2696 | |
---|
2697 | - (BOOL) successIsSet { |
---|
2698 | return __success_isset; |
---|
2699 | } |
---|
2700 | |
---|
2701 | - (void) unsetSuccess { |
---|
2702 | __success_isset = NO; |
---|
2703 | } |
---|
2704 | |
---|
2705 | - (ThriftIOException *) ouch { |
---|
2706 | return [[__ouch retain] autorelease]; |
---|
2707 | } |
---|
2708 | |
---|
2709 | - (void) setOuch: (ThriftIOException *) ouch { |
---|
2710 | [ouch retain]; |
---|
2711 | [__ouch release]; |
---|
2712 | __ouch = ouch; |
---|
2713 | __ouch_isset = YES; |
---|
2714 | } |
---|
2715 | |
---|
2716 | - (BOOL) ouchIsSet { |
---|
2717 | return __ouch_isset; |
---|
2718 | } |
---|
2719 | |
---|
2720 | - (void) unsetOuch { |
---|
2721 | [__ouch release]; |
---|
2722 | __ouch = nil; |
---|
2723 | __ouch_isset = NO; |
---|
2724 | } |
---|
2725 | |
---|
2726 | - (void) read: (id <TProtocol>) inProtocol |
---|
2727 | { |
---|
2728 | NSString * fieldName; |
---|
2729 | int fieldType; |
---|
2730 | int fieldID; |
---|
2731 | |
---|
2732 | [inProtocol readStructBeginReturningName: NULL]; |
---|
2733 | while (true) |
---|
2734 | { |
---|
2735 | [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; |
---|
2736 | if (fieldType == TType_STOP) { |
---|
2737 | break; |
---|
2738 | } |
---|
2739 | switch (fieldID) |
---|
2740 | { |
---|
2741 | case 0: |
---|
2742 | if (fieldType == TType_BOOL) { |
---|
2743 | BOOL fieldValue = [inProtocol readBool]; |
---|
2744 | [self setSuccess: fieldValue]; |
---|
2745 | } else { |
---|
2746 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
2747 | } |
---|
2748 | break; |
---|
2749 | case 1: |
---|
2750 | if (fieldType == TType_STRUCT) { |
---|
2751 | ThriftIOException *fieldValue = [[ThriftIOException alloc] init]; |
---|
2752 | [fieldValue read: inProtocol]; |
---|
2753 | [self setOuch: fieldValue]; |
---|
2754 | [fieldValue release]; |
---|
2755 | } else { |
---|
2756 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
2757 | } |
---|
2758 | break; |
---|
2759 | default: |
---|
2760 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
2761 | break; |
---|
2762 | } |
---|
2763 | [inProtocol readFieldEnd]; |
---|
2764 | } |
---|
2765 | [inProtocol readStructEnd]; |
---|
2766 | } |
---|
2767 | |
---|
2768 | - (void) write: (id <TProtocol>) outProtocol { |
---|
2769 | [outProtocol writeStructBeginWithName: @"ExistsResult_"]; |
---|
2770 | |
---|
2771 | if (__success_isset) { |
---|
2772 | [outProtocol writeFieldBeginWithName: @"success" type: TType_BOOL fieldID: 0]; |
---|
2773 | [outProtocol writeBool: __success]; |
---|
2774 | [outProtocol writeFieldEnd]; |
---|
2775 | } else if (__ouch_isset) { |
---|
2776 | if (__ouch != nil) { |
---|
2777 | [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1]; |
---|
2778 | [__ouch write: outProtocol]; |
---|
2779 | [outProtocol writeFieldEnd]; |
---|
2780 | } |
---|
2781 | } |
---|
2782 | [outProtocol writeFieldStop]; |
---|
2783 | [outProtocol writeStructEnd]; |
---|
2784 | } |
---|
2785 | |
---|
2786 | - (NSString *) description { |
---|
2787 | NSMutableString * ms = [NSMutableString stringWithString: @"ExistsResult_("]; |
---|
2788 | [ms appendString: @"success:"]; |
---|
2789 | [ms appendFormat: @"%i", __success]; |
---|
2790 | [ms appendString: @",ouch:"]; |
---|
2791 | [ms appendFormat: @"%@", __ouch]; |
---|
2792 | [ms appendString: @")"]; |
---|
2793 | return [ms copy]; |
---|
2794 | } |
---|
2795 | |
---|
2796 | @end |
---|
2797 | |
---|
2798 | @interface StatResult_ : NSObject { |
---|
2799 | FileStatus * __success; |
---|
2800 | ThriftIOException * __ouch; |
---|
2801 | |
---|
2802 | BOOL __success_isset; |
---|
2803 | BOOL __ouch_isset; |
---|
2804 | } |
---|
2805 | |
---|
2806 | - (id) initWithSuccess: (FileStatus *) success ouch: (ThriftIOException *) ouch; |
---|
2807 | |
---|
2808 | - (void) read: (id <TProtocol>) inProtocol; |
---|
2809 | - (void) write: (id <TProtocol>) outProtocol; |
---|
2810 | |
---|
2811 | - (FileStatus *) success; |
---|
2812 | - (void) setSuccess: (FileStatus *) success; |
---|
2813 | - (BOOL) successIsSet; |
---|
2814 | |
---|
2815 | - (ThriftIOException *) ouch; |
---|
2816 | - (void) setOuch: (ThriftIOException *) ouch; |
---|
2817 | - (BOOL) ouchIsSet; |
---|
2818 | |
---|
2819 | @end |
---|
2820 | |
---|
2821 | @implementation StatResult_ |
---|
2822 | - (id) initWithSuccess: (FileStatus *) success ouch: (ThriftIOException *) ouch |
---|
2823 | { |
---|
2824 | self = [super init]; |
---|
2825 | __success = [success retain]; |
---|
2826 | __success_isset = YES; |
---|
2827 | __ouch = [ouch retain]; |
---|
2828 | __ouch_isset = YES; |
---|
2829 | return self; |
---|
2830 | } |
---|
2831 | |
---|
2832 | - (void) dealloc |
---|
2833 | { |
---|
2834 | [__success release]; |
---|
2835 | [__ouch release]; |
---|
2836 | [super dealloc]; |
---|
2837 | } |
---|
2838 | |
---|
2839 | - (FileStatus *) success { |
---|
2840 | return [[__success retain] autorelease]; |
---|
2841 | } |
---|
2842 | |
---|
2843 | - (void) setSuccess: (FileStatus *) success { |
---|
2844 | [success retain]; |
---|
2845 | [__success release]; |
---|
2846 | __success = success; |
---|
2847 | __success_isset = YES; |
---|
2848 | } |
---|
2849 | |
---|
2850 | - (BOOL) successIsSet { |
---|
2851 | return __success_isset; |
---|
2852 | } |
---|
2853 | |
---|
2854 | - (void) unsetSuccess { |
---|
2855 | [__success release]; |
---|
2856 | __success = nil; |
---|
2857 | __success_isset = NO; |
---|
2858 | } |
---|
2859 | |
---|
2860 | - (ThriftIOException *) ouch { |
---|
2861 | return [[__ouch retain] autorelease]; |
---|
2862 | } |
---|
2863 | |
---|
2864 | - (void) setOuch: (ThriftIOException *) ouch { |
---|
2865 | [ouch retain]; |
---|
2866 | [__ouch release]; |
---|
2867 | __ouch = ouch; |
---|
2868 | __ouch_isset = YES; |
---|
2869 | } |
---|
2870 | |
---|
2871 | - (BOOL) ouchIsSet { |
---|
2872 | return __ouch_isset; |
---|
2873 | } |
---|
2874 | |
---|
2875 | - (void) unsetOuch { |
---|
2876 | [__ouch release]; |
---|
2877 | __ouch = nil; |
---|
2878 | __ouch_isset = NO; |
---|
2879 | } |
---|
2880 | |
---|
2881 | - (void) read: (id <TProtocol>) inProtocol |
---|
2882 | { |
---|
2883 | NSString * fieldName; |
---|
2884 | int fieldType; |
---|
2885 | int fieldID; |
---|
2886 | |
---|
2887 | [inProtocol readStructBeginReturningName: NULL]; |
---|
2888 | while (true) |
---|
2889 | { |
---|
2890 | [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; |
---|
2891 | if (fieldType == TType_STOP) { |
---|
2892 | break; |
---|
2893 | } |
---|
2894 | switch (fieldID) |
---|
2895 | { |
---|
2896 | case 0: |
---|
2897 | if (fieldType == TType_STRUCT) { |
---|
2898 | FileStatus *fieldValue = [[FileStatus alloc] init]; |
---|
2899 | [fieldValue read: inProtocol]; |
---|
2900 | [self setSuccess: fieldValue]; |
---|
2901 | [fieldValue release]; |
---|
2902 | } else { |
---|
2903 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
2904 | } |
---|
2905 | break; |
---|
2906 | case 1: |
---|
2907 | if (fieldType == TType_STRUCT) { |
---|
2908 | ThriftIOException *fieldValue = [[ThriftIOException alloc] init]; |
---|
2909 | [fieldValue read: inProtocol]; |
---|
2910 | [self setOuch: fieldValue]; |
---|
2911 | [fieldValue release]; |
---|
2912 | } else { |
---|
2913 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
2914 | } |
---|
2915 | break; |
---|
2916 | default: |
---|
2917 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
2918 | break; |
---|
2919 | } |
---|
2920 | [inProtocol readFieldEnd]; |
---|
2921 | } |
---|
2922 | [inProtocol readStructEnd]; |
---|
2923 | } |
---|
2924 | |
---|
2925 | - (void) write: (id <TProtocol>) outProtocol { |
---|
2926 | [outProtocol writeStructBeginWithName: @"StatResult_"]; |
---|
2927 | |
---|
2928 | if (__success_isset) { |
---|
2929 | if (__success != nil) { |
---|
2930 | [outProtocol writeFieldBeginWithName: @"success" type: TType_STRUCT fieldID: 0]; |
---|
2931 | [__success write: outProtocol]; |
---|
2932 | [outProtocol writeFieldEnd]; |
---|
2933 | } |
---|
2934 | } else if (__ouch_isset) { |
---|
2935 | if (__ouch != nil) { |
---|
2936 | [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1]; |
---|
2937 | [__ouch write: outProtocol]; |
---|
2938 | [outProtocol writeFieldEnd]; |
---|
2939 | } |
---|
2940 | } |
---|
2941 | [outProtocol writeFieldStop]; |
---|
2942 | [outProtocol writeStructEnd]; |
---|
2943 | } |
---|
2944 | |
---|
2945 | - (NSString *) description { |
---|
2946 | NSMutableString * ms = [NSMutableString stringWithString: @"StatResult_("]; |
---|
2947 | [ms appendString: @"success:"]; |
---|
2948 | [ms appendFormat: @"%@", __success]; |
---|
2949 | [ms appendString: @",ouch:"]; |
---|
2950 | [ms appendFormat: @"%@", __ouch]; |
---|
2951 | [ms appendString: @")"]; |
---|
2952 | return [ms copy]; |
---|
2953 | } |
---|
2954 | |
---|
2955 | @end |
---|
2956 | |
---|
2957 | @interface ListStatusResult_ : NSObject { |
---|
2958 | NSArray * __success; |
---|
2959 | ThriftIOException * __ouch; |
---|
2960 | |
---|
2961 | BOOL __success_isset; |
---|
2962 | BOOL __ouch_isset; |
---|
2963 | } |
---|
2964 | |
---|
2965 | - (id) initWithSuccess: (NSArray *) success ouch: (ThriftIOException *) ouch; |
---|
2966 | |
---|
2967 | - (void) read: (id <TProtocol>) inProtocol; |
---|
2968 | - (void) write: (id <TProtocol>) outProtocol; |
---|
2969 | |
---|
2970 | - (NSArray *) success; |
---|
2971 | - (void) setSuccess: (NSArray *) success; |
---|
2972 | - (BOOL) successIsSet; |
---|
2973 | |
---|
2974 | - (ThriftIOException *) ouch; |
---|
2975 | - (void) setOuch: (ThriftIOException *) ouch; |
---|
2976 | - (BOOL) ouchIsSet; |
---|
2977 | |
---|
2978 | @end |
---|
2979 | |
---|
2980 | @implementation ListStatusResult_ |
---|
2981 | - (id) initWithSuccess: (NSArray *) success ouch: (ThriftIOException *) ouch |
---|
2982 | { |
---|
2983 | self = [super init]; |
---|
2984 | __success = [success retain]; |
---|
2985 | __success_isset = YES; |
---|
2986 | __ouch = [ouch retain]; |
---|
2987 | __ouch_isset = YES; |
---|
2988 | return self; |
---|
2989 | } |
---|
2990 | |
---|
2991 | - (void) dealloc |
---|
2992 | { |
---|
2993 | [__success release]; |
---|
2994 | [__ouch release]; |
---|
2995 | [super dealloc]; |
---|
2996 | } |
---|
2997 | |
---|
2998 | - (NSArray *) success { |
---|
2999 | return [[__success retain] autorelease]; |
---|
3000 | } |
---|
3001 | |
---|
3002 | - (void) setSuccess: (NSArray *) success { |
---|
3003 | [success retain]; |
---|
3004 | [__success release]; |
---|
3005 | __success = success; |
---|
3006 | __success_isset = YES; |
---|
3007 | } |
---|
3008 | |
---|
3009 | - (BOOL) successIsSet { |
---|
3010 | return __success_isset; |
---|
3011 | } |
---|
3012 | |
---|
3013 | - (void) unsetSuccess { |
---|
3014 | [__success release]; |
---|
3015 | __success = nil; |
---|
3016 | __success_isset = NO; |
---|
3017 | } |
---|
3018 | |
---|
3019 | - (ThriftIOException *) ouch { |
---|
3020 | return [[__ouch retain] autorelease]; |
---|
3021 | } |
---|
3022 | |
---|
3023 | - (void) setOuch: (ThriftIOException *) ouch { |
---|
3024 | [ouch retain]; |
---|
3025 | [__ouch release]; |
---|
3026 | __ouch = ouch; |
---|
3027 | __ouch_isset = YES; |
---|
3028 | } |
---|
3029 | |
---|
3030 | - (BOOL) ouchIsSet { |
---|
3031 | return __ouch_isset; |
---|
3032 | } |
---|
3033 | |
---|
3034 | - (void) unsetOuch { |
---|
3035 | [__ouch release]; |
---|
3036 | __ouch = nil; |
---|
3037 | __ouch_isset = NO; |
---|
3038 | } |
---|
3039 | |
---|
3040 | - (void) read: (id <TProtocol>) inProtocol |
---|
3041 | { |
---|
3042 | NSString * fieldName; |
---|
3043 | int fieldType; |
---|
3044 | int fieldID; |
---|
3045 | |
---|
3046 | [inProtocol readStructBeginReturningName: NULL]; |
---|
3047 | while (true) |
---|
3048 | { |
---|
3049 | [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; |
---|
3050 | if (fieldType == TType_STOP) { |
---|
3051 | break; |
---|
3052 | } |
---|
3053 | switch (fieldID) |
---|
3054 | { |
---|
3055 | case 0: |
---|
3056 | if (fieldType == TType_LIST) { |
---|
3057 | int _size10; |
---|
3058 | [inProtocol readListBeginReturningElementType: NULL size: &_size10]; |
---|
3059 | NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size10]; |
---|
3060 | int _i11; |
---|
3061 | for (_i11 = 0; _i11 < _size10; ++_i11) |
---|
3062 | { |
---|
3063 | FileStatus *_elem12 = [[FileStatus alloc] init]; |
---|
3064 | [_elem12 read: inProtocol]; |
---|
3065 | [fieldValue addObject: _elem12]; |
---|
3066 | } |
---|
3067 | [inProtocol readListEnd]; |
---|
3068 | [self setSuccess: fieldValue]; |
---|
3069 | [fieldValue release]; |
---|
3070 | } else { |
---|
3071 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
3072 | } |
---|
3073 | break; |
---|
3074 | case 1: |
---|
3075 | if (fieldType == TType_STRUCT) { |
---|
3076 | ThriftIOException *fieldValue = [[ThriftIOException alloc] init]; |
---|
3077 | [fieldValue read: inProtocol]; |
---|
3078 | [self setOuch: fieldValue]; |
---|
3079 | [fieldValue release]; |
---|
3080 | } else { |
---|
3081 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
3082 | } |
---|
3083 | break; |
---|
3084 | default: |
---|
3085 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
3086 | break; |
---|
3087 | } |
---|
3088 | [inProtocol readFieldEnd]; |
---|
3089 | } |
---|
3090 | [inProtocol readStructEnd]; |
---|
3091 | } |
---|
3092 | |
---|
3093 | - (void) write: (id <TProtocol>) outProtocol { |
---|
3094 | [outProtocol writeStructBeginWithName: @"ListStatusResult_"]; |
---|
3095 | |
---|
3096 | if (__success_isset) { |
---|
3097 | if (__success != nil) { |
---|
3098 | [outProtocol writeFieldBeginWithName: @"success" type: TType_LIST fieldID: 0]; |
---|
3099 | { |
---|
3100 | [outProtocol writeListBeginWithElementType: TType_STRUCT size: [__success count]]; |
---|
3101 | int i14; |
---|
3102 | for (i14 = 0; i14 < [__success count]; i14++) |
---|
3103 | { |
---|
3104 | [[__success objectAtIndex: i14] write: outProtocol]; |
---|
3105 | } |
---|
3106 | [outProtocol writeListEnd]; |
---|
3107 | } |
---|
3108 | [outProtocol writeFieldEnd]; |
---|
3109 | } |
---|
3110 | } else if (__ouch_isset) { |
---|
3111 | if (__ouch != nil) { |
---|
3112 | [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1]; |
---|
3113 | [__ouch write: outProtocol]; |
---|
3114 | [outProtocol writeFieldEnd]; |
---|
3115 | } |
---|
3116 | } |
---|
3117 | [outProtocol writeFieldStop]; |
---|
3118 | [outProtocol writeStructEnd]; |
---|
3119 | } |
---|
3120 | |
---|
3121 | - (NSString *) description { |
---|
3122 | NSMutableString * ms = [NSMutableString stringWithString: @"ListStatusResult_("]; |
---|
3123 | [ms appendString: @"success:"]; |
---|
3124 | [ms appendFormat: @"%@", __success]; |
---|
3125 | [ms appendString: @",ouch:"]; |
---|
3126 | [ms appendFormat: @"%@", __ouch]; |
---|
3127 | [ms appendString: @")"]; |
---|
3128 | return [ms copy]; |
---|
3129 | } |
---|
3130 | |
---|
3131 | @end |
---|
3132 | |
---|
3133 | @interface ChmodResult_ : NSObject { |
---|
3134 | ThriftIOException * __ouch; |
---|
3135 | |
---|
3136 | BOOL __ouch_isset; |
---|
3137 | } |
---|
3138 | |
---|
3139 | - (id) initWithOuch: (ThriftIOException *) ouch; |
---|
3140 | |
---|
3141 | - (void) read: (id <TProtocol>) inProtocol; |
---|
3142 | - (void) write: (id <TProtocol>) outProtocol; |
---|
3143 | |
---|
3144 | - (ThriftIOException *) ouch; |
---|
3145 | - (void) setOuch: (ThriftIOException *) ouch; |
---|
3146 | - (BOOL) ouchIsSet; |
---|
3147 | |
---|
3148 | @end |
---|
3149 | |
---|
3150 | @implementation ChmodResult_ |
---|
3151 | - (id) initWithOuch: (ThriftIOException *) ouch |
---|
3152 | { |
---|
3153 | self = [super init]; |
---|
3154 | __ouch = [ouch retain]; |
---|
3155 | __ouch_isset = YES; |
---|
3156 | return self; |
---|
3157 | } |
---|
3158 | |
---|
3159 | - (void) dealloc |
---|
3160 | { |
---|
3161 | [__ouch release]; |
---|
3162 | [super dealloc]; |
---|
3163 | } |
---|
3164 | |
---|
3165 | - (ThriftIOException *) ouch { |
---|
3166 | return [[__ouch retain] autorelease]; |
---|
3167 | } |
---|
3168 | |
---|
3169 | - (void) setOuch: (ThriftIOException *) ouch { |
---|
3170 | [ouch retain]; |
---|
3171 | [__ouch release]; |
---|
3172 | __ouch = ouch; |
---|
3173 | __ouch_isset = YES; |
---|
3174 | } |
---|
3175 | |
---|
3176 | - (BOOL) ouchIsSet { |
---|
3177 | return __ouch_isset; |
---|
3178 | } |
---|
3179 | |
---|
3180 | - (void) unsetOuch { |
---|
3181 | [__ouch release]; |
---|
3182 | __ouch = nil; |
---|
3183 | __ouch_isset = NO; |
---|
3184 | } |
---|
3185 | |
---|
3186 | - (void) read: (id <TProtocol>) inProtocol |
---|
3187 | { |
---|
3188 | NSString * fieldName; |
---|
3189 | int fieldType; |
---|
3190 | int fieldID; |
---|
3191 | |
---|
3192 | [inProtocol readStructBeginReturningName: NULL]; |
---|
3193 | while (true) |
---|
3194 | { |
---|
3195 | [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; |
---|
3196 | if (fieldType == TType_STOP) { |
---|
3197 | break; |
---|
3198 | } |
---|
3199 | switch (fieldID) |
---|
3200 | { |
---|
3201 | case 1: |
---|
3202 | if (fieldType == TType_STRUCT) { |
---|
3203 | ThriftIOException *fieldValue = [[ThriftIOException alloc] init]; |
---|
3204 | [fieldValue read: inProtocol]; |
---|
3205 | [self setOuch: fieldValue]; |
---|
3206 | [fieldValue release]; |
---|
3207 | } else { |
---|
3208 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
3209 | } |
---|
3210 | break; |
---|
3211 | default: |
---|
3212 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
3213 | break; |
---|
3214 | } |
---|
3215 | [inProtocol readFieldEnd]; |
---|
3216 | } |
---|
3217 | [inProtocol readStructEnd]; |
---|
3218 | } |
---|
3219 | |
---|
3220 | - (void) write: (id <TProtocol>) outProtocol { |
---|
3221 | [outProtocol writeStructBeginWithName: @"ChmodResult_"]; |
---|
3222 | |
---|
3223 | if (__ouch_isset) { |
---|
3224 | if (__ouch != nil) { |
---|
3225 | [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1]; |
---|
3226 | [__ouch write: outProtocol]; |
---|
3227 | [outProtocol writeFieldEnd]; |
---|
3228 | } |
---|
3229 | } |
---|
3230 | [outProtocol writeFieldStop]; |
---|
3231 | [outProtocol writeStructEnd]; |
---|
3232 | } |
---|
3233 | |
---|
3234 | - (NSString *) description { |
---|
3235 | NSMutableString * ms = [NSMutableString stringWithString: @"ChmodResult_("]; |
---|
3236 | [ms appendString: @"ouch:"]; |
---|
3237 | [ms appendFormat: @"%@", __ouch]; |
---|
3238 | [ms appendString: @")"]; |
---|
3239 | return [ms copy]; |
---|
3240 | } |
---|
3241 | |
---|
3242 | @end |
---|
3243 | |
---|
3244 | @interface ChownResult_ : NSObject { |
---|
3245 | ThriftIOException * __ouch; |
---|
3246 | |
---|
3247 | BOOL __ouch_isset; |
---|
3248 | } |
---|
3249 | |
---|
3250 | - (id) initWithOuch: (ThriftIOException *) ouch; |
---|
3251 | |
---|
3252 | - (void) read: (id <TProtocol>) inProtocol; |
---|
3253 | - (void) write: (id <TProtocol>) outProtocol; |
---|
3254 | |
---|
3255 | - (ThriftIOException *) ouch; |
---|
3256 | - (void) setOuch: (ThriftIOException *) ouch; |
---|
3257 | - (BOOL) ouchIsSet; |
---|
3258 | |
---|
3259 | @end |
---|
3260 | |
---|
3261 | @implementation ChownResult_ |
---|
3262 | - (id) initWithOuch: (ThriftIOException *) ouch |
---|
3263 | { |
---|
3264 | self = [super init]; |
---|
3265 | __ouch = [ouch retain]; |
---|
3266 | __ouch_isset = YES; |
---|
3267 | return self; |
---|
3268 | } |
---|
3269 | |
---|
3270 | - (void) dealloc |
---|
3271 | { |
---|
3272 | [__ouch release]; |
---|
3273 | [super dealloc]; |
---|
3274 | } |
---|
3275 | |
---|
3276 | - (ThriftIOException *) ouch { |
---|
3277 | return [[__ouch retain] autorelease]; |
---|
3278 | } |
---|
3279 | |
---|
3280 | - (void) setOuch: (ThriftIOException *) ouch { |
---|
3281 | [ouch retain]; |
---|
3282 | [__ouch release]; |
---|
3283 | __ouch = ouch; |
---|
3284 | __ouch_isset = YES; |
---|
3285 | } |
---|
3286 | |
---|
3287 | - (BOOL) ouchIsSet { |
---|
3288 | return __ouch_isset; |
---|
3289 | } |
---|
3290 | |
---|
3291 | - (void) unsetOuch { |
---|
3292 | [__ouch release]; |
---|
3293 | __ouch = nil; |
---|
3294 | __ouch_isset = NO; |
---|
3295 | } |
---|
3296 | |
---|
3297 | - (void) read: (id <TProtocol>) inProtocol |
---|
3298 | { |
---|
3299 | NSString * fieldName; |
---|
3300 | int fieldType; |
---|
3301 | int fieldID; |
---|
3302 | |
---|
3303 | [inProtocol readStructBeginReturningName: NULL]; |
---|
3304 | while (true) |
---|
3305 | { |
---|
3306 | [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; |
---|
3307 | if (fieldType == TType_STOP) { |
---|
3308 | break; |
---|
3309 | } |
---|
3310 | switch (fieldID) |
---|
3311 | { |
---|
3312 | case 1: |
---|
3313 | if (fieldType == TType_STRUCT) { |
---|
3314 | ThriftIOException *fieldValue = [[ThriftIOException alloc] init]; |
---|
3315 | [fieldValue read: inProtocol]; |
---|
3316 | [self setOuch: fieldValue]; |
---|
3317 | [fieldValue release]; |
---|
3318 | } else { |
---|
3319 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
3320 | } |
---|
3321 | break; |
---|
3322 | default: |
---|
3323 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
3324 | break; |
---|
3325 | } |
---|
3326 | [inProtocol readFieldEnd]; |
---|
3327 | } |
---|
3328 | [inProtocol readStructEnd]; |
---|
3329 | } |
---|
3330 | |
---|
3331 | - (void) write: (id <TProtocol>) outProtocol { |
---|
3332 | [outProtocol writeStructBeginWithName: @"ChownResult_"]; |
---|
3333 | |
---|
3334 | if (__ouch_isset) { |
---|
3335 | if (__ouch != nil) { |
---|
3336 | [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1]; |
---|
3337 | [__ouch write: outProtocol]; |
---|
3338 | [outProtocol writeFieldEnd]; |
---|
3339 | } |
---|
3340 | } |
---|
3341 | [outProtocol writeFieldStop]; |
---|
3342 | [outProtocol writeStructEnd]; |
---|
3343 | } |
---|
3344 | |
---|
3345 | - (NSString *) description { |
---|
3346 | NSMutableString * ms = [NSMutableString stringWithString: @"ChownResult_("]; |
---|
3347 | [ms appendString: @"ouch:"]; |
---|
3348 | [ms appendFormat: @"%@", __ouch]; |
---|
3349 | [ms appendString: @")"]; |
---|
3350 | return [ms copy]; |
---|
3351 | } |
---|
3352 | |
---|
3353 | @end |
---|
3354 | |
---|
3355 | @interface SetReplicationResult_ : NSObject { |
---|
3356 | ThriftIOException * __ouch; |
---|
3357 | |
---|
3358 | BOOL __ouch_isset; |
---|
3359 | } |
---|
3360 | |
---|
3361 | - (id) initWithOuch: (ThriftIOException *) ouch; |
---|
3362 | |
---|
3363 | - (void) read: (id <TProtocol>) inProtocol; |
---|
3364 | - (void) write: (id <TProtocol>) outProtocol; |
---|
3365 | |
---|
3366 | - (ThriftIOException *) ouch; |
---|
3367 | - (void) setOuch: (ThriftIOException *) ouch; |
---|
3368 | - (BOOL) ouchIsSet; |
---|
3369 | |
---|
3370 | @end |
---|
3371 | |
---|
3372 | @implementation SetReplicationResult_ |
---|
3373 | - (id) initWithOuch: (ThriftIOException *) ouch |
---|
3374 | { |
---|
3375 | self = [super init]; |
---|
3376 | __ouch = [ouch retain]; |
---|
3377 | __ouch_isset = YES; |
---|
3378 | return self; |
---|
3379 | } |
---|
3380 | |
---|
3381 | - (void) dealloc |
---|
3382 | { |
---|
3383 | [__ouch release]; |
---|
3384 | [super dealloc]; |
---|
3385 | } |
---|
3386 | |
---|
3387 | - (ThriftIOException *) ouch { |
---|
3388 | return [[__ouch retain] autorelease]; |
---|
3389 | } |
---|
3390 | |
---|
3391 | - (void) setOuch: (ThriftIOException *) ouch { |
---|
3392 | [ouch retain]; |
---|
3393 | [__ouch release]; |
---|
3394 | __ouch = ouch; |
---|
3395 | __ouch_isset = YES; |
---|
3396 | } |
---|
3397 | |
---|
3398 | - (BOOL) ouchIsSet { |
---|
3399 | return __ouch_isset; |
---|
3400 | } |
---|
3401 | |
---|
3402 | - (void) unsetOuch { |
---|
3403 | [__ouch release]; |
---|
3404 | __ouch = nil; |
---|
3405 | __ouch_isset = NO; |
---|
3406 | } |
---|
3407 | |
---|
3408 | - (void) read: (id <TProtocol>) inProtocol |
---|
3409 | { |
---|
3410 | NSString * fieldName; |
---|
3411 | int fieldType; |
---|
3412 | int fieldID; |
---|
3413 | |
---|
3414 | [inProtocol readStructBeginReturningName: NULL]; |
---|
3415 | while (true) |
---|
3416 | { |
---|
3417 | [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; |
---|
3418 | if (fieldType == TType_STOP) { |
---|
3419 | break; |
---|
3420 | } |
---|
3421 | switch (fieldID) |
---|
3422 | { |
---|
3423 | case 1: |
---|
3424 | if (fieldType == TType_STRUCT) { |
---|
3425 | ThriftIOException *fieldValue = [[ThriftIOException alloc] init]; |
---|
3426 | [fieldValue read: inProtocol]; |
---|
3427 | [self setOuch: fieldValue]; |
---|
3428 | [fieldValue release]; |
---|
3429 | } else { |
---|
3430 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
3431 | } |
---|
3432 | break; |
---|
3433 | default: |
---|
3434 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
3435 | break; |
---|
3436 | } |
---|
3437 | [inProtocol readFieldEnd]; |
---|
3438 | } |
---|
3439 | [inProtocol readStructEnd]; |
---|
3440 | } |
---|
3441 | |
---|
3442 | - (void) write: (id <TProtocol>) outProtocol { |
---|
3443 | [outProtocol writeStructBeginWithName: @"SetReplicationResult_"]; |
---|
3444 | |
---|
3445 | if (__ouch_isset) { |
---|
3446 | if (__ouch != nil) { |
---|
3447 | [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1]; |
---|
3448 | [__ouch write: outProtocol]; |
---|
3449 | [outProtocol writeFieldEnd]; |
---|
3450 | } |
---|
3451 | } |
---|
3452 | [outProtocol writeFieldStop]; |
---|
3453 | [outProtocol writeStructEnd]; |
---|
3454 | } |
---|
3455 | |
---|
3456 | - (NSString *) description { |
---|
3457 | NSMutableString * ms = [NSMutableString stringWithString: @"SetReplicationResult_("]; |
---|
3458 | [ms appendString: @"ouch:"]; |
---|
3459 | [ms appendFormat: @"%@", __ouch]; |
---|
3460 | [ms appendString: @")"]; |
---|
3461 | return [ms copy]; |
---|
3462 | } |
---|
3463 | |
---|
3464 | @end |
---|
3465 | |
---|
3466 | @interface GetFileBlockLocationsResult_ : NSObject { |
---|
3467 | NSArray * __success; |
---|
3468 | ThriftIOException * __ouch; |
---|
3469 | |
---|
3470 | BOOL __success_isset; |
---|
3471 | BOOL __ouch_isset; |
---|
3472 | } |
---|
3473 | |
---|
3474 | - (id) initWithSuccess: (NSArray *) success ouch: (ThriftIOException *) ouch; |
---|
3475 | |
---|
3476 | - (void) read: (id <TProtocol>) inProtocol; |
---|
3477 | - (void) write: (id <TProtocol>) outProtocol; |
---|
3478 | |
---|
3479 | - (NSArray *) success; |
---|
3480 | - (void) setSuccess: (NSArray *) success; |
---|
3481 | - (BOOL) successIsSet; |
---|
3482 | |
---|
3483 | - (ThriftIOException *) ouch; |
---|
3484 | - (void) setOuch: (ThriftIOException *) ouch; |
---|
3485 | - (BOOL) ouchIsSet; |
---|
3486 | |
---|
3487 | @end |
---|
3488 | |
---|
3489 | @implementation GetFileBlockLocationsResult_ |
---|
3490 | - (id) initWithSuccess: (NSArray *) success ouch: (ThriftIOException *) ouch |
---|
3491 | { |
---|
3492 | self = [super init]; |
---|
3493 | __success = [success retain]; |
---|
3494 | __success_isset = YES; |
---|
3495 | __ouch = [ouch retain]; |
---|
3496 | __ouch_isset = YES; |
---|
3497 | return self; |
---|
3498 | } |
---|
3499 | |
---|
3500 | - (void) dealloc |
---|
3501 | { |
---|
3502 | [__success release]; |
---|
3503 | [__ouch release]; |
---|
3504 | [super dealloc]; |
---|
3505 | } |
---|
3506 | |
---|
3507 | - (NSArray *) success { |
---|
3508 | return [[__success retain] autorelease]; |
---|
3509 | } |
---|
3510 | |
---|
3511 | - (void) setSuccess: (NSArray *) success { |
---|
3512 | [success retain]; |
---|
3513 | [__success release]; |
---|
3514 | __success = success; |
---|
3515 | __success_isset = YES; |
---|
3516 | } |
---|
3517 | |
---|
3518 | - (BOOL) successIsSet { |
---|
3519 | return __success_isset; |
---|
3520 | } |
---|
3521 | |
---|
3522 | - (void) unsetSuccess { |
---|
3523 | [__success release]; |
---|
3524 | __success = nil; |
---|
3525 | __success_isset = NO; |
---|
3526 | } |
---|
3527 | |
---|
3528 | - (ThriftIOException *) ouch { |
---|
3529 | return [[__ouch retain] autorelease]; |
---|
3530 | } |
---|
3531 | |
---|
3532 | - (void) setOuch: (ThriftIOException *) ouch { |
---|
3533 | [ouch retain]; |
---|
3534 | [__ouch release]; |
---|
3535 | __ouch = ouch; |
---|
3536 | __ouch_isset = YES; |
---|
3537 | } |
---|
3538 | |
---|
3539 | - (BOOL) ouchIsSet { |
---|
3540 | return __ouch_isset; |
---|
3541 | } |
---|
3542 | |
---|
3543 | - (void) unsetOuch { |
---|
3544 | [__ouch release]; |
---|
3545 | __ouch = nil; |
---|
3546 | __ouch_isset = NO; |
---|
3547 | } |
---|
3548 | |
---|
3549 | - (void) read: (id <TProtocol>) inProtocol |
---|
3550 | { |
---|
3551 | NSString * fieldName; |
---|
3552 | int fieldType; |
---|
3553 | int fieldID; |
---|
3554 | |
---|
3555 | [inProtocol readStructBeginReturningName: NULL]; |
---|
3556 | while (true) |
---|
3557 | { |
---|
3558 | [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID]; |
---|
3559 | if (fieldType == TType_STOP) { |
---|
3560 | break; |
---|
3561 | } |
---|
3562 | switch (fieldID) |
---|
3563 | { |
---|
3564 | case 0: |
---|
3565 | if (fieldType == TType_LIST) { |
---|
3566 | int _size15; |
---|
3567 | [inProtocol readListBeginReturningElementType: NULL size: &_size15]; |
---|
3568 | NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size15]; |
---|
3569 | int _i16; |
---|
3570 | for (_i16 = 0; _i16 < _size15; ++_i16) |
---|
3571 | { |
---|
3572 | BlockLocation *_elem17 = [[BlockLocation alloc] init]; |
---|
3573 | [_elem17 read: inProtocol]; |
---|
3574 | [fieldValue addObject: _elem17]; |
---|
3575 | } |
---|
3576 | [inProtocol readListEnd]; |
---|
3577 | [self setSuccess: fieldValue]; |
---|
3578 | [fieldValue release]; |
---|
3579 | } else { |
---|
3580 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
3581 | } |
---|
3582 | break; |
---|
3583 | case 1: |
---|
3584 | if (fieldType == TType_STRUCT) { |
---|
3585 | ThriftIOException *fieldValue = [[ThriftIOException alloc] init]; |
---|
3586 | [fieldValue read: inProtocol]; |
---|
3587 | [self setOuch: fieldValue]; |
---|
3588 | [fieldValue release]; |
---|
3589 | } else { |
---|
3590 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
3591 | } |
---|
3592 | break; |
---|
3593 | default: |
---|
3594 | [TProtocolUtil skipType: fieldType onProtocol: inProtocol]; |
---|
3595 | break; |
---|
3596 | } |
---|
3597 | [inProtocol readFieldEnd]; |
---|
3598 | } |
---|
3599 | [inProtocol readStructEnd]; |
---|
3600 | } |
---|
3601 | |
---|
3602 | - (void) write: (id <TProtocol>) outProtocol { |
---|
3603 | [outProtocol writeStructBeginWithName: @"GetFileBlockLocationsResult_"]; |
---|
3604 | |
---|
3605 | if (__success_isset) { |
---|
3606 | if (__success != nil) { |
---|
3607 | [outProtocol writeFieldBeginWithName: @"success" type: TType_LIST fieldID: 0]; |
---|
3608 | { |
---|
3609 | [outProtocol writeListBeginWithElementType: TType_STRUCT size: [__success count]]; |
---|
3610 | int i19; |
---|
3611 | for (i19 = 0; i19 < [__success count]; i19++) |
---|
3612 | { |
---|
3613 | [[__success objectAtIndex: i19] write: outProtocol]; |
---|
3614 | } |
---|
3615 | [outProtocol writeListEnd]; |
---|
3616 | } |
---|
3617 | [outProtocol writeFieldEnd]; |
---|
3618 | } |
---|
3619 | } else if (__ouch_isset) { |
---|
3620 | if (__ouch != nil) { |
---|
3621 | [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1]; |
---|
3622 | [__ouch write: outProtocol]; |
---|
3623 | [outProtocol writeFieldEnd]; |
---|
3624 | } |
---|
3625 | } |
---|
3626 | [outProtocol writeFieldStop]; |
---|
3627 | [outProtocol writeStructEnd]; |
---|
3628 | } |
---|
3629 | |
---|
3630 | - (NSString *) description { |
---|
3631 | NSMutableString * ms = [NSMutableString stringWithString: @"GetFileBlockLocationsResult_("]; |
---|
3632 | [ms appendString: @"success:"]; |
---|
3633 | [ms appendFormat: @"%@", __success]; |
---|
3634 | [ms appendString: @",ouch:"]; |
---|
3635 | [ms appendFormat: @"%@", __ouch]; |
---|
3636 | [ms appendString: @")"]; |
---|
3637 | return [ms copy]; |
---|
3638 | } |
---|
3639 | |
---|
3640 | @end |
---|
3641 | |
---|
3642 | @implementation ThriftHadoopFileSystemClient |
---|
3643 | - (id) initWithProtocol: (id <TProtocol>) protocol |
---|
3644 | { |
---|
3645 | return [self initWithInProtocol: protocol outProtocol: protocol]; |
---|
3646 | } |
---|
3647 | |
---|
3648 | - (id) initWithInProtocol: (id <TProtocol>) anInProtocol outProtocol: (id <TProtocol>) anOutProtocol |
---|
3649 | { |
---|
3650 | [super init]; |
---|
3651 | inProtocol = [anInProtocol retain]; |
---|
3652 | outProtocol = [anOutProtocol retain]; |
---|
3653 | return self; |
---|
3654 | } |
---|
3655 | |
---|
3656 | - (void) dealloc |
---|
3657 | { |
---|
3658 | [inProtocol release]; |
---|
3659 | [outProtocol release]; |
---|
3660 | [super dealloc]; |
---|
3661 | } |
---|
3662 | |
---|
3663 | - (void) send_setInactivityTimeoutPeriod: (int64_t) periodInSeconds |
---|
3664 | { |
---|
3665 | [outProtocol writeMessageBeginWithName: @"setInactivityTimeoutPeriod" type: TMessageType_CALL sequenceID: 0]; |
---|
3666 | [outProtocol writeStructBeginWithName: @"setInactivityTimeoutPeriod_args"]; |
---|
3667 | [outProtocol writeFieldBeginWithName: @"periodInSeconds" type: TType_I64 fieldID: 1]; |
---|
3668 | [outProtocol writeI64: periodInSeconds]; |
---|
3669 | [outProtocol writeFieldEnd]; |
---|
3670 | [outProtocol writeFieldStop]; |
---|
3671 | [outProtocol writeStructEnd]; |
---|
3672 | [outProtocol writeMessageEnd]; |
---|
3673 | [[outProtocol transport] flush]; |
---|
3674 | } |
---|
3675 | |
---|
3676 | - (void) recv_setInactivityTimeoutPeriod |
---|
3677 | { |
---|
3678 | int msgType = 0; |
---|
3679 | [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL]; |
---|
3680 | if (msgType == TMessageType_EXCEPTION) { |
---|
3681 | TApplicationException * x = [TApplicationException read: inProtocol]; |
---|
3682 | [inProtocol readMessageEnd]; |
---|
3683 | @throw x; |
---|
3684 | } |
---|
3685 | SetInactivityTimeoutPeriodResult_ * result = [[[SetInactivityTimeoutPeriodResult_ alloc] init] autorelease]; |
---|
3686 | [result read: inProtocol]; |
---|
3687 | [inProtocol readMessageEnd]; |
---|
3688 | return; |
---|
3689 | } |
---|
3690 | |
---|
3691 | - (void) setInactivityTimeoutPeriod: (int64_t) periodInSeconds |
---|
3692 | { |
---|
3693 | [self send_setInactivityTimeoutPeriod: periodInSeconds]; |
---|
3694 | [self recv_setInactivityTimeoutPeriod]; |
---|
3695 | } |
---|
3696 | |
---|
3697 | - (void) send_shutdown: (int32_t) status |
---|
3698 | { |
---|
3699 | [outProtocol writeMessageBeginWithName: @"shutdown" type: TMessageType_CALL sequenceID: 0]; |
---|
3700 | [outProtocol writeStructBeginWithName: @"shutdown_args"]; |
---|
3701 | [outProtocol writeFieldBeginWithName: @"status" type: TType_I32 fieldID: 1]; |
---|
3702 | [outProtocol writeI32: status]; |
---|
3703 | [outProtocol writeFieldEnd]; |
---|
3704 | [outProtocol writeFieldStop]; |
---|
3705 | [outProtocol writeStructEnd]; |
---|
3706 | [outProtocol writeMessageEnd]; |
---|
3707 | [[outProtocol transport] flush]; |
---|
3708 | } |
---|
3709 | |
---|
3710 | - (void) recv_shutdown |
---|
3711 | { |
---|
3712 | int msgType = 0; |
---|
3713 | [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL]; |
---|
3714 | if (msgType == TMessageType_EXCEPTION) { |
---|
3715 | TApplicationException * x = [TApplicationException read: inProtocol]; |
---|
3716 | [inProtocol readMessageEnd]; |
---|
3717 | @throw x; |
---|
3718 | } |
---|
3719 | ShutdownResult_ * result = [[[ShutdownResult_ alloc] init] autorelease]; |
---|
3720 | [result read: inProtocol]; |
---|
3721 | [inProtocol readMessageEnd]; |
---|
3722 | return; |
---|
3723 | } |
---|
3724 | |
---|
3725 | - (void) shutdown: (int32_t) status |
---|
3726 | { |
---|
3727 | [self send_shutdown: status]; |
---|
3728 | [self recv_shutdown]; |
---|
3729 | } |
---|
3730 | |
---|
3731 | - (void) send_create: (Pathname *) path |
---|
3732 | { |
---|
3733 | [outProtocol writeMessageBeginWithName: @"create" type: TMessageType_CALL sequenceID: 0]; |
---|
3734 | [outProtocol writeStructBeginWithName: @"create_args"]; |
---|
3735 | if (path != nil) { |
---|
3736 | [outProtocol writeFieldBeginWithName: @"path" type: TType_STRUCT fieldID: 1]; |
---|
3737 | [path write: outProtocol]; |
---|
3738 | [outProtocol writeFieldEnd]; |
---|
3739 | } |
---|
3740 | [outProtocol writeFieldStop]; |
---|
3741 | [outProtocol writeStructEnd]; |
---|
3742 | [outProtocol writeMessageEnd]; |
---|
3743 | [[outProtocol transport] flush]; |
---|
3744 | } |
---|
3745 | |
---|
3746 | - (ThriftHandle *) recv_create |
---|
3747 | { |
---|
3748 | int msgType = 0; |
---|
3749 | [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL]; |
---|
3750 | if (msgType == TMessageType_EXCEPTION) { |
---|
3751 | TApplicationException * x = [TApplicationException read: inProtocol]; |
---|
3752 | [inProtocol readMessageEnd]; |
---|
3753 | @throw x; |
---|
3754 | } |
---|
3755 | CreateResult_ * result = [[[CreateResult_ alloc] init] autorelease]; |
---|
3756 | [result read: inProtocol]; |
---|
3757 | [inProtocol readMessageEnd]; |
---|
3758 | if ([result successIsSet]) { |
---|
3759 | return [result success]; |
---|
3760 | } |
---|
3761 | if ([result ouchIsSet]) { |
---|
3762 | @throw [result ouch]; |
---|
3763 | } |
---|
3764 | @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT |
---|
3765 | reason: @"create failed: unknown result"]; |
---|
3766 | } |
---|
3767 | |
---|
3768 | - (ThriftHandle *) create: (Pathname *) path |
---|
3769 | { |
---|
3770 | [self send_create: path]; |
---|
3771 | return [self recv_create]; |
---|
3772 | } |
---|
3773 | |
---|
3774 | - (void) send_createFile: (Pathname *) path : (int16_t) mode : (BOOL) overwrite : (int32_t) bufferSize : (int16_t) block_replication : (int64_t) blocksize |
---|
3775 | { |
---|
3776 | [outProtocol writeMessageBeginWithName: @"createFile" type: TMessageType_CALL sequenceID: 0]; |
---|
3777 | [outProtocol writeStructBeginWithName: @"createFile_args"]; |
---|
3778 | if (path != nil) { |
---|
3779 | [outProtocol writeFieldBeginWithName: @"path" type: TType_STRUCT fieldID: 1]; |
---|
3780 | [path write: outProtocol]; |
---|
3781 | [outProtocol writeFieldEnd]; |
---|
3782 | } |
---|
3783 | [outProtocol writeFieldBeginWithName: @"mode" type: TType_I16 fieldID: 2]; |
---|
3784 | [outProtocol writeI16: mode]; |
---|
3785 | [outProtocol writeFieldEnd]; |
---|
3786 | [outProtocol writeFieldBeginWithName: @"overwrite" type: TType_BOOL fieldID: 3]; |
---|
3787 | [outProtocol writeBool: overwrite]; |
---|
3788 | [outProtocol writeFieldEnd]; |
---|
3789 | [outProtocol writeFieldBeginWithName: @"bufferSize" type: TType_I32 fieldID: 4]; |
---|
3790 | [outProtocol writeI32: bufferSize]; |
---|
3791 | [outProtocol writeFieldEnd]; |
---|
3792 | [outProtocol writeFieldBeginWithName: @"block_replication" type: TType_I16 fieldID: 5]; |
---|
3793 | [outProtocol writeI16: block_replication]; |
---|
3794 | [outProtocol writeFieldEnd]; |
---|
3795 | [outProtocol writeFieldBeginWithName: @"blocksize" type: TType_I64 fieldID: 6]; |
---|
3796 | [outProtocol writeI64: blocksize]; |
---|
3797 | [outProtocol writeFieldEnd]; |
---|
3798 | [outProtocol writeFieldStop]; |
---|
3799 | [outProtocol writeStructEnd]; |
---|
3800 | [outProtocol writeMessageEnd]; |
---|
3801 | [[outProtocol transport] flush]; |
---|
3802 | } |
---|
3803 | |
---|
3804 | - (ThriftHandle *) recv_createFile |
---|
3805 | { |
---|
3806 | int msgType = 0; |
---|
3807 | [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL]; |
---|
3808 | if (msgType == TMessageType_EXCEPTION) { |
---|
3809 | TApplicationException * x = [TApplicationException read: inProtocol]; |
---|
3810 | [inProtocol readMessageEnd]; |
---|
3811 | @throw x; |
---|
3812 | } |
---|
3813 | CreateFileResult_ * result = [[[CreateFileResult_ alloc] init] autorelease]; |
---|
3814 | [result read: inProtocol]; |
---|
3815 | [inProtocol readMessageEnd]; |
---|
3816 | if ([result successIsSet]) { |
---|
3817 | return [result success]; |
---|
3818 | } |
---|
3819 | if ([result ouchIsSet]) { |
---|
3820 | @throw [result ouch]; |
---|
3821 | } |
---|
3822 | @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT |
---|
3823 | reason: @"createFile failed: unknown result"]; |
---|
3824 | } |
---|
3825 | |
---|
3826 | - (ThriftHandle *) createFile: (Pathname *) path : (int16_t) mode : (BOOL) overwrite : (int32_t) bufferSize : (int16_t) block_replication : (int64_t) blocksize |
---|
3827 | { |
---|
3828 | [self send_createFile: path : mode : overwrite : bufferSize : block_replication : blocksize]; |
---|
3829 | return [self recv_createFile]; |
---|
3830 | } |
---|
3831 | |
---|
3832 | - (void) send_open: (Pathname *) path |
---|
3833 | { |
---|
3834 | [outProtocol writeMessageBeginWithName: @"open" type: TMessageType_CALL sequenceID: 0]; |
---|
3835 | [outProtocol writeStructBeginWithName: @"open_args"]; |
---|
3836 | if (path != nil) { |
---|
3837 | [outProtocol writeFieldBeginWithName: @"path" type: TType_STRUCT fieldID: 1]; |
---|
3838 | [path write: outProtocol]; |
---|
3839 | [outProtocol writeFieldEnd]; |
---|
3840 | } |
---|
3841 | [outProtocol writeFieldStop]; |
---|
3842 | [outProtocol writeStructEnd]; |
---|
3843 | [outProtocol writeMessageEnd]; |
---|
3844 | [[outProtocol transport] flush]; |
---|
3845 | } |
---|
3846 | |
---|
3847 | - (ThriftHandle *) recv_open |
---|
3848 | { |
---|
3849 | int msgType = 0; |
---|
3850 | [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL]; |
---|
3851 | if (msgType == TMessageType_EXCEPTION) { |
---|
3852 | TApplicationException * x = [TApplicationException read: inProtocol]; |
---|
3853 | [inProtocol readMessageEnd]; |
---|
3854 | @throw x; |
---|
3855 | } |
---|
3856 | OpenResult_ * result = [[[OpenResult_ alloc] init] autorelease]; |
---|
3857 | [result read: inProtocol]; |
---|
3858 | [inProtocol readMessageEnd]; |
---|
3859 | if ([result successIsSet]) { |
---|
3860 | return [result success]; |
---|
3861 | } |
---|
3862 | if ([result ouchIsSet]) { |
---|
3863 | @throw [result ouch]; |
---|
3864 | } |
---|
3865 | @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT |
---|
3866 | reason: @"open failed: unknown result"]; |
---|
3867 | } |
---|
3868 | |
---|
3869 | - (ThriftHandle *) open: (Pathname *) path |
---|
3870 | { |
---|
3871 | [self send_open: path]; |
---|
3872 | return [self recv_open]; |
---|
3873 | } |
---|
3874 | |
---|
3875 | - (void) send_append: (Pathname *) path |
---|
3876 | { |
---|
3877 | [outProtocol writeMessageBeginWithName: @"append" type: TMessageType_CALL sequenceID: 0]; |
---|
3878 | [outProtocol writeStructBeginWithName: @"append_args"]; |
---|
3879 | if (path != nil) { |
---|
3880 | [outProtocol writeFieldBeginWithName: @"path" type: TType_STRUCT fieldID: 1]; |
---|
3881 | [path write: outProtocol]; |
---|
3882 | [outProtocol writeFieldEnd]; |
---|
3883 | } |
---|
3884 | [outProtocol writeFieldStop]; |
---|
3885 | [outProtocol writeStructEnd]; |
---|
3886 | [outProtocol writeMessageEnd]; |
---|
3887 | [[outProtocol transport] flush]; |
---|
3888 | } |
---|
3889 | |
---|
3890 | - (ThriftHandle *) recv_append |
---|
3891 | { |
---|
3892 | int msgType = 0; |
---|
3893 | [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL]; |
---|
3894 | if (msgType == TMessageType_EXCEPTION) { |
---|
3895 | TApplicationException * x = [TApplicationException read: inProtocol]; |
---|
3896 | [inProtocol readMessageEnd]; |
---|
3897 | @throw x; |
---|
3898 | } |
---|
3899 | AppendResult_ * result = [[[AppendResult_ alloc] init] autorelease]; |
---|
3900 | [result read: inProtocol]; |
---|
3901 | [inProtocol readMessageEnd]; |
---|
3902 | if ([result successIsSet]) { |
---|
3903 | return [result success]; |
---|
3904 | } |
---|
3905 | if ([result ouchIsSet]) { |
---|
3906 | @throw [result ouch]; |
---|
3907 | } |
---|
3908 | @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT |
---|
3909 | reason: @"append failed: unknown result"]; |
---|
3910 | } |
---|
3911 | |
---|
3912 | - (ThriftHandle *) append: (Pathname *) path |
---|
3913 | { |
---|
3914 | [self send_append: path]; |
---|
3915 | return [self recv_append]; |
---|
3916 | } |
---|
3917 | |
---|
3918 | - (void) send_write: (ThriftHandle *) handle : (NSString *) data |
---|
3919 | { |
---|
3920 | [outProtocol writeMessageBeginWithName: @"write" type: TMessageType_CALL sequenceID: 0]; |
---|
3921 | [outProtocol writeStructBeginWithName: @"write_args"]; |
---|
3922 | if (handle != nil) { |
---|
3923 | [outProtocol writeFieldBeginWithName: @"handle" type: TType_STRUCT fieldID: 1]; |
---|
3924 | [handle write: outProtocol]; |
---|
3925 | [outProtocol writeFieldEnd]; |
---|
3926 | } |
---|
3927 | if (data != nil) { |
---|
3928 | [outProtocol writeFieldBeginWithName: @"data" type: TType_STRING fieldID: -1]; |
---|
3929 | [outProtocol writeString: data]; |
---|
3930 | [outProtocol writeFieldEnd]; |
---|
3931 | } |
---|
3932 | [outProtocol writeFieldStop]; |
---|
3933 | [outProtocol writeStructEnd]; |
---|
3934 | [outProtocol writeMessageEnd]; |
---|
3935 | [[outProtocol transport] flush]; |
---|
3936 | } |
---|
3937 | |
---|
3938 | - (BOOL) recv_write |
---|
3939 | { |
---|
3940 | int msgType = 0; |
---|
3941 | [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL]; |
---|
3942 | if (msgType == TMessageType_EXCEPTION) { |
---|
3943 | TApplicationException * x = [TApplicationException read: inProtocol]; |
---|
3944 | [inProtocol readMessageEnd]; |
---|
3945 | @throw x; |
---|
3946 | } |
---|
3947 | WriteResult_ * result = [[[WriteResult_ alloc] init] autorelease]; |
---|
3948 | [result read: inProtocol]; |
---|
3949 | [inProtocol readMessageEnd]; |
---|
3950 | if ([result successIsSet]) { |
---|
3951 | return [result success]; |
---|
3952 | } |
---|
3953 | if ([result ouchIsSet]) { |
---|
3954 | @throw [result ouch]; |
---|
3955 | } |
---|
3956 | @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT |
---|
3957 | reason: @"write failed: unknown result"]; |
---|
3958 | } |
---|
3959 | |
---|
3960 | - (BOOL) write: (ThriftHandle *) handle : (NSString *) data |
---|
3961 | { |
---|
3962 | [self send_write: handle : data]; |
---|
3963 | return [self recv_write]; |
---|
3964 | } |
---|
3965 | |
---|
3966 | - (void) send_read: (ThriftHandle *) handle : (int64_t) offset : (int32_t) size |
---|
3967 | { |
---|
3968 | [outProtocol writeMessageBeginWithName: @"read" type: TMessageType_CALL sequenceID: 0]; |
---|
3969 | [outProtocol writeStructBeginWithName: @"read_args"]; |
---|
3970 | if (handle != nil) { |
---|
3971 | [outProtocol writeFieldBeginWithName: @"handle" type: TType_STRUCT fieldID: 1]; |
---|
3972 | [handle write: outProtocol]; |
---|
3973 | [outProtocol writeFieldEnd]; |
---|
3974 | } |
---|
3975 | [outProtocol writeFieldBeginWithName: @"offset" type: TType_I64 fieldID: -1]; |
---|
3976 | [outProtocol writeI64: offset]; |
---|
3977 | [outProtocol writeFieldEnd]; |
---|
3978 | [outProtocol writeFieldBeginWithName: @"size" type: TType_I32 fieldID: -2]; |
---|
3979 | [outProtocol writeI32: size]; |
---|
3980 | [outProtocol writeFieldEnd]; |
---|
3981 | [outProtocol writeFieldStop]; |
---|
3982 | [outProtocol writeStructEnd]; |
---|
3983 | [outProtocol writeMessageEnd]; |
---|
3984 | [[outProtocol transport] flush]; |
---|
3985 | } |
---|
3986 | |
---|
3987 | - (NSString *) recv_read |
---|
3988 | { |
---|
3989 | int msgType = 0; |
---|
3990 | [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL]; |
---|
3991 | if (msgType == TMessageType_EXCEPTION) { |
---|
3992 | TApplicationException * x = [TApplicationException read: inProtocol]; |
---|
3993 | [inProtocol readMessageEnd]; |
---|
3994 | @throw x; |
---|
3995 | } |
---|
3996 | ReadResult_ * result = [[[ReadResult_ alloc] init] autorelease]; |
---|
3997 | [result read: inProtocol]; |
---|
3998 | [inProtocol readMessageEnd]; |
---|
3999 | if ([result successIsSet]) { |
---|
4000 | return [result success]; |
---|
4001 | } |
---|
4002 | if ([result ouchIsSet]) { |
---|
4003 | @throw [result ouch]; |
---|
4004 | } |
---|
4005 | @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT |
---|
4006 | reason: @"read failed: unknown result"]; |
---|
4007 | } |
---|
4008 | |
---|
4009 | - (NSString *) read: (ThriftHandle *) handle : (int64_t) offset : (int32_t) size |
---|
4010 | { |
---|
4011 | [self send_read: handle : offset : size]; |
---|
4012 | return [self recv_read]; |
---|
4013 | } |
---|
4014 | |
---|
4015 | - (void) send_close: (ThriftHandle *) out |
---|
4016 | { |
---|
4017 | [outProtocol writeMessageBeginWithName: @"close" type: TMessageType_CALL sequenceID: 0]; |
---|
4018 | [outProtocol writeStructBeginWithName: @"close_args"]; |
---|
4019 | if (out != nil) { |
---|
4020 | [outProtocol writeFieldBeginWithName: @"out" type: TType_STRUCT fieldID: 1]; |
---|
4021 | [out write: outProtocol]; |
---|
4022 | [outProtocol writeFieldEnd]; |
---|
4023 | } |
---|
4024 | [outProtocol writeFieldStop]; |
---|
4025 | [outProtocol writeStructEnd]; |
---|
4026 | [outProtocol writeMessageEnd]; |
---|
4027 | [[outProtocol transport] flush]; |
---|
4028 | } |
---|
4029 | |
---|
4030 | - (BOOL) recv_close |
---|
4031 | { |
---|
4032 | int msgType = 0; |
---|
4033 | [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL]; |
---|
4034 | if (msgType == TMessageType_EXCEPTION) { |
---|
4035 | TApplicationException * x = [TApplicationException read: inProtocol]; |
---|
4036 | [inProtocol readMessageEnd]; |
---|
4037 | @throw x; |
---|
4038 | } |
---|
4039 | CloseResult_ * result = [[[CloseResult_ alloc] init] autorelease]; |
---|
4040 | [result read: inProtocol]; |
---|
4041 | [inProtocol readMessageEnd]; |
---|
4042 | if ([result successIsSet]) { |
---|
4043 | return [result success]; |
---|
4044 | } |
---|
4045 | if ([result ouchIsSet]) { |
---|
4046 | @throw [result ouch]; |
---|
4047 | } |
---|
4048 | @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT |
---|
4049 | reason: @"close failed: unknown result"]; |
---|
4050 | } |
---|
4051 | |
---|
4052 | - (BOOL) close: (ThriftHandle *) out |
---|
4053 | { |
---|
4054 | [self send_close: out]; |
---|
4055 | return [self recv_close]; |
---|
4056 | } |
---|
4057 | |
---|
4058 | - (void) send_rm: (Pathname *) path : (BOOL) recursive |
---|
4059 | { |
---|
4060 | [outProtocol writeMessageBeginWithName: @"rm" type: TMessageType_CALL sequenceID: 0]; |
---|
4061 | [outProtocol writeStructBeginWithName: @"rm_args"]; |
---|
4062 | if (path != nil) { |
---|
4063 | [outProtocol writeFieldBeginWithName: @"path" type: TType_STRUCT fieldID: 1]; |
---|
4064 | [path write: outProtocol]; |
---|
4065 | [outProtocol writeFieldEnd]; |
---|
4066 | } |
---|
4067 | [outProtocol writeFieldBeginWithName: @"recursive" type: TType_BOOL fieldID: 2]; |
---|
4068 | [outProtocol writeBool: recursive]; |
---|
4069 | [outProtocol writeFieldEnd]; |
---|
4070 | [outProtocol writeFieldStop]; |
---|
4071 | [outProtocol writeStructEnd]; |
---|
4072 | [outProtocol writeMessageEnd]; |
---|
4073 | [[outProtocol transport] flush]; |
---|
4074 | } |
---|
4075 | |
---|
4076 | - (BOOL) recv_rm |
---|
4077 | { |
---|
4078 | int msgType = 0; |
---|
4079 | [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL]; |
---|
4080 | if (msgType == TMessageType_EXCEPTION) { |
---|
4081 | TApplicationException * x = [TApplicationException read: inProtocol]; |
---|
4082 | [inProtocol readMessageEnd]; |
---|
4083 | @throw x; |
---|
4084 | } |
---|
4085 | RmResult_ * result = [[[RmResult_ alloc] init] autorelease]; |
---|
4086 | [result read: inProtocol]; |
---|
4087 | [inProtocol readMessageEnd]; |
---|
4088 | if ([result successIsSet]) { |
---|
4089 | return [result success]; |
---|
4090 | } |
---|
4091 | if ([result ouchIsSet]) { |
---|
4092 | @throw [result ouch]; |
---|
4093 | } |
---|
4094 | @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT |
---|
4095 | reason: @"rm failed: unknown result"]; |
---|
4096 | } |
---|
4097 | |
---|
4098 | - (BOOL) rm: (Pathname *) path : (BOOL) recursive |
---|
4099 | { |
---|
4100 | [self send_rm: path : recursive]; |
---|
4101 | return [self recv_rm]; |
---|
4102 | } |
---|
4103 | |
---|
4104 | - (void) send_rename: (Pathname *) path : (Pathname *) dest |
---|
4105 | { |
---|
4106 | [outProtocol writeMessageBeginWithName: @"rename" type: TMessageType_CALL sequenceID: 0]; |
---|
4107 | [outProtocol writeStructBeginWithName: @"rename_args"]; |
---|
4108 | if (path != nil) { |
---|
4109 | [outProtocol writeFieldBeginWithName: @"path" type: TType_STRUCT fieldID: 1]; |
---|
4110 | [path write: outProtocol]; |
---|
4111 | [outProtocol writeFieldEnd]; |
---|
4112 | } |
---|
4113 | if (dest != nil) { |
---|
4114 | [outProtocol writeFieldBeginWithName: @"dest" type: TType_STRUCT fieldID: 2]; |
---|
4115 | [dest write: outProtocol]; |
---|
4116 | [outProtocol writeFieldEnd]; |
---|
4117 | } |
---|
4118 | [outProtocol writeFieldStop]; |
---|
4119 | [outProtocol writeStructEnd]; |
---|
4120 | [outProtocol writeMessageEnd]; |
---|
4121 | [[outProtocol transport] flush]; |
---|
4122 | } |
---|
4123 | |
---|
4124 | - (BOOL) recv_rename |
---|
4125 | { |
---|
4126 | int msgType = 0; |
---|
4127 | [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL]; |
---|
4128 | if (msgType == TMessageType_EXCEPTION) { |
---|
4129 | TApplicationException * x = [TApplicationException read: inProtocol]; |
---|
4130 | [inProtocol readMessageEnd]; |
---|
4131 | @throw x; |
---|
4132 | } |
---|
4133 | RenameResult_ * result = [[[RenameResult_ alloc] init] autorelease]; |
---|
4134 | [result read: inProtocol]; |
---|
4135 | [inProtocol readMessageEnd]; |
---|
4136 | if ([result successIsSet]) { |
---|
4137 | return [result success]; |
---|
4138 | } |
---|
4139 | if ([result ouchIsSet]) { |
---|
4140 | @throw [result ouch]; |
---|
4141 | } |
---|
4142 | @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT |
---|
4143 | reason: @"rename failed: unknown result"]; |
---|
4144 | } |
---|
4145 | |
---|
4146 | - (BOOL) rename: (Pathname *) path : (Pathname *) dest |
---|
4147 | { |
---|
4148 | [self send_rename: path : dest]; |
---|
4149 | return [self recv_rename]; |
---|
4150 | } |
---|
4151 | |
---|
4152 | - (void) send_mkdirs: (Pathname *) path |
---|
4153 | { |
---|
4154 | [outProtocol writeMessageBeginWithName: @"mkdirs" type: TMessageType_CALL sequenceID: 0]; |
---|
4155 | [outProtocol writeStructBeginWithName: @"mkdirs_args"]; |
---|
4156 | if (path != nil) { |
---|
4157 | [outProtocol writeFieldBeginWithName: @"path" type: TType_STRUCT fieldID: 1]; |
---|
4158 | [path write: outProtocol]; |
---|
4159 | [outProtocol writeFieldEnd]; |
---|
4160 | } |
---|
4161 | [outProtocol writeFieldStop]; |
---|
4162 | [outProtocol writeStructEnd]; |
---|
4163 | [outProtocol writeMessageEnd]; |
---|
4164 | [[outProtocol transport] flush]; |
---|
4165 | } |
---|
4166 | |
---|
4167 | - (BOOL) recv_mkdirs |
---|
4168 | { |
---|
4169 | int msgType = 0; |
---|
4170 | [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL]; |
---|
4171 | if (msgType == TMessageType_EXCEPTION) { |
---|
4172 | TApplicationException * x = [TApplicationException read: inProtocol]; |
---|
4173 | [inProtocol readMessageEnd]; |
---|
4174 | @throw x; |
---|
4175 | } |
---|
4176 | MkdirsResult_ * result = [[[MkdirsResult_ alloc] init] autorelease]; |
---|
4177 | [result read: inProtocol]; |
---|
4178 | [inProtocol readMessageEnd]; |
---|
4179 | if ([result successIsSet]) { |
---|
4180 | return [result success]; |
---|
4181 | } |
---|
4182 | if ([result ouchIsSet]) { |
---|
4183 | @throw [result ouch]; |
---|
4184 | } |
---|
4185 | @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT |
---|
4186 | reason: @"mkdirs failed: unknown result"]; |
---|
4187 | } |
---|
4188 | |
---|
4189 | - (BOOL) mkdirs: (Pathname *) path |
---|
4190 | { |
---|
4191 | [self send_mkdirs: path]; |
---|
4192 | return [self recv_mkdirs]; |
---|
4193 | } |
---|
4194 | |
---|
4195 | - (void) send_exists: (Pathname *) path |
---|
4196 | { |
---|
4197 | [outProtocol writeMessageBeginWithName: @"exists" type: TMessageType_CALL sequenceID: 0]; |
---|
4198 | [outProtocol writeStructBeginWithName: @"exists_args"]; |
---|
4199 | if (path != nil) { |
---|
4200 | [outProtocol writeFieldBeginWithName: @"path" type: TType_STRUCT fieldID: 1]; |
---|
4201 | [path write: outProtocol]; |
---|
4202 | [outProtocol writeFieldEnd]; |
---|
4203 | } |
---|
4204 | [outProtocol writeFieldStop]; |
---|
4205 | [outProtocol writeStructEnd]; |
---|
4206 | [outProtocol writeMessageEnd]; |
---|
4207 | [[outProtocol transport] flush]; |
---|
4208 | } |
---|
4209 | |
---|
4210 | - (BOOL) recv_exists |
---|
4211 | { |
---|
4212 | int msgType = 0; |
---|
4213 | [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL]; |
---|
4214 | if (msgType == TMessageType_EXCEPTION) { |
---|
4215 | TApplicationException * x = [TApplicationException read: inProtocol]; |
---|
4216 | [inProtocol readMessageEnd]; |
---|
4217 | @throw x; |
---|
4218 | } |
---|
4219 | ExistsResult_ * result = [[[ExistsResult_ alloc] init] autorelease]; |
---|
4220 | [result read: inProtocol]; |
---|
4221 | [inProtocol readMessageEnd]; |
---|
4222 | if ([result successIsSet]) { |
---|
4223 | return [result success]; |
---|
4224 | } |
---|
4225 | if ([result ouchIsSet]) { |
---|
4226 | @throw [result ouch]; |
---|
4227 | } |
---|
4228 | @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT |
---|
4229 | reason: @"exists failed: unknown result"]; |
---|
4230 | } |
---|
4231 | |
---|
4232 | - (BOOL) exists: (Pathname *) path |
---|
4233 | { |
---|
4234 | [self send_exists: path]; |
---|
4235 | return [self recv_exists]; |
---|
4236 | } |
---|
4237 | |
---|
4238 | - (void) send_stat: (Pathname *) path |
---|
4239 | { |
---|
4240 | [outProtocol writeMessageBeginWithName: @"stat" type: TMessageType_CALL sequenceID: 0]; |
---|
4241 | [outProtocol writeStructBeginWithName: @"stat_args"]; |
---|
4242 | if (path != nil) { |
---|
4243 | [outProtocol writeFieldBeginWithName: @"path" type: TType_STRUCT fieldID: 1]; |
---|
4244 | [path write: outProtocol]; |
---|
4245 | [outProtocol writeFieldEnd]; |
---|
4246 | } |
---|
4247 | [outProtocol writeFieldStop]; |
---|
4248 | [outProtocol writeStructEnd]; |
---|
4249 | [outProtocol writeMessageEnd]; |
---|
4250 | [[outProtocol transport] flush]; |
---|
4251 | } |
---|
4252 | |
---|
4253 | - (FileStatus *) recv_stat |
---|
4254 | { |
---|
4255 | int msgType = 0; |
---|
4256 | [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL]; |
---|
4257 | if (msgType == TMessageType_EXCEPTION) { |
---|
4258 | TApplicationException * x = [TApplicationException read: inProtocol]; |
---|
4259 | [inProtocol readMessageEnd]; |
---|
4260 | @throw x; |
---|
4261 | } |
---|
4262 | StatResult_ * result = [[[StatResult_ alloc] init] autorelease]; |
---|
4263 | [result read: inProtocol]; |
---|
4264 | [inProtocol readMessageEnd]; |
---|
4265 | if ([result successIsSet]) { |
---|
4266 | return [result success]; |
---|
4267 | } |
---|
4268 | if ([result ouchIsSet]) { |
---|
4269 | @throw [result ouch]; |
---|
4270 | } |
---|
4271 | @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT |
---|
4272 | reason: @"stat failed: unknown result"]; |
---|
4273 | } |
---|
4274 | |
---|
4275 | - (FileStatus *) stat: (Pathname *) path |
---|
4276 | { |
---|
4277 | [self send_stat: path]; |
---|
4278 | return [self recv_stat]; |
---|
4279 | } |
---|
4280 | |
---|
4281 | - (void) send_listStatus: (Pathname *) path |
---|
4282 | { |
---|
4283 | [outProtocol writeMessageBeginWithName: @"listStatus" type: TMessageType_CALL sequenceID: 0]; |
---|
4284 | [outProtocol writeStructBeginWithName: @"listStatus_args"]; |
---|
4285 | if (path != nil) { |
---|
4286 | [outProtocol writeFieldBeginWithName: @"path" type: TType_STRUCT fieldID: 1]; |
---|
4287 | [path write: outProtocol]; |
---|
4288 | [outProtocol writeFieldEnd]; |
---|
4289 | } |
---|
4290 | [outProtocol writeFieldStop]; |
---|
4291 | [outProtocol writeStructEnd]; |
---|
4292 | [outProtocol writeMessageEnd]; |
---|
4293 | [[outProtocol transport] flush]; |
---|
4294 | } |
---|
4295 | |
---|
4296 | - (NSArray *) recv_listStatus |
---|
4297 | { |
---|
4298 | int msgType = 0; |
---|
4299 | [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL]; |
---|
4300 | if (msgType == TMessageType_EXCEPTION) { |
---|
4301 | TApplicationException * x = [TApplicationException read: inProtocol]; |
---|
4302 | [inProtocol readMessageEnd]; |
---|
4303 | @throw x; |
---|
4304 | } |
---|
4305 | ListStatusResult_ * result = [[[ListStatusResult_ alloc] init] autorelease]; |
---|
4306 | [result read: inProtocol]; |
---|
4307 | [inProtocol readMessageEnd]; |
---|
4308 | if ([result successIsSet]) { |
---|
4309 | return [result success]; |
---|
4310 | } |
---|
4311 | if ([result ouchIsSet]) { |
---|
4312 | @throw [result ouch]; |
---|
4313 | } |
---|
4314 | @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT |
---|
4315 | reason: @"listStatus failed: unknown result"]; |
---|
4316 | } |
---|
4317 | |
---|
4318 | - (NSArray *) listStatus: (Pathname *) path |
---|
4319 | { |
---|
4320 | [self send_listStatus: path]; |
---|
4321 | return [self recv_listStatus]; |
---|
4322 | } |
---|
4323 | |
---|
4324 | - (void) send_chmod: (Pathname *) path : (int16_t) mode |
---|
4325 | { |
---|
4326 | [outProtocol writeMessageBeginWithName: @"chmod" type: TMessageType_CALL sequenceID: 0]; |
---|
4327 | [outProtocol writeStructBeginWithName: @"chmod_args"]; |
---|
4328 | if (path != nil) { |
---|
4329 | [outProtocol writeFieldBeginWithName: @"path" type: TType_STRUCT fieldID: 1]; |
---|
4330 | [path write: outProtocol]; |
---|
4331 | [outProtocol writeFieldEnd]; |
---|
4332 | } |
---|
4333 | [outProtocol writeFieldBeginWithName: @"mode" type: TType_I16 fieldID: 2]; |
---|
4334 | [outProtocol writeI16: mode]; |
---|
4335 | [outProtocol writeFieldEnd]; |
---|
4336 | [outProtocol writeFieldStop]; |
---|
4337 | [outProtocol writeStructEnd]; |
---|
4338 | [outProtocol writeMessageEnd]; |
---|
4339 | [[outProtocol transport] flush]; |
---|
4340 | } |
---|
4341 | |
---|
4342 | - (void) recv_chmod |
---|
4343 | { |
---|
4344 | int msgType = 0; |
---|
4345 | [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL]; |
---|
4346 | if (msgType == TMessageType_EXCEPTION) { |
---|
4347 | TApplicationException * x = [TApplicationException read: inProtocol]; |
---|
4348 | [inProtocol readMessageEnd]; |
---|
4349 | @throw x; |
---|
4350 | } |
---|
4351 | ChmodResult_ * result = [[[ChmodResult_ alloc] init] autorelease]; |
---|
4352 | [result read: inProtocol]; |
---|
4353 | [inProtocol readMessageEnd]; |
---|
4354 | if ([result ouchIsSet]) { |
---|
4355 | @throw [result ouch]; |
---|
4356 | } |
---|
4357 | return; |
---|
4358 | } |
---|
4359 | |
---|
4360 | - (void) chmod: (Pathname *) path : (int16_t) mode |
---|
4361 | { |
---|
4362 | [self send_chmod: path : mode]; |
---|
4363 | [self recv_chmod]; |
---|
4364 | } |
---|
4365 | |
---|
4366 | - (void) send_chown: (Pathname *) path : (NSString *) owner : (NSString *) group |
---|
4367 | { |
---|
4368 | [outProtocol writeMessageBeginWithName: @"chown" type: TMessageType_CALL sequenceID: 0]; |
---|
4369 | [outProtocol writeStructBeginWithName: @"chown_args"]; |
---|
4370 | if (path != nil) { |
---|
4371 | [outProtocol writeFieldBeginWithName: @"path" type: TType_STRUCT fieldID: 1]; |
---|
4372 | [path write: outProtocol]; |
---|
4373 | [outProtocol writeFieldEnd]; |
---|
4374 | } |
---|
4375 | if (owner != nil) { |
---|
4376 | [outProtocol writeFieldBeginWithName: @"owner" type: TType_STRING fieldID: 2]; |
---|
4377 | [outProtocol writeString: owner]; |
---|
4378 | [outProtocol writeFieldEnd]; |
---|
4379 | } |
---|
4380 | if (group != nil) { |
---|
4381 | [outProtocol writeFieldBeginWithName: @"group" type: TType_STRING fieldID: 3]; |
---|
4382 | [outProtocol writeString: group]; |
---|
4383 | [outProtocol writeFieldEnd]; |
---|
4384 | } |
---|
4385 | [outProtocol writeFieldStop]; |
---|
4386 | [outProtocol writeStructEnd]; |
---|
4387 | [outProtocol writeMessageEnd]; |
---|
4388 | [[outProtocol transport] flush]; |
---|
4389 | } |
---|
4390 | |
---|
4391 | - (void) recv_chown |
---|
4392 | { |
---|
4393 | int msgType = 0; |
---|
4394 | [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL]; |
---|
4395 | if (msgType == TMessageType_EXCEPTION) { |
---|
4396 | TApplicationException * x = [TApplicationException read: inProtocol]; |
---|
4397 | [inProtocol readMessageEnd]; |
---|
4398 | @throw x; |
---|
4399 | } |
---|
4400 | ChownResult_ * result = [[[ChownResult_ alloc] init] autorelease]; |
---|
4401 | [result read: inProtocol]; |
---|
4402 | [inProtocol readMessageEnd]; |
---|
4403 | if ([result ouchIsSet]) { |
---|
4404 | @throw [result ouch]; |
---|
4405 | } |
---|
4406 | return; |
---|
4407 | } |
---|
4408 | |
---|
4409 | - (void) chown: (Pathname *) path : (NSString *) owner : (NSString *) group |
---|
4410 | { |
---|
4411 | [self send_chown: path : owner : group]; |
---|
4412 | [self recv_chown]; |
---|
4413 | } |
---|
4414 | |
---|
4415 | - (void) send_setReplication: (Pathname *) path : (int16_t) replication |
---|
4416 | { |
---|
4417 | [outProtocol writeMessageBeginWithName: @"setReplication" type: TMessageType_CALL sequenceID: 0]; |
---|
4418 | [outProtocol writeStructBeginWithName: @"setReplication_args"]; |
---|
4419 | if (path != nil) { |
---|
4420 | [outProtocol writeFieldBeginWithName: @"path" type: TType_STRUCT fieldID: 1]; |
---|
4421 | [path write: outProtocol]; |
---|
4422 | [outProtocol writeFieldEnd]; |
---|
4423 | } |
---|
4424 | [outProtocol writeFieldBeginWithName: @"replication" type: TType_I16 fieldID: 2]; |
---|
4425 | [outProtocol writeI16: replication]; |
---|
4426 | [outProtocol writeFieldEnd]; |
---|
4427 | [outProtocol writeFieldStop]; |
---|
4428 | [outProtocol writeStructEnd]; |
---|
4429 | [outProtocol writeMessageEnd]; |
---|
4430 | [[outProtocol transport] flush]; |
---|
4431 | } |
---|
4432 | |
---|
4433 | - (void) recv_setReplication |
---|
4434 | { |
---|
4435 | int msgType = 0; |
---|
4436 | [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL]; |
---|
4437 | if (msgType == TMessageType_EXCEPTION) { |
---|
4438 | TApplicationException * x = [TApplicationException read: inProtocol]; |
---|
4439 | [inProtocol readMessageEnd]; |
---|
4440 | @throw x; |
---|
4441 | } |
---|
4442 | SetReplicationResult_ * result = [[[SetReplicationResult_ alloc] init] autorelease]; |
---|
4443 | [result read: inProtocol]; |
---|
4444 | [inProtocol readMessageEnd]; |
---|
4445 | if ([result ouchIsSet]) { |
---|
4446 | @throw [result ouch]; |
---|
4447 | } |
---|
4448 | return; |
---|
4449 | } |
---|
4450 | |
---|
4451 | - (void) setReplication: (Pathname *) path : (int16_t) replication |
---|
4452 | { |
---|
4453 | [self send_setReplication: path : replication]; |
---|
4454 | [self recv_setReplication]; |
---|
4455 | } |
---|
4456 | |
---|
4457 | - (void) send_getFileBlockLocations: (Pathname *) path : (int64_t) start : (int64_t) length |
---|
4458 | { |
---|
4459 | [outProtocol writeMessageBeginWithName: @"getFileBlockLocations" type: TMessageType_CALL sequenceID: 0]; |
---|
4460 | [outProtocol writeStructBeginWithName: @"getFileBlockLocations_args"]; |
---|
4461 | if (path != nil) { |
---|
4462 | [outProtocol writeFieldBeginWithName: @"path" type: TType_STRUCT fieldID: 1]; |
---|
4463 | [path write: outProtocol]; |
---|
4464 | [outProtocol writeFieldEnd]; |
---|
4465 | } |
---|
4466 | [outProtocol writeFieldBeginWithName: @"start" type: TType_I64 fieldID: 2]; |
---|
4467 | [outProtocol writeI64: start]; |
---|
4468 | [outProtocol writeFieldEnd]; |
---|
4469 | [outProtocol writeFieldBeginWithName: @"length" type: TType_I64 fieldID: 3]; |
---|
4470 | [outProtocol writeI64: length]; |
---|
4471 | [outProtocol writeFieldEnd]; |
---|
4472 | [outProtocol writeFieldStop]; |
---|
4473 | [outProtocol writeStructEnd]; |
---|
4474 | [outProtocol writeMessageEnd]; |
---|
4475 | [[outProtocol transport] flush]; |
---|
4476 | } |
---|
4477 | |
---|
4478 | - (NSArray *) recv_getFileBlockLocations |
---|
4479 | { |
---|
4480 | int msgType = 0; |
---|
4481 | [inProtocol readMessageBeginReturningName: nil type: &msgType sequenceID: NULL]; |
---|
4482 | if (msgType == TMessageType_EXCEPTION) { |
---|
4483 | TApplicationException * x = [TApplicationException read: inProtocol]; |
---|
4484 | [inProtocol readMessageEnd]; |
---|
4485 | @throw x; |
---|
4486 | } |
---|
4487 | GetFileBlockLocationsResult_ * result = [[[GetFileBlockLocationsResult_ alloc] init] autorelease]; |
---|
4488 | [result read: inProtocol]; |
---|
4489 | [inProtocol readMessageEnd]; |
---|
4490 | if ([result successIsSet]) { |
---|
4491 | return [result success]; |
---|
4492 | } |
---|
4493 | if ([result ouchIsSet]) { |
---|
4494 | @throw [result ouch]; |
---|
4495 | } |
---|
4496 | @throw [TApplicationException exceptionWithType: TApplicationException_MISSING_RESULT |
---|
4497 | reason: @"getFileBlockLocations failed: unknown result"]; |
---|
4498 | } |
---|
4499 | |
---|
4500 | - (NSArray *) getFileBlockLocations: (Pathname *) path : (int64_t) start : (int64_t) length |
---|
4501 | { |
---|
4502 | [self send_getFileBlockLocations: path : start : length]; |
---|
4503 | return [self recv_getFileBlockLocations]; |
---|
4504 | } |
---|
4505 | |
---|
4506 | @end |
---|
4507 | |
---|