PageRenderTime 54ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 1ms

/projects/hadoop-1.1.2/src/contrib/thriftfs/gen-cocoa/hadoopfs.m

https://gitlab.com/essere.lab.public/qualitas.class-corpus
Objective C | 2160 lines | 1861 code | 294 blank | 5 comment | 232 complexity | 60be62a3e5b8a5f8af193be9b383312b MD5 | raw file
  1. /**
  2. * Autogenerated by Thrift
  3. *
  4. * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  5. */
  6. #import <Cocoa/Cocoa.h>
  7. #import <TProtocol.h>
  8. #import <TApplicationException.h>
  9. #import <TProtocolUtil.h>
  10. #import "hadoopfs.h"
  11. @implementation hadoopfsConstants
  12. + (void) initialize {
  13. }
  14. @end
  15. @implementation ThriftHandle
  16. - (id) initWithId: (int64_t) id
  17. {
  18. self = [super init];
  19. __id = id;
  20. __id_isset = YES;
  21. return self;
  22. }
  23. - (void) dealloc
  24. {
  25. [super dealloc];
  26. }
  27. - (int64_t) id {
  28. return __id;
  29. }
  30. - (void) setId: (int64_t) id {
  31. __id = id;
  32. __id_isset = YES;
  33. }
  34. - (BOOL) idIsSet {
  35. return __id_isset;
  36. }
  37. - (void) unsetId {
  38. __id_isset = NO;
  39. }
  40. - (void) read: (id <TProtocol>) inProtocol
  41. {
  42. NSString * fieldName;
  43. int fieldType;
  44. int fieldID;
  45. [inProtocol readStructBeginReturningName: NULL];
  46. while (true)
  47. {
  48. [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
  49. if (fieldType == TType_STOP) {
  50. break;
  51. }
  52. switch (fieldID)
  53. {
  54. case -1:
  55. if (fieldType == TType_I64) {
  56. int64_t fieldValue = [inProtocol readI64];
  57. [self setId: fieldValue];
  58. } else {
  59. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  60. }
  61. break;
  62. default:
  63. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  64. break;
  65. }
  66. [inProtocol readFieldEnd];
  67. }
  68. [inProtocol readStructEnd];
  69. }
  70. - (void) write: (id <TProtocol>) outProtocol {
  71. [outProtocol writeStructBeginWithName: @"ThriftHandle"];
  72. if (__id_isset) {
  73. [outProtocol writeFieldBeginWithName: @"id" type: TType_I64 fieldID: -1];
  74. [outProtocol writeI64: __id];
  75. [outProtocol writeFieldEnd];
  76. }
  77. [outProtocol writeFieldStop];
  78. [outProtocol writeStructEnd];
  79. }
  80. - (NSString *) description {
  81. NSMutableString * ms = [NSMutableString stringWithString: @"ThriftHandle("];
  82. [ms appendString: @"id:"];
  83. [ms appendFormat: @"%qi", __id];
  84. [ms appendString: @")"];
  85. return [ms copy];
  86. }
  87. @end
  88. @implementation Pathname
  89. - (id) initWithPathname: (NSString *) pathname
  90. {
  91. self = [super init];
  92. __pathname = [pathname retain];
  93. __pathname_isset = YES;
  94. return self;
  95. }
  96. - (void) dealloc
  97. {
  98. [__pathname release];
  99. [super dealloc];
  100. }
  101. - (NSString *) pathname {
  102. return [[__pathname retain] autorelease];
  103. }
  104. - (void) setPathname: (NSString *) pathname {
  105. [pathname retain];
  106. [__pathname release];
  107. __pathname = pathname;
  108. __pathname_isset = YES;
  109. }
  110. - (BOOL) pathnameIsSet {
  111. return __pathname_isset;
  112. }
  113. - (void) unsetPathname {
  114. [__pathname release];
  115. __pathname = nil;
  116. __pathname_isset = NO;
  117. }
  118. - (void) read: (id <TProtocol>) inProtocol
  119. {
  120. NSString * fieldName;
  121. int fieldType;
  122. int fieldID;
  123. [inProtocol readStructBeginReturningName: NULL];
  124. while (true)
  125. {
  126. [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
  127. if (fieldType == TType_STOP) {
  128. break;
  129. }
  130. switch (fieldID)
  131. {
  132. case -1:
  133. if (fieldType == TType_STRING) {
  134. NSString * fieldValue = [inProtocol readString];
  135. [self setPathname: fieldValue];
  136. } else {
  137. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  138. }
  139. break;
  140. default:
  141. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  142. break;
  143. }
  144. [inProtocol readFieldEnd];
  145. }
  146. [inProtocol readStructEnd];
  147. }
  148. - (void) write: (id <TProtocol>) outProtocol {
  149. [outProtocol writeStructBeginWithName: @"Pathname"];
  150. if (__pathname_isset) {
  151. if (__pathname != nil) {
  152. [outProtocol writeFieldBeginWithName: @"pathname" type: TType_STRING fieldID: -1];
  153. [outProtocol writeString: __pathname];
  154. [outProtocol writeFieldEnd];
  155. }
  156. }
  157. [outProtocol writeFieldStop];
  158. [outProtocol writeStructEnd];
  159. }
  160. - (NSString *) description {
  161. NSMutableString * ms = [NSMutableString stringWithString: @"Pathname("];
  162. [ms appendString: @"pathname:"];
  163. [ms appendFormat: @"\"%@\"", __pathname];
  164. [ms appendString: @")"];
  165. return [ms copy];
  166. }
  167. @end
  168. @implementation FileStatus
  169. - (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
  170. {
  171. self = [super init];
  172. __path = [path retain];
  173. __path_isset = YES;
  174. __length = length;
  175. __length_isset = YES;
  176. __isdir = isdir;
  177. __isdir_isset = YES;
  178. __block_replication = block_replication;
  179. __block_replication_isset = YES;
  180. __blocksize = blocksize;
  181. __blocksize_isset = YES;
  182. __modification_time = modification_time;
  183. __modification_time_isset = YES;
  184. __permission = [permission retain];
  185. __permission_isset = YES;
  186. __owner = [owner retain];
  187. __owner_isset = YES;
  188. __group = [group retain];
  189. __group_isset = YES;
  190. return self;
  191. }
  192. - (void) dealloc
  193. {
  194. [__path release];
  195. [__permission release];
  196. [__owner release];
  197. [__group release];
  198. [super dealloc];
  199. }
  200. - (NSString *) path {
  201. return [[__path retain] autorelease];
  202. }
  203. - (void) setPath: (NSString *) path {
  204. [path retain];
  205. [__path release];
  206. __path = path;
  207. __path_isset = YES;
  208. }
  209. - (BOOL) pathIsSet {
  210. return __path_isset;
  211. }
  212. - (void) unsetPath {
  213. [__path release];
  214. __path = nil;
  215. __path_isset = NO;
  216. }
  217. - (int64_t) length {
  218. return __length;
  219. }
  220. - (void) setLength: (int64_t) length {
  221. __length = length;
  222. __length_isset = YES;
  223. }
  224. - (BOOL) lengthIsSet {
  225. return __length_isset;
  226. }
  227. - (void) unsetLength {
  228. __length_isset = NO;
  229. }
  230. - (BOOL) isdir {
  231. return __isdir;
  232. }
  233. - (void) setIsdir: (BOOL) isdir {
  234. __isdir = isdir;
  235. __isdir_isset = YES;
  236. }
  237. - (BOOL) isdirIsSet {
  238. return __isdir_isset;
  239. }
  240. - (void) unsetIsdir {
  241. __isdir_isset = NO;
  242. }
  243. - (int16_t) block_replication {
  244. return __block_replication;
  245. }
  246. - (void) setBlock_replication: (int16_t) block_replication {
  247. __block_replication = block_replication;
  248. __block_replication_isset = YES;
  249. }
  250. - (BOOL) block_replicationIsSet {
  251. return __block_replication_isset;
  252. }
  253. - (void) unsetBlock_replication {
  254. __block_replication_isset = NO;
  255. }
  256. - (int64_t) blocksize {
  257. return __blocksize;
  258. }
  259. - (void) setBlocksize: (int64_t) blocksize {
  260. __blocksize = blocksize;
  261. __blocksize_isset = YES;
  262. }
  263. - (BOOL) blocksizeIsSet {
  264. return __blocksize_isset;
  265. }
  266. - (void) unsetBlocksize {
  267. __blocksize_isset = NO;
  268. }
  269. - (int64_t) modification_time {
  270. return __modification_time;
  271. }
  272. - (void) setModification_time: (int64_t) modification_time {
  273. __modification_time = modification_time;
  274. __modification_time_isset = YES;
  275. }
  276. - (BOOL) modification_timeIsSet {
  277. return __modification_time_isset;
  278. }
  279. - (void) unsetModification_time {
  280. __modification_time_isset = NO;
  281. }
  282. - (NSString *) permission {
  283. return [[__permission retain] autorelease];
  284. }
  285. - (void) setPermission: (NSString *) permission {
  286. [permission retain];
  287. [__permission release];
  288. __permission = permission;
  289. __permission_isset = YES;
  290. }
  291. - (BOOL) permissionIsSet {
  292. return __permission_isset;
  293. }
  294. - (void) unsetPermission {
  295. [__permission release];
  296. __permission = nil;
  297. __permission_isset = NO;
  298. }
  299. - (NSString *) owner {
  300. return [[__owner retain] autorelease];
  301. }
  302. - (void) setOwner: (NSString *) owner {
  303. [owner retain];
  304. [__owner release];
  305. __owner = owner;
  306. __owner_isset = YES;
  307. }
  308. - (BOOL) ownerIsSet {
  309. return __owner_isset;
  310. }
  311. - (void) unsetOwner {
  312. [__owner release];
  313. __owner = nil;
  314. __owner_isset = NO;
  315. }
  316. - (NSString *) group {
  317. return [[__group retain] autorelease];
  318. }
  319. - (void) setGroup: (NSString *) group {
  320. [group retain];
  321. [__group release];
  322. __group = group;
  323. __group_isset = YES;
  324. }
  325. - (BOOL) groupIsSet {
  326. return __group_isset;
  327. }
  328. - (void) unsetGroup {
  329. [__group release];
  330. __group = nil;
  331. __group_isset = NO;
  332. }
  333. - (void) read: (id <TProtocol>) inProtocol
  334. {
  335. NSString * fieldName;
  336. int fieldType;
  337. int fieldID;
  338. [inProtocol readStructBeginReturningName: NULL];
  339. while (true)
  340. {
  341. [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
  342. if (fieldType == TType_STOP) {
  343. break;
  344. }
  345. switch (fieldID)
  346. {
  347. case 1:
  348. if (fieldType == TType_STRING) {
  349. NSString * fieldValue = [inProtocol readString];
  350. [self setPath: fieldValue];
  351. } else {
  352. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  353. }
  354. break;
  355. case 2:
  356. if (fieldType == TType_I64) {
  357. int64_t fieldValue = [inProtocol readI64];
  358. [self setLength: fieldValue];
  359. } else {
  360. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  361. }
  362. break;
  363. case 3:
  364. if (fieldType == TType_BOOL) {
  365. BOOL fieldValue = [inProtocol readBool];
  366. [self setIsdir: fieldValue];
  367. } else {
  368. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  369. }
  370. break;
  371. case 4:
  372. if (fieldType == TType_I16) {
  373. int16_t fieldValue = [inProtocol readI16];
  374. [self setBlock_replication: fieldValue];
  375. } else {
  376. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  377. }
  378. break;
  379. case 5:
  380. if (fieldType == TType_I64) {
  381. int64_t fieldValue = [inProtocol readI64];
  382. [self setBlocksize: fieldValue];
  383. } else {
  384. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  385. }
  386. break;
  387. case 6:
  388. if (fieldType == TType_I64) {
  389. int64_t fieldValue = [inProtocol readI64];
  390. [self setModification_time: fieldValue];
  391. } else {
  392. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  393. }
  394. break;
  395. case 7:
  396. if (fieldType == TType_STRING) {
  397. NSString * fieldValue = [inProtocol readString];
  398. [self setPermission: fieldValue];
  399. } else {
  400. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  401. }
  402. break;
  403. case 8:
  404. if (fieldType == TType_STRING) {
  405. NSString * fieldValue = [inProtocol readString];
  406. [self setOwner: fieldValue];
  407. } else {
  408. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  409. }
  410. break;
  411. case 9:
  412. if (fieldType == TType_STRING) {
  413. NSString * fieldValue = [inProtocol readString];
  414. [self setGroup: fieldValue];
  415. } else {
  416. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  417. }
  418. break;
  419. default:
  420. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  421. break;
  422. }
  423. [inProtocol readFieldEnd];
  424. }
  425. [inProtocol readStructEnd];
  426. }
  427. - (void) write: (id <TProtocol>) outProtocol {
  428. [outProtocol writeStructBeginWithName: @"FileStatus"];
  429. if (__path_isset) {
  430. if (__path != nil) {
  431. [outProtocol writeFieldBeginWithName: @"path" type: TType_STRING fieldID: 1];
  432. [outProtocol writeString: __path];
  433. [outProtocol writeFieldEnd];
  434. }
  435. }
  436. if (__length_isset) {
  437. [outProtocol writeFieldBeginWithName: @"length" type: TType_I64 fieldID: 2];
  438. [outProtocol writeI64: __length];
  439. [outProtocol writeFieldEnd];
  440. }
  441. if (__isdir_isset) {
  442. [outProtocol writeFieldBeginWithName: @"isdir" type: TType_BOOL fieldID: 3];
  443. [outProtocol writeBool: __isdir];
  444. [outProtocol writeFieldEnd];
  445. }
  446. if (__block_replication_isset) {
  447. [outProtocol writeFieldBeginWithName: @"block_replication" type: TType_I16 fieldID: 4];
  448. [outProtocol writeI16: __block_replication];
  449. [outProtocol writeFieldEnd];
  450. }
  451. if (__blocksize_isset) {
  452. [outProtocol writeFieldBeginWithName: @"blocksize" type: TType_I64 fieldID: 5];
  453. [outProtocol writeI64: __blocksize];
  454. [outProtocol writeFieldEnd];
  455. }
  456. if (__modification_time_isset) {
  457. [outProtocol writeFieldBeginWithName: @"modification_time" type: TType_I64 fieldID: 6];
  458. [outProtocol writeI64: __modification_time];
  459. [outProtocol writeFieldEnd];
  460. }
  461. if (__permission_isset) {
  462. if (__permission != nil) {
  463. [outProtocol writeFieldBeginWithName: @"permission" type: TType_STRING fieldID: 7];
  464. [outProtocol writeString: __permission];
  465. [outProtocol writeFieldEnd];
  466. }
  467. }
  468. if (__owner_isset) {
  469. if (__owner != nil) {
  470. [outProtocol writeFieldBeginWithName: @"owner" type: TType_STRING fieldID: 8];
  471. [outProtocol writeString: __owner];
  472. [outProtocol writeFieldEnd];
  473. }
  474. }
  475. if (__group_isset) {
  476. if (__group != nil) {
  477. [outProtocol writeFieldBeginWithName: @"group" type: TType_STRING fieldID: 9];
  478. [outProtocol writeString: __group];
  479. [outProtocol writeFieldEnd];
  480. }
  481. }
  482. [outProtocol writeFieldStop];
  483. [outProtocol writeStructEnd];
  484. }
  485. - (NSString *) description {
  486. NSMutableString * ms = [NSMutableString stringWithString: @"FileStatus("];
  487. [ms appendString: @"path:"];
  488. [ms appendFormat: @"\"%@\"", __path];
  489. [ms appendString: @",length:"];
  490. [ms appendFormat: @"%qi", __length];
  491. [ms appendString: @",isdir:"];
  492. [ms appendFormat: @"%i", __isdir];
  493. [ms appendString: @",block_replication:"];
  494. [ms appendFormat: @"%hi", __block_replication];
  495. [ms appendString: @",blocksize:"];
  496. [ms appendFormat: @"%qi", __blocksize];
  497. [ms appendString: @",modification_time:"];
  498. [ms appendFormat: @"%qi", __modification_time];
  499. [ms appendString: @",permission:"];
  500. [ms appendFormat: @"\"%@\"", __permission];
  501. [ms appendString: @",owner:"];
  502. [ms appendFormat: @"\"%@\"", __owner];
  503. [ms appendString: @",group:"];
  504. [ms appendFormat: @"\"%@\"", __group];
  505. [ms appendString: @")"];
  506. return [ms copy];
  507. }
  508. @end
  509. @implementation BlockLocation
  510. - (id) initWithHosts: (NSArray *) hosts names: (NSArray *) names offset: (int64_t) offset length: (int64_t) length
  511. {
  512. self = [super init];
  513. __hosts = [hosts retain];
  514. __hosts_isset = YES;
  515. __names = [names retain];
  516. __names_isset = YES;
  517. __offset = offset;
  518. __offset_isset = YES;
  519. __length = length;
  520. __length_isset = YES;
  521. return self;
  522. }
  523. - (void) dealloc
  524. {
  525. [__hosts release];
  526. [__names release];
  527. [super dealloc];
  528. }
  529. - (NSArray *) hosts {
  530. return [[__hosts retain] autorelease];
  531. }
  532. - (void) setHosts: (NSArray *) hosts {
  533. [hosts retain];
  534. [__hosts release];
  535. __hosts = hosts;
  536. __hosts_isset = YES;
  537. }
  538. - (BOOL) hostsIsSet {
  539. return __hosts_isset;
  540. }
  541. - (void) unsetHosts {
  542. [__hosts release];
  543. __hosts = nil;
  544. __hosts_isset = NO;
  545. }
  546. - (NSArray *) names {
  547. return [[__names retain] autorelease];
  548. }
  549. - (void) setNames: (NSArray *) names {
  550. [names retain];
  551. [__names release];
  552. __names = names;
  553. __names_isset = YES;
  554. }
  555. - (BOOL) namesIsSet {
  556. return __names_isset;
  557. }
  558. - (void) unsetNames {
  559. [__names release];
  560. __names = nil;
  561. __names_isset = NO;
  562. }
  563. - (int64_t) offset {
  564. return __offset;
  565. }
  566. - (void) setOffset: (int64_t) offset {
  567. __offset = offset;
  568. __offset_isset = YES;
  569. }
  570. - (BOOL) offsetIsSet {
  571. return __offset_isset;
  572. }
  573. - (void) unsetOffset {
  574. __offset_isset = NO;
  575. }
  576. - (int64_t) length {
  577. return __length;
  578. }
  579. - (void) setLength: (int64_t) length {
  580. __length = length;
  581. __length_isset = YES;
  582. }
  583. - (BOOL) lengthIsSet {
  584. return __length_isset;
  585. }
  586. - (void) unsetLength {
  587. __length_isset = NO;
  588. }
  589. - (void) read: (id <TProtocol>) inProtocol
  590. {
  591. NSString * fieldName;
  592. int fieldType;
  593. int fieldID;
  594. [inProtocol readStructBeginReturningName: NULL];
  595. while (true)
  596. {
  597. [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
  598. if (fieldType == TType_STOP) {
  599. break;
  600. }
  601. switch (fieldID)
  602. {
  603. case 1:
  604. if (fieldType == TType_LIST) {
  605. int _size0;
  606. [inProtocol readListBeginReturningElementType: NULL size: &_size0];
  607. NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size0];
  608. int _i1;
  609. for (_i1 = 0; _i1 < _size0; ++_i1)
  610. {
  611. NSString * _elem2 = [inProtocol readString];
  612. [fieldValue addObject: _elem2];
  613. }
  614. [inProtocol readListEnd];
  615. [self setHosts: fieldValue];
  616. [fieldValue release];
  617. } else {
  618. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  619. }
  620. break;
  621. case 2:
  622. if (fieldType == TType_LIST) {
  623. int _size3;
  624. [inProtocol readListBeginReturningElementType: NULL size: &_size3];
  625. NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size3];
  626. int _i4;
  627. for (_i4 = 0; _i4 < _size3; ++_i4)
  628. {
  629. NSString * _elem5 = [inProtocol readString];
  630. [fieldValue addObject: _elem5];
  631. }
  632. [inProtocol readListEnd];
  633. [self setNames: fieldValue];
  634. [fieldValue release];
  635. } else {
  636. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  637. }
  638. break;
  639. case 3:
  640. if (fieldType == TType_I64) {
  641. int64_t fieldValue = [inProtocol readI64];
  642. [self setOffset: fieldValue];
  643. } else {
  644. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  645. }
  646. break;
  647. case 4:
  648. if (fieldType == TType_I64) {
  649. int64_t fieldValue = [inProtocol readI64];
  650. [self setLength: fieldValue];
  651. } else {
  652. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  653. }
  654. break;
  655. default:
  656. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  657. break;
  658. }
  659. [inProtocol readFieldEnd];
  660. }
  661. [inProtocol readStructEnd];
  662. }
  663. - (void) write: (id <TProtocol>) outProtocol {
  664. [outProtocol writeStructBeginWithName: @"BlockLocation"];
  665. if (__hosts_isset) {
  666. if (__hosts != nil) {
  667. [outProtocol writeFieldBeginWithName: @"hosts" type: TType_LIST fieldID: 1];
  668. {
  669. [outProtocol writeListBeginWithElementType: TType_STRING size: [__hosts count]];
  670. int i7;
  671. for (i7 = 0; i7 < [__hosts count]; i7++)
  672. {
  673. [outProtocol writeString: [__hosts objectAtIndex: i7]];
  674. }
  675. [outProtocol writeListEnd];
  676. }
  677. [outProtocol writeFieldEnd];
  678. }
  679. }
  680. if (__names_isset) {
  681. if (__names != nil) {
  682. [outProtocol writeFieldBeginWithName: @"names" type: TType_LIST fieldID: 2];
  683. {
  684. [outProtocol writeListBeginWithElementType: TType_STRING size: [__names count]];
  685. int i9;
  686. for (i9 = 0; i9 < [__names count]; i9++)
  687. {
  688. [outProtocol writeString: [__names objectAtIndex: i9]];
  689. }
  690. [outProtocol writeListEnd];
  691. }
  692. [outProtocol writeFieldEnd];
  693. }
  694. }
  695. if (__offset_isset) {
  696. [outProtocol writeFieldBeginWithName: @"offset" type: TType_I64 fieldID: 3];
  697. [outProtocol writeI64: __offset];
  698. [outProtocol writeFieldEnd];
  699. }
  700. if (__length_isset) {
  701. [outProtocol writeFieldBeginWithName: @"length" type: TType_I64 fieldID: 4];
  702. [outProtocol writeI64: __length];
  703. [outProtocol writeFieldEnd];
  704. }
  705. [outProtocol writeFieldStop];
  706. [outProtocol writeStructEnd];
  707. }
  708. - (NSString *) description {
  709. NSMutableString * ms = [NSMutableString stringWithString: @"BlockLocation("];
  710. [ms appendString: @"hosts:"];
  711. [ms appendFormat: @"%@", __hosts];
  712. [ms appendString: @",names:"];
  713. [ms appendFormat: @"%@", __names];
  714. [ms appendString: @",offset:"];
  715. [ms appendFormat: @"%qi", __offset];
  716. [ms appendString: @",length:"];
  717. [ms appendFormat: @"%qi", __length];
  718. [ms appendString: @")"];
  719. return [ms copy];
  720. }
  721. @end
  722. @implementation MalformedInputException
  723. - (id) init
  724. {
  725. return [super initWithName: @"MalformedInputException" reason: @"unknown" userInfo: nil];
  726. }
  727. - (id) initWithMessage: (NSString *) message
  728. {
  729. self = [self init];
  730. __message = [message retain];
  731. __message_isset = YES;
  732. return self;
  733. }
  734. - (void) dealloc
  735. {
  736. [__message release];
  737. [super dealloc];
  738. }
  739. - (NSString *) message {
  740. return [[__message retain] autorelease];
  741. }
  742. - (void) setMessage: (NSString *) message {
  743. [message retain];
  744. [__message release];
  745. __message = message;
  746. __message_isset = YES;
  747. }
  748. - (BOOL) messageIsSet {
  749. return __message_isset;
  750. }
  751. - (void) unsetMessage {
  752. [__message release];
  753. __message = nil;
  754. __message_isset = NO;
  755. }
  756. - (void) read: (id <TProtocol>) inProtocol
  757. {
  758. NSString * fieldName;
  759. int fieldType;
  760. int fieldID;
  761. [inProtocol readStructBeginReturningName: NULL];
  762. while (true)
  763. {
  764. [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
  765. if (fieldType == TType_STOP) {
  766. break;
  767. }
  768. switch (fieldID)
  769. {
  770. case -1:
  771. if (fieldType == TType_STRING) {
  772. NSString * fieldValue = [inProtocol readString];
  773. [self setMessage: fieldValue];
  774. } else {
  775. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  776. }
  777. break;
  778. default:
  779. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  780. break;
  781. }
  782. [inProtocol readFieldEnd];
  783. }
  784. [inProtocol readStructEnd];
  785. }
  786. - (void) write: (id <TProtocol>) outProtocol {
  787. [outProtocol writeStructBeginWithName: @"MalformedInputException"];
  788. if (__message_isset) {
  789. if (__message != nil) {
  790. [outProtocol writeFieldBeginWithName: @"message" type: TType_STRING fieldID: -1];
  791. [outProtocol writeString: __message];
  792. [outProtocol writeFieldEnd];
  793. }
  794. }
  795. [outProtocol writeFieldStop];
  796. [outProtocol writeStructEnd];
  797. }
  798. - (NSString *) description {
  799. NSMutableString * ms = [NSMutableString stringWithString: @"MalformedInputException("];
  800. [ms appendString: @"message:"];
  801. [ms appendFormat: @"\"%@\"", __message];
  802. [ms appendString: @")"];
  803. return [ms copy];
  804. }
  805. @end
  806. @implementation ThriftIOException
  807. - (id) init
  808. {
  809. return [super initWithName: @"ThriftIOException" reason: @"unknown" userInfo: nil];
  810. }
  811. - (id) initWithMessage: (NSString *) message
  812. {
  813. self = [self init];
  814. __message = [message retain];
  815. __message_isset = YES;
  816. return self;
  817. }
  818. - (void) dealloc
  819. {
  820. [__message release];
  821. [super dealloc];
  822. }
  823. - (NSString *) message {
  824. return [[__message retain] autorelease];
  825. }
  826. - (void) setMessage: (NSString *) message {
  827. [message retain];
  828. [__message release];
  829. __message = message;
  830. __message_isset = YES;
  831. }
  832. - (BOOL) messageIsSet {
  833. return __message_isset;
  834. }
  835. - (void) unsetMessage {
  836. [__message release];
  837. __message = nil;
  838. __message_isset = NO;
  839. }
  840. - (void) read: (id <TProtocol>) inProtocol
  841. {
  842. NSString * fieldName;
  843. int fieldType;
  844. int fieldID;
  845. [inProtocol readStructBeginReturningName: NULL];
  846. while (true)
  847. {
  848. [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
  849. if (fieldType == TType_STOP) {
  850. break;
  851. }
  852. switch (fieldID)
  853. {
  854. case -1:
  855. if (fieldType == TType_STRING) {
  856. NSString * fieldValue = [inProtocol readString];
  857. [self setMessage: fieldValue];
  858. } else {
  859. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  860. }
  861. break;
  862. default:
  863. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  864. break;
  865. }
  866. [inProtocol readFieldEnd];
  867. }
  868. [inProtocol readStructEnd];
  869. }
  870. - (void) write: (id <TProtocol>) outProtocol {
  871. [outProtocol writeStructBeginWithName: @"ThriftIOException"];
  872. if (__message_isset) {
  873. if (__message != nil) {
  874. [outProtocol writeFieldBeginWithName: @"message" type: TType_STRING fieldID: -1];
  875. [outProtocol writeString: __message];
  876. [outProtocol writeFieldEnd];
  877. }
  878. }
  879. [outProtocol writeFieldStop];
  880. [outProtocol writeStructEnd];
  881. }
  882. - (NSString *) description {
  883. NSMutableString * ms = [NSMutableString stringWithString: @"ThriftIOException("];
  884. [ms appendString: @"message:"];
  885. [ms appendFormat: @"\"%@\"", __message];
  886. [ms appendString: @")"];
  887. return [ms copy];
  888. }
  889. @end
  890. @interface SetInactivityTimeoutPeriodResult_ : NSObject {
  891. }
  892. - (void) read: (id <TProtocol>) inProtocol;
  893. - (void) write: (id <TProtocol>) outProtocol;
  894. @end
  895. @implementation SetInactivityTimeoutPeriodResult_
  896. - (void) read: (id <TProtocol>) inProtocol
  897. {
  898. NSString * fieldName;
  899. int fieldType;
  900. int fieldID;
  901. [inProtocol readStructBeginReturningName: NULL];
  902. while (true)
  903. {
  904. [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
  905. if (fieldType == TType_STOP) {
  906. break;
  907. }
  908. switch (fieldID)
  909. {
  910. default:
  911. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  912. break;
  913. }
  914. [inProtocol readFieldEnd];
  915. }
  916. [inProtocol readStructEnd];
  917. }
  918. - (void) write: (id <TProtocol>) outProtocol {
  919. [outProtocol writeStructBeginWithName: @"SetInactivityTimeoutPeriodResult_"];
  920. [outProtocol writeFieldStop];
  921. [outProtocol writeStructEnd];
  922. }
  923. - (NSString *) description {
  924. NSMutableString * ms = [NSMutableString stringWithString: @"SetInactivityTimeoutPeriodResult_("];
  925. [ms appendString: @")"];
  926. return [ms copy];
  927. }
  928. @end
  929. @interface ShutdownResult_ : NSObject {
  930. }
  931. - (void) read: (id <TProtocol>) inProtocol;
  932. - (void) write: (id <TProtocol>) outProtocol;
  933. @end
  934. @implementation ShutdownResult_
  935. - (void) read: (id <TProtocol>) inProtocol
  936. {
  937. NSString * fieldName;
  938. int fieldType;
  939. int fieldID;
  940. [inProtocol readStructBeginReturningName: NULL];
  941. while (true)
  942. {
  943. [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
  944. if (fieldType == TType_STOP) {
  945. break;
  946. }
  947. switch (fieldID)
  948. {
  949. default:
  950. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  951. break;
  952. }
  953. [inProtocol readFieldEnd];
  954. }
  955. [inProtocol readStructEnd];
  956. }
  957. - (void) write: (id <TProtocol>) outProtocol {
  958. [outProtocol writeStructBeginWithName: @"ShutdownResult_"];
  959. [outProtocol writeFieldStop];
  960. [outProtocol writeStructEnd];
  961. }
  962. - (NSString *) description {
  963. NSMutableString * ms = [NSMutableString stringWithString: @"ShutdownResult_("];
  964. [ms appendString: @")"];
  965. return [ms copy];
  966. }
  967. @end
  968. @interface CreateResult_ : NSObject {
  969. ThriftHandle * __success;
  970. ThriftIOException * __ouch;
  971. BOOL __success_isset;
  972. BOOL __ouch_isset;
  973. }
  974. - (id) initWithSuccess: (ThriftHandle *) success ouch: (ThriftIOException *) ouch;
  975. - (void) read: (id <TProtocol>) inProtocol;
  976. - (void) write: (id <TProtocol>) outProtocol;
  977. - (ThriftHandle *) success;
  978. - (void) setSuccess: (ThriftHandle *) success;
  979. - (BOOL) successIsSet;
  980. - (ThriftIOException *) ouch;
  981. - (void) setOuch: (ThriftIOException *) ouch;
  982. - (BOOL) ouchIsSet;
  983. @end
  984. @implementation CreateResult_
  985. - (id) initWithSuccess: (ThriftHandle *) success ouch: (ThriftIOException *) ouch
  986. {
  987. self = [super init];
  988. __success = [success retain];
  989. __success_isset = YES;
  990. __ouch = [ouch retain];
  991. __ouch_isset = YES;
  992. return self;
  993. }
  994. - (void) dealloc
  995. {
  996. [__success release];
  997. [__ouch release];
  998. [super dealloc];
  999. }
  1000. - (ThriftHandle *) success {
  1001. return [[__success retain] autorelease];
  1002. }
  1003. - (void) setSuccess: (ThriftHandle *) success {
  1004. [success retain];
  1005. [__success release];
  1006. __success = success;
  1007. __success_isset = YES;
  1008. }
  1009. - (BOOL) successIsSet {
  1010. return __success_isset;
  1011. }
  1012. - (void) unsetSuccess {
  1013. [__success release];
  1014. __success = nil;
  1015. __success_isset = NO;
  1016. }
  1017. - (ThriftIOException *) ouch {
  1018. return [[__ouch retain] autorelease];
  1019. }
  1020. - (void) setOuch: (ThriftIOException *) ouch {
  1021. [ouch retain];
  1022. [__ouch release];
  1023. __ouch = ouch;
  1024. __ouch_isset = YES;
  1025. }
  1026. - (BOOL) ouchIsSet {
  1027. return __ouch_isset;
  1028. }
  1029. - (void) unsetOuch {
  1030. [__ouch release];
  1031. __ouch = nil;
  1032. __ouch_isset = NO;
  1033. }
  1034. - (void) read: (id <TProtocol>) inProtocol
  1035. {
  1036. NSString * fieldName;
  1037. int fieldType;
  1038. int fieldID;
  1039. [inProtocol readStructBeginReturningName: NULL];
  1040. while (true)
  1041. {
  1042. [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
  1043. if (fieldType == TType_STOP) {
  1044. break;
  1045. }
  1046. switch (fieldID)
  1047. {
  1048. case 0:
  1049. if (fieldType == TType_STRUCT) {
  1050. ThriftHandle *fieldValue = [[ThriftHandle alloc] init];
  1051. [fieldValue read: inProtocol];
  1052. [self setSuccess: fieldValue];
  1053. [fieldValue release];
  1054. } else {
  1055. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  1056. }
  1057. break;
  1058. case 1:
  1059. if (fieldType == TType_STRUCT) {
  1060. ThriftIOException *fieldValue = [[ThriftIOException alloc] init];
  1061. [fieldValue read: inProtocol];
  1062. [self setOuch: fieldValue];
  1063. [fieldValue release];
  1064. } else {
  1065. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  1066. }
  1067. break;
  1068. default:
  1069. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  1070. break;
  1071. }
  1072. [inProtocol readFieldEnd];
  1073. }
  1074. [inProtocol readStructEnd];
  1075. }
  1076. - (void) write: (id <TProtocol>) outProtocol {
  1077. [outProtocol writeStructBeginWithName: @"CreateResult_"];
  1078. if (__success_isset) {
  1079. if (__success != nil) {
  1080. [outProtocol writeFieldBeginWithName: @"success" type: TType_STRUCT fieldID: 0];
  1081. [__success write: outProtocol];
  1082. [outProtocol writeFieldEnd];
  1083. }
  1084. } else if (__ouch_isset) {
  1085. if (__ouch != nil) {
  1086. [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1];
  1087. [__ouch write: outProtocol];
  1088. [outProtocol writeFieldEnd];
  1089. }
  1090. }
  1091. [outProtocol writeFieldStop];
  1092. [outProtocol writeStructEnd];
  1093. }
  1094. - (NSString *) description {
  1095. NSMutableString * ms = [NSMutableString stringWithString: @"CreateResult_("];
  1096. [ms appendString: @"success:"];
  1097. [ms appendFormat: @"%@", __success];
  1098. [ms appendString: @",ouch:"];
  1099. [ms appendFormat: @"%@", __ouch];
  1100. [ms appendString: @")"];
  1101. return [ms copy];
  1102. }
  1103. @end
  1104. @interface CreateFileResult_ : NSObject {
  1105. ThriftHandle * __success;
  1106. ThriftIOException * __ouch;
  1107. BOOL __success_isset;
  1108. BOOL __ouch_isset;
  1109. }
  1110. - (id) initWithSuccess: (ThriftHandle *) success ouch: (ThriftIOException *) ouch;
  1111. - (void) read: (id <TProtocol>) inProtocol;
  1112. - (void) write: (id <TProtocol>) outProtocol;
  1113. - (ThriftHandle *) success;
  1114. - (void) setSuccess: (ThriftHandle *) success;
  1115. - (BOOL) successIsSet;
  1116. - (ThriftIOException *) ouch;
  1117. - (void) setOuch: (ThriftIOException *) ouch;
  1118. - (BOOL) ouchIsSet;
  1119. @end
  1120. @implementation CreateFileResult_
  1121. - (id) initWithSuccess: (ThriftHandle *) success ouch: (ThriftIOException *) ouch
  1122. {
  1123. self = [super init];
  1124. __success = [success retain];
  1125. __success_isset = YES;
  1126. __ouch = [ouch retain];
  1127. __ouch_isset = YES;
  1128. return self;
  1129. }
  1130. - (void) dealloc
  1131. {
  1132. [__success release];
  1133. [__ouch release];
  1134. [super dealloc];
  1135. }
  1136. - (ThriftHandle *) success {
  1137. return [[__success retain] autorelease];
  1138. }
  1139. - (void) setSuccess: (ThriftHandle *) success {
  1140. [success retain];
  1141. [__success release];
  1142. __success = success;
  1143. __success_isset = YES;
  1144. }
  1145. - (BOOL) successIsSet {
  1146. return __success_isset;
  1147. }
  1148. - (void) unsetSuccess {
  1149. [__success release];
  1150. __success = nil;
  1151. __success_isset = NO;
  1152. }
  1153. - (ThriftIOException *) ouch {
  1154. return [[__ouch retain] autorelease];
  1155. }
  1156. - (void) setOuch: (ThriftIOException *) ouch {
  1157. [ouch retain];
  1158. [__ouch release];
  1159. __ouch = ouch;
  1160. __ouch_isset = YES;
  1161. }
  1162. - (BOOL) ouchIsSet {
  1163. return __ouch_isset;
  1164. }
  1165. - (void) unsetOuch {
  1166. [__ouch release];
  1167. __ouch = nil;
  1168. __ouch_isset = NO;
  1169. }
  1170. - (void) read: (id <TProtocol>) inProtocol
  1171. {
  1172. NSString * fieldName;
  1173. int fieldType;
  1174. int fieldID;
  1175. [inProtocol readStructBeginReturningName: NULL];
  1176. while (true)
  1177. {
  1178. [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
  1179. if (fieldType == TType_STOP) {
  1180. break;
  1181. }
  1182. switch (fieldID)
  1183. {
  1184. case 0:
  1185. if (fieldType == TType_STRUCT) {
  1186. ThriftHandle *fieldValue = [[ThriftHandle alloc] init];
  1187. [fieldValue read: inProtocol];
  1188. [self setSuccess: fieldValue];
  1189. [fieldValue release];
  1190. } else {
  1191. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  1192. }
  1193. break;
  1194. case 1:
  1195. if (fieldType == TType_STRUCT) {
  1196. ThriftIOException *fieldValue = [[ThriftIOException alloc] init];
  1197. [fieldValue read: inProtocol];
  1198. [self setOuch: fieldValue];
  1199. [fieldValue release];
  1200. } else {
  1201. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  1202. }
  1203. break;
  1204. default:
  1205. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  1206. break;
  1207. }
  1208. [inProtocol readFieldEnd];
  1209. }
  1210. [inProtocol readStructEnd];
  1211. }
  1212. - (void) write: (id <TProtocol>) outProtocol {
  1213. [outProtocol writeStructBeginWithName: @"CreateFileResult_"];
  1214. if (__success_isset) {
  1215. if (__success != nil) {
  1216. [outProtocol writeFieldBeginWithName: @"success" type: TType_STRUCT fieldID: 0];
  1217. [__success write: outProtocol];
  1218. [outProtocol writeFieldEnd];
  1219. }
  1220. } else if (__ouch_isset) {
  1221. if (__ouch != nil) {
  1222. [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1];
  1223. [__ouch write: outProtocol];
  1224. [outProtocol writeFieldEnd];
  1225. }
  1226. }
  1227. [outProtocol writeFieldStop];
  1228. [outProtocol writeStructEnd];
  1229. }
  1230. - (NSString *) description {
  1231. NSMutableString * ms = [NSMutableString stringWithString: @"CreateFileResult_("];
  1232. [ms appendString: @"success:"];
  1233. [ms appendFormat: @"%@", __success];
  1234. [ms appendString: @",ouch:"];
  1235. [ms appendFormat: @"%@", __ouch];
  1236. [ms appendString: @")"];
  1237. return [ms copy];
  1238. }
  1239. @end
  1240. @interface OpenResult_ : NSObject {
  1241. ThriftHandle * __success;
  1242. ThriftIOException * __ouch;
  1243. BOOL __success_isset;
  1244. BOOL __ouch_isset;
  1245. }
  1246. - (id) initWithSuccess: (ThriftHandle *) success ouch: (ThriftIOException *) ouch;
  1247. - (void) read: (id <TProtocol>) inProtocol;
  1248. - (void) write: (id <TProtocol>) outProtocol;
  1249. - (ThriftHandle *) success;
  1250. - (void) setSuccess: (ThriftHandle *) success;
  1251. - (BOOL) successIsSet;
  1252. - (ThriftIOException *) ouch;
  1253. - (void) setOuch: (ThriftIOException *) ouch;
  1254. - (BOOL) ouchIsSet;
  1255. @end
  1256. @implementation OpenResult_
  1257. - (id) initWithSuccess: (ThriftHandle *) success ouch: (ThriftIOException *) ouch
  1258. {
  1259. self = [super init];
  1260. __success = [success retain];
  1261. __success_isset = YES;
  1262. __ouch = [ouch retain];
  1263. __ouch_isset = YES;
  1264. return self;
  1265. }
  1266. - (void) dealloc
  1267. {
  1268. [__success release];
  1269. [__ouch release];
  1270. [super dealloc];
  1271. }
  1272. - (ThriftHandle *) success {
  1273. return [[__success retain] autorelease];
  1274. }
  1275. - (void) setSuccess: (ThriftHandle *) success {
  1276. [success retain];
  1277. [__success release];
  1278. __success = success;
  1279. __success_isset = YES;
  1280. }
  1281. - (BOOL) successIsSet {
  1282. return __success_isset;
  1283. }
  1284. - (void) unsetSuccess {
  1285. [__success release];
  1286. __success = nil;
  1287. __success_isset = NO;
  1288. }
  1289. - (ThriftIOException *) ouch {
  1290. return [[__ouch retain] autorelease];
  1291. }
  1292. - (void) setOuch: (ThriftIOException *) ouch {
  1293. [ouch retain];
  1294. [__ouch release];
  1295. __ouch = ouch;
  1296. __ouch_isset = YES;
  1297. }
  1298. - (BOOL) ouchIsSet {
  1299. return __ouch_isset;
  1300. }
  1301. - (void) unsetOuch {
  1302. [__ouch release];
  1303. __ouch = nil;
  1304. __ouch_isset = NO;
  1305. }
  1306. - (void) read: (id <TProtocol>) inProtocol
  1307. {
  1308. NSString * fieldName;
  1309. int fieldType;
  1310. int fieldID;
  1311. [inProtocol readStructBeginReturningName: NULL];
  1312. while (true)
  1313. {
  1314. [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
  1315. if (fieldType == TType_STOP) {
  1316. break;
  1317. }
  1318. switch (fieldID)
  1319. {
  1320. case 0:
  1321. if (fieldType == TType_STRUCT) {
  1322. ThriftHandle *fieldValue = [[ThriftHandle alloc] init];
  1323. [fieldValue read: inProtocol];
  1324. [self setSuccess: fieldValue];
  1325. [fieldValue release];
  1326. } else {
  1327. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  1328. }
  1329. break;
  1330. case 1:
  1331. if (fieldType == TType_STRUCT) {
  1332. ThriftIOException *fieldValue = [[ThriftIOException alloc] init];
  1333. [fieldValue read: inProtocol];
  1334. [self setOuch: fieldValue];
  1335. [fieldValue release];
  1336. } else {
  1337. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  1338. }
  1339. break;
  1340. default:
  1341. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  1342. break;
  1343. }
  1344. [inProtocol readFieldEnd];
  1345. }
  1346. [inProtocol readStructEnd];
  1347. }
  1348. - (void) write: (id <TProtocol>) outProtocol {
  1349. [outProtocol writeStructBeginWithName: @"OpenResult_"];
  1350. if (__success_isset) {
  1351. if (__success != nil) {
  1352. [outProtocol writeFieldBeginWithName: @"success" type: TType_STRUCT fieldID: 0];
  1353. [__success write: outProtocol];
  1354. [outProtocol writeFieldEnd];
  1355. }
  1356. } else if (__ouch_isset) {
  1357. if (__ouch != nil) {
  1358. [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1];
  1359. [__ouch write: outProtocol];
  1360. [outProtocol writeFieldEnd];
  1361. }
  1362. }
  1363. [outProtocol writeFieldStop];
  1364. [outProtocol writeStructEnd];
  1365. }
  1366. - (NSString *) description {
  1367. NSMutableString * ms = [NSMutableString stringWithString: @"OpenResult_("];
  1368. [ms appendString: @"success:"];
  1369. [ms appendFormat: @"%@", __success];
  1370. [ms appendString: @",ouch:"];
  1371. [ms appendFormat: @"%@", __ouch];
  1372. [ms appendString: @")"];
  1373. return [ms copy];
  1374. }
  1375. @end
  1376. @interface AppendResult_ : NSObject {
  1377. ThriftHandle * __success;
  1378. ThriftIOException * __ouch;
  1379. BOOL __success_isset;
  1380. BOOL __ouch_isset;
  1381. }
  1382. - (id) initWithSuccess: (ThriftHandle *) success ouch: (ThriftIOException *) ouch;
  1383. - (void) read: (id <TProtocol>) inProtocol;
  1384. - (void) write: (id <TProtocol>) outProtocol;
  1385. - (ThriftHandle *) success;
  1386. - (void) setSuccess: (ThriftHandle *) success;
  1387. - (BOOL) successIsSet;
  1388. - (ThriftIOException *) ouch;
  1389. - (void) setOuch: (ThriftIOException *) ouch;
  1390. - (BOOL) ouchIsSet;
  1391. @end
  1392. @implementation AppendResult_
  1393. - (id) initWithSuccess: (ThriftHandle *) success ouch: (ThriftIOException *) ouch
  1394. {
  1395. self = [super init];
  1396. __success = [success retain];
  1397. __success_isset = YES;
  1398. __ouch = [ouch retain];
  1399. __ouch_isset = YES;
  1400. return self;
  1401. }
  1402. - (void) dealloc
  1403. {
  1404. [__success release];
  1405. [__ouch release];
  1406. [super dealloc];
  1407. }
  1408. - (ThriftHandle *) success {
  1409. return [[__success retain] autorelease];
  1410. }
  1411. - (void) setSuccess: (ThriftHandle *) success {
  1412. [success retain];
  1413. [__success release];
  1414. __success = success;
  1415. __success_isset = YES;
  1416. }
  1417. - (BOOL) successIsSet {
  1418. return __success_isset;
  1419. }
  1420. - (void) unsetSuccess {
  1421. [__success release];
  1422. __success = nil;
  1423. __success_isset = NO;
  1424. }
  1425. - (ThriftIOException *) ouch {
  1426. return [[__ouch retain] autorelease];
  1427. }
  1428. - (void) setOuch: (ThriftIOException *) ouch {
  1429. [ouch retain];
  1430. [__ouch release];
  1431. __ouch = ouch;
  1432. __ouch_isset = YES;
  1433. }
  1434. - (BOOL) ouchIsSet {
  1435. return __ouch_isset;
  1436. }
  1437. - (void) unsetOuch {
  1438. [__ouch release];
  1439. __ouch = nil;
  1440. __ouch_isset = NO;
  1441. }
  1442. - (void) read: (id <TProtocol>) inProtocol
  1443. {
  1444. NSString * fieldName;
  1445. int fieldType;
  1446. int fieldID;
  1447. [inProtocol readStructBeginReturningName: NULL];
  1448. while (true)
  1449. {
  1450. [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
  1451. if (fieldType == TType_STOP) {
  1452. break;
  1453. }
  1454. switch (fieldID)
  1455. {
  1456. case 0:
  1457. if (fieldType == TType_STRUCT) {
  1458. ThriftHandle *fieldValue = [[ThriftHandle alloc] init];
  1459. [fieldValue read: inProtocol];
  1460. [self setSuccess: fieldValue];
  1461. [fieldValue release];
  1462. } else {
  1463. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  1464. }
  1465. break;
  1466. case 1:
  1467. if (fieldType == TType_STRUCT) {
  1468. ThriftIOException *fieldValue = [[ThriftIOException alloc] init];
  1469. [fieldValue read: inProtocol];
  1470. [self setOuch: fieldValue];
  1471. [fieldValue release];
  1472. } else {
  1473. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  1474. }
  1475. break;
  1476. default:
  1477. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  1478. break;
  1479. }
  1480. [inProtocol readFieldEnd];
  1481. }
  1482. [inProtocol readStructEnd];
  1483. }
  1484. - (void) write: (id <TProtocol>) outProtocol {
  1485. [outProtocol writeStructBeginWithName: @"AppendResult_"];
  1486. if (__success_isset) {
  1487. if (__success != nil) {
  1488. [outProtocol writeFieldBeginWithName: @"success" type: TType_STRUCT fieldID: 0];
  1489. [__success write: outProtocol];
  1490. [outProtocol writeFieldEnd];
  1491. }
  1492. } else if (__ouch_isset) {
  1493. if (__ouch != nil) {
  1494. [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1];
  1495. [__ouch write: outProtocol];
  1496. [outProtocol writeFieldEnd];
  1497. }
  1498. }
  1499. [outProtocol writeFieldStop];
  1500. [outProtocol writeStructEnd];
  1501. }
  1502. - (NSString *) description {
  1503. NSMutableString * ms = [NSMutableString stringWithString: @"AppendResult_("];
  1504. [ms appendString: @"success:"];
  1505. [ms appendFormat: @"%@", __success];
  1506. [ms appendString: @",ouch:"];
  1507. [ms appendFormat: @"%@", __ouch];
  1508. [ms appendString: @")"];
  1509. return [ms copy];
  1510. }
  1511. @end
  1512. @interface WriteResult_ : NSObject {
  1513. BOOL __success;
  1514. ThriftIOException * __ouch;
  1515. BOOL __success_isset;
  1516. BOOL __ouch_isset;
  1517. }
  1518. - (id) initWithSuccess: (BOOL) success ouch: (ThriftIOException *) ouch;
  1519. - (void) read: (id <TProtocol>) inProtocol;
  1520. - (void) write: (id <TProtocol>) outProtocol;
  1521. - (BOOL) success;
  1522. - (void) setSuccess: (BOOL) success;
  1523. - (BOOL) successIsSet;
  1524. - (ThriftIOException *) ouch;
  1525. - (void) setOuch: (ThriftIOException *) ouch;
  1526. - (BOOL) ouchIsSet;
  1527. @end
  1528. @implementation WriteResult_
  1529. - (id) initWithSuccess: (BOOL) success ouch: (ThriftIOException *) ouch
  1530. {
  1531. self = [super init];
  1532. __success = success;
  1533. __success_isset = YES;
  1534. __ouch = [ouch retain];
  1535. __ouch_isset = YES;
  1536. return self;
  1537. }
  1538. - (void) dealloc
  1539. {
  1540. [__ouch release];
  1541. [super dealloc];
  1542. }
  1543. - (BOOL) success {
  1544. return __success;
  1545. }
  1546. - (void) setSuccess: (BOOL) success {
  1547. __success = success;
  1548. __success_isset = YES;
  1549. }
  1550. - (BOOL) successIsSet {
  1551. return __success_isset;
  1552. }
  1553. - (void) unsetSuccess {
  1554. __success_isset = NO;
  1555. }
  1556. - (ThriftIOException *) ouch {
  1557. return [[__ouch retain] autorelease];
  1558. }
  1559. - (void) setOuch: (ThriftIOException *) ouch {
  1560. [ouch retain];
  1561. [__ouch release];
  1562. __ouch = ouch;
  1563. __ouch_isset = YES;
  1564. }
  1565. - (BOOL) ouchIsSet {
  1566. return __ouch_isset;
  1567. }
  1568. - (void) unsetOuch {
  1569. [__ouch release];
  1570. __ouch = nil;
  1571. __ouch_isset = NO;
  1572. }
  1573. - (void) read: (id <TProtocol>) inProtocol
  1574. {
  1575. NSString * fieldName;
  1576. int fieldType;
  1577. int fieldID;
  1578. [inProtocol readStructBeginReturningName: NULL];
  1579. while (true)
  1580. {
  1581. [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
  1582. if (fieldType == TType_STOP) {
  1583. break;
  1584. }
  1585. switch (fieldID)
  1586. {
  1587. case 0:
  1588. if (fieldType == TType_BOOL) {
  1589. BOOL fieldValue = [inProtocol readBool];
  1590. [self setSuccess: fieldValue];
  1591. } else {
  1592. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  1593. }
  1594. break;
  1595. case 1:
  1596. if (fieldType == TType_STRUCT) {
  1597. ThriftIOException *fieldValue = [[ThriftIOException alloc] init];
  1598. [fieldValue read: inProtocol];
  1599. [self setOuch: fieldValue];
  1600. [fieldValue release];
  1601. } else {
  1602. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  1603. }
  1604. break;
  1605. default:
  1606. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  1607. break;
  1608. }
  1609. [inProtocol readFieldEnd];
  1610. }
  1611. [inProtocol readStructEnd];
  1612. }
  1613. - (void) write: (id <TProtocol>) outProtocol {
  1614. [outProtocol writeStructBeginWithName: @"WriteResult_"];
  1615. if (__success_isset) {
  1616. [outProtocol writeFieldBeginWithName: @"success" type: TType_BOOL fieldID: 0];
  1617. [outProtocol writeBool: __success];
  1618. [outProtocol writeFieldEnd];
  1619. } else if (__ouch_isset) {
  1620. if (__ouch != nil) {
  1621. [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1];
  1622. [__ouch write: outProtocol];
  1623. [outProtocol writeFieldEnd];
  1624. }
  1625. }
  1626. [outProtocol writeFieldStop];
  1627. [outProtocol writeStructEnd];
  1628. }
  1629. - (NSString *) description {
  1630. NSMutableString * ms = [NSMutableString stringWithString: @"WriteResult_("];
  1631. [ms appendString: @"success:"];
  1632. [ms appendFormat: @"%i", __success];
  1633. [ms appendString: @",ouch:"];
  1634. [ms appendFormat: @"%@", __ouch];
  1635. [ms appendString: @")"];
  1636. return [ms copy];
  1637. }
  1638. @end
  1639. @interface ReadResult_ : NSObject {
  1640. NSString * __success;
  1641. ThriftIOException * __ouch;
  1642. BOOL __success_isset;
  1643. BOOL __ouch_isset;
  1644. }
  1645. - (id) initWithSuccess: (NSString *) success ouch: (ThriftIOException *) ouch;
  1646. - (void) read: (id <TProtocol>) inProtocol;
  1647. - (void) write: (id <TProtocol>) outProtocol;
  1648. - (NSString *) success;
  1649. - (void) setSuccess: (NSString *) success;
  1650. - (BOOL) successIsSet;
  1651. - (ThriftIOException *) ouch;
  1652. - (void) setOuch: (ThriftIOException *) ouch;
  1653. - (BOOL) ouchIsSet;
  1654. @end
  1655. @implementation ReadResult_
  1656. - (id) initWithSuccess: (NSString *) success ouch: (ThriftIOException *) ouch
  1657. {
  1658. self = [super init];
  1659. __success = [success retain];
  1660. __success_isset = YES;
  1661. __ouch = [ouch retain];
  1662. __ouch_isset = YES;
  1663. return self;
  1664. }
  1665. - (void) dealloc
  1666. {
  1667. [__success release];
  1668. [__ouch release];
  1669. [super dealloc];
  1670. }
  1671. - (NSString *) success {
  1672. return [[__success retain] autorelease];
  1673. }
  1674. - (void) setSuccess: (NSString *) success {
  1675. [success retain];
  1676. [__success release];
  1677. __success = success;
  1678. __success_isset = YES;
  1679. }
  1680. - (BOOL) successIsSet {
  1681. return __success_isset;
  1682. }
  1683. - (void) unsetSuccess {
  1684. [__success release];
  1685. __success = nil;
  1686. __success_isset = NO;
  1687. }
  1688. - (ThriftIOException *) ouch {
  1689. return [[__ouch retain] autorelease];
  1690. }
  1691. - (void) setOuch: (ThriftIOException *) ouch {
  1692. [ouch retain];
  1693. [__ouch release];
  1694. __ouch = ouch;
  1695. __ouch_isset = YES;
  1696. }
  1697. - (BOOL) ouchIsSet {
  1698. return __ouch_isset;
  1699. }
  1700. - (void) unsetOuch {
  1701. [__ouch release];
  1702. __ouch = nil;
  1703. __ouch_isset = NO;
  1704. }
  1705. - (void) read: (id <TProtocol>) inProtocol
  1706. {
  1707. NSString * fieldName;
  1708. int fieldType;
  1709. int fieldID;
  1710. [inProtocol readStructBeginReturningName: NULL];
  1711. while (true)
  1712. {
  1713. [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
  1714. if (fieldType == TType_STOP) {
  1715. break;
  1716. }
  1717. switch (fieldID)
  1718. {
  1719. case 0:
  1720. if (fieldType == TType_STRING) {
  1721. NSString * fieldValue = [inProtocol readString];
  1722. [self setSuccess: fieldValue];
  1723. } else {
  1724. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  1725. }
  1726. break;
  1727. case 1:
  1728. if (fieldType == TType_STRUCT) {
  1729. ThriftIOException *fieldValue = [[ThriftIOException alloc] init];
  1730. [fieldValue read: inProtocol];
  1731. [self setOuch: fieldValue];
  1732. [fieldValue release];
  1733. } else {
  1734. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  1735. }
  1736. break;
  1737. default:
  1738. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  1739. break;
  1740. }
  1741. [inProtocol readFieldEnd];
  1742. }
  1743. [inProtocol readStructEnd];
  1744. }
  1745. - (void) write: (id <TProtocol>) outProtocol {
  1746. [outProtocol writeStructBeginWithName: @"ReadResult_"];
  1747. if (__success_isset) {
  1748. if (__success != nil) {
  1749. [outProtocol writeFieldBeginWithName: @"success" type: TType_STRING fieldID: 0];
  1750. [outProtocol writeString: __success];
  1751. [outProtocol writeFieldEnd];
  1752. }
  1753. } else if (__ouch_isset) {
  1754. if (__ouch != nil) {
  1755. [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1];
  1756. [__ouch write: outProtocol];
  1757. [outProtocol writeFieldEnd];
  1758. }
  1759. }
  1760. [outProtocol writeFieldStop];
  1761. [outProtocol writeStructEnd];
  1762. }
  1763. - (NSString *) description {
  1764. NSMutableString * ms = [NSMutableString stringWithString: @"ReadResult_("];
  1765. [ms appendString: @"success:"];
  1766. [ms appendFormat: @"\"%@\"", __success];
  1767. [ms appendString: @",ouch:"];
  1768. [ms appendFormat: @"%@", __ouch];
  1769. [ms appendString: @")"];
  1770. return [ms copy];
  1771. }
  1772. @end
  1773. @interface CloseResult_ : NSObject {
  1774. BOOL __success;
  1775. ThriftIOException * __ouch;
  1776. BOOL __success_isset;
  1777. BOOL __ouch_isset;
  1778. }
  1779. - (id) initWithSuccess: (BOOL) success ouch: (ThriftIOException *) ouch;
  1780. - (void) read: (id <TProtocol>) inProtocol;
  1781. - (void) write: (id <TProtocol>) outProtocol;
  1782. - (BOOL) success;
  1783. - (void) setSuccess: (BOOL) success;
  1784. - (BOOL) successIsSet;
  1785. - (ThriftIOException *) ouch;
  1786. - (void) setOuch: (ThriftIOException *) ouch;
  1787. - (BOOL) ouchIsSet;
  1788. @end
  1789. @implementation CloseResult_
  1790. - (id) initWithSuccess: (BOOL) success ouch: (ThriftIOException *) ouch
  1791. {
  1792. self = [super init];
  1793. __success = success;
  1794. __success_isset = YES;
  1795. __ouch = [ouch retain];
  1796. __ouch_isset = YES;
  1797. return self;
  1798. }
  1799. - (void) dealloc
  1800. {
  1801. [__ouch release];
  1802. [super dealloc];
  1803. }
  1804. - (BOOL) success {
  1805. return __success;
  1806. }
  1807. - (void) setSuccess: (BOOL) success {
  1808. __success = success;
  1809. __success_isset = YES;
  1810. }
  1811. - (BOOL) successIsSet {
  1812. return __success_isset;
  1813. }
  1814. - (void) unsetSuccess {
  1815. __success_isset = NO;
  1816. }
  1817. - (ThriftIOException *) ouch {
  1818. return [[__ouch retain] autorelease];
  1819. }
  1820. - (void) setOuch: (ThriftIOException *) ouch {
  1821. [ouch retain];
  1822. [__ouch release];
  1823. __ouch = ouch;
  1824. __ouch_isset = YES;
  1825. }
  1826. - (BOOL) ouchIsSet {
  1827. return __ouch_isset;
  1828. }
  1829. - (void) unsetOuch {
  1830. [__ouch release];
  1831. __ouch = nil;
  1832. __ouch_isset = NO;
  1833. }
  1834. - (void) read: (id <TProtocol>) inProtocol
  1835. {
  1836. NSString * fieldName;
  1837. int fieldType;
  1838. int fieldID;
  1839. [inProtocol readStructBeginReturningName: NULL];
  1840. while (true)
  1841. {
  1842. [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
  1843. if (fieldType == TType_STOP) {
  1844. break;
  1845. }
  1846. switch (fieldID)
  1847. {
  1848. case 0:
  1849. if (fieldType == TType_BOOL) {
  1850. BOOL fieldValue = [inProtocol readBool];
  1851. [self setSuccess: fieldValue];
  1852. } else {
  1853. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  1854. }
  1855. break;
  1856. case 1:
  1857. if (fieldType == TType_STRUCT) {
  1858. ThriftIOException *fieldValue = [[ThriftIOException alloc] init];
  1859. [fieldValue read: inProtocol];
  1860. [self setOuch: fieldValue];
  1861. [fieldValue release];
  1862. } else {
  1863. [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
  1864. }
  1865. break;
  1866. default: