/projects/hadoop-1.1.2/src/contrib/thriftfs/gen-cocoa/hadoopfs.m
Objective C | 2160 lines | 1861 code | 294 blank | 5 comment | 232 complexity | 60be62a3e5b8a5f8af193be9b383312b MD5 | raw file
- /**
- * Autogenerated by Thrift
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- */
- #import <Cocoa/Cocoa.h>
- #import <TProtocol.h>
- #import <TApplicationException.h>
- #import <TProtocolUtil.h>
- #import "hadoopfs.h"
- @implementation hadoopfsConstants
- + (void) initialize {
- }
- @end
- @implementation ThriftHandle
- - (id) initWithId: (int64_t) id
- {
- self = [super init];
- __id = id;
- __id_isset = YES;
- return self;
- }
- - (void) dealloc
- {
- [super dealloc];
- }
- - (int64_t) id {
- return __id;
- }
- - (void) setId: (int64_t) id {
- __id = id;
- __id_isset = YES;
- }
- - (BOOL) idIsSet {
- return __id_isset;
- }
- - (void) unsetId {
- __id_isset = NO;
- }
- - (void) read: (id <TProtocol>) inProtocol
- {
- NSString * fieldName;
- int fieldType;
- int fieldID;
- [inProtocol readStructBeginReturningName: NULL];
- while (true)
- {
- [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
- if (fieldType == TType_STOP) {
- break;
- }
- switch (fieldID)
- {
- case -1:
- if (fieldType == TType_I64) {
- int64_t fieldValue = [inProtocol readI64];
- [self setId: fieldValue];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- default:
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- break;
- }
- [inProtocol readFieldEnd];
- }
- [inProtocol readStructEnd];
- }
- - (void) write: (id <TProtocol>) outProtocol {
- [outProtocol writeStructBeginWithName: @"ThriftHandle"];
- if (__id_isset) {
- [outProtocol writeFieldBeginWithName: @"id" type: TType_I64 fieldID: -1];
- [outProtocol writeI64: __id];
- [outProtocol writeFieldEnd];
- }
- [outProtocol writeFieldStop];
- [outProtocol writeStructEnd];
- }
- - (NSString *) description {
- NSMutableString * ms = [NSMutableString stringWithString: @"ThriftHandle("];
- [ms appendString: @"id:"];
- [ms appendFormat: @"%qi", __id];
- [ms appendString: @")"];
- return [ms copy];
- }
- @end
- @implementation Pathname
- - (id) initWithPathname: (NSString *) pathname
- {
- self = [super init];
- __pathname = [pathname retain];
- __pathname_isset = YES;
- return self;
- }
- - (void) dealloc
- {
- [__pathname release];
- [super dealloc];
- }
- - (NSString *) pathname {
- return [[__pathname retain] autorelease];
- }
- - (void) setPathname: (NSString *) pathname {
- [pathname retain];
- [__pathname release];
- __pathname = pathname;
- __pathname_isset = YES;
- }
- - (BOOL) pathnameIsSet {
- return __pathname_isset;
- }
- - (void) unsetPathname {
- [__pathname release];
- __pathname = nil;
- __pathname_isset = NO;
- }
- - (void) read: (id <TProtocol>) inProtocol
- {
- NSString * fieldName;
- int fieldType;
- int fieldID;
- [inProtocol readStructBeginReturningName: NULL];
- while (true)
- {
- [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
- if (fieldType == TType_STOP) {
- break;
- }
- switch (fieldID)
- {
- case -1:
- if (fieldType == TType_STRING) {
- NSString * fieldValue = [inProtocol readString];
- [self setPathname: fieldValue];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- default:
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- break;
- }
- [inProtocol readFieldEnd];
- }
- [inProtocol readStructEnd];
- }
- - (void) write: (id <TProtocol>) outProtocol {
- [outProtocol writeStructBeginWithName: @"Pathname"];
- if (__pathname_isset) {
- if (__pathname != nil) {
- [outProtocol writeFieldBeginWithName: @"pathname" type: TType_STRING fieldID: -1];
- [outProtocol writeString: __pathname];
- [outProtocol writeFieldEnd];
- }
- }
- [outProtocol writeFieldStop];
- [outProtocol writeStructEnd];
- }
- - (NSString *) description {
- NSMutableString * ms = [NSMutableString stringWithString: @"Pathname("];
- [ms appendString: @"pathname:"];
- [ms appendFormat: @"\"%@\"", __pathname];
- [ms appendString: @")"];
- return [ms copy];
- }
- @end
- @implementation FileStatus
- - (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
- {
- self = [super init];
- __path = [path retain];
- __path_isset = YES;
- __length = length;
- __length_isset = YES;
- __isdir = isdir;
- __isdir_isset = YES;
- __block_replication = block_replication;
- __block_replication_isset = YES;
- __blocksize = blocksize;
- __blocksize_isset = YES;
- __modification_time = modification_time;
- __modification_time_isset = YES;
- __permission = [permission retain];
- __permission_isset = YES;
- __owner = [owner retain];
- __owner_isset = YES;
- __group = [group retain];
- __group_isset = YES;
- return self;
- }
- - (void) dealloc
- {
- [__path release];
- [__permission release];
- [__owner release];
- [__group release];
- [super dealloc];
- }
- - (NSString *) path {
- return [[__path retain] autorelease];
- }
- - (void) setPath: (NSString *) path {
- [path retain];
- [__path release];
- __path = path;
- __path_isset = YES;
- }
- - (BOOL) pathIsSet {
- return __path_isset;
- }
- - (void) unsetPath {
- [__path release];
- __path = nil;
- __path_isset = NO;
- }
- - (int64_t) length {
- return __length;
- }
- - (void) setLength: (int64_t) length {
- __length = length;
- __length_isset = YES;
- }
- - (BOOL) lengthIsSet {
- return __length_isset;
- }
- - (void) unsetLength {
- __length_isset = NO;
- }
- - (BOOL) isdir {
- return __isdir;
- }
- - (void) setIsdir: (BOOL) isdir {
- __isdir = isdir;
- __isdir_isset = YES;
- }
- - (BOOL) isdirIsSet {
- return __isdir_isset;
- }
- - (void) unsetIsdir {
- __isdir_isset = NO;
- }
- - (int16_t) block_replication {
- return __block_replication;
- }
- - (void) setBlock_replication: (int16_t) block_replication {
- __block_replication = block_replication;
- __block_replication_isset = YES;
- }
- - (BOOL) block_replicationIsSet {
- return __block_replication_isset;
- }
- - (void) unsetBlock_replication {
- __block_replication_isset = NO;
- }
- - (int64_t) blocksize {
- return __blocksize;
- }
- - (void) setBlocksize: (int64_t) blocksize {
- __blocksize = blocksize;
- __blocksize_isset = YES;
- }
- - (BOOL) blocksizeIsSet {
- return __blocksize_isset;
- }
- - (void) unsetBlocksize {
- __blocksize_isset = NO;
- }
- - (int64_t) modification_time {
- return __modification_time;
- }
- - (void) setModification_time: (int64_t) modification_time {
- __modification_time = modification_time;
- __modification_time_isset = YES;
- }
- - (BOOL) modification_timeIsSet {
- return __modification_time_isset;
- }
- - (void) unsetModification_time {
- __modification_time_isset = NO;
- }
- - (NSString *) permission {
- return [[__permission retain] autorelease];
- }
- - (void) setPermission: (NSString *) permission {
- [permission retain];
- [__permission release];
- __permission = permission;
- __permission_isset = YES;
- }
- - (BOOL) permissionIsSet {
- return __permission_isset;
- }
- - (void) unsetPermission {
- [__permission release];
- __permission = nil;
- __permission_isset = NO;
- }
- - (NSString *) owner {
- return [[__owner retain] autorelease];
- }
- - (void) setOwner: (NSString *) owner {
- [owner retain];
- [__owner release];
- __owner = owner;
- __owner_isset = YES;
- }
- - (BOOL) ownerIsSet {
- return __owner_isset;
- }
- - (void) unsetOwner {
- [__owner release];
- __owner = nil;
- __owner_isset = NO;
- }
- - (NSString *) group {
- return [[__group retain] autorelease];
- }
- - (void) setGroup: (NSString *) group {
- [group retain];
- [__group release];
- __group = group;
- __group_isset = YES;
- }
- - (BOOL) groupIsSet {
- return __group_isset;
- }
- - (void) unsetGroup {
- [__group release];
- __group = nil;
- __group_isset = NO;
- }
- - (void) read: (id <TProtocol>) inProtocol
- {
- NSString * fieldName;
- int fieldType;
- int fieldID;
- [inProtocol readStructBeginReturningName: NULL];
- while (true)
- {
- [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
- if (fieldType == TType_STOP) {
- break;
- }
- switch (fieldID)
- {
- case 1:
- if (fieldType == TType_STRING) {
- NSString * fieldValue = [inProtocol readString];
- [self setPath: fieldValue];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 2:
- if (fieldType == TType_I64) {
- int64_t fieldValue = [inProtocol readI64];
- [self setLength: fieldValue];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 3:
- if (fieldType == TType_BOOL) {
- BOOL fieldValue = [inProtocol readBool];
- [self setIsdir: fieldValue];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 4:
- if (fieldType == TType_I16) {
- int16_t fieldValue = [inProtocol readI16];
- [self setBlock_replication: fieldValue];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 5:
- if (fieldType == TType_I64) {
- int64_t fieldValue = [inProtocol readI64];
- [self setBlocksize: fieldValue];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 6:
- if (fieldType == TType_I64) {
- int64_t fieldValue = [inProtocol readI64];
- [self setModification_time: fieldValue];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 7:
- if (fieldType == TType_STRING) {
- NSString * fieldValue = [inProtocol readString];
- [self setPermission: fieldValue];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 8:
- if (fieldType == TType_STRING) {
- NSString * fieldValue = [inProtocol readString];
- [self setOwner: fieldValue];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 9:
- if (fieldType == TType_STRING) {
- NSString * fieldValue = [inProtocol readString];
- [self setGroup: fieldValue];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- default:
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- break;
- }
- [inProtocol readFieldEnd];
- }
- [inProtocol readStructEnd];
- }
- - (void) write: (id <TProtocol>) outProtocol {
- [outProtocol writeStructBeginWithName: @"FileStatus"];
- if (__path_isset) {
- if (__path != nil) {
- [outProtocol writeFieldBeginWithName: @"path" type: TType_STRING fieldID: 1];
- [outProtocol writeString: __path];
- [outProtocol writeFieldEnd];
- }
- }
- if (__length_isset) {
- [outProtocol writeFieldBeginWithName: @"length" type: TType_I64 fieldID: 2];
- [outProtocol writeI64: __length];
- [outProtocol writeFieldEnd];
- }
- if (__isdir_isset) {
- [outProtocol writeFieldBeginWithName: @"isdir" type: TType_BOOL fieldID: 3];
- [outProtocol writeBool: __isdir];
- [outProtocol writeFieldEnd];
- }
- if (__block_replication_isset) {
- [outProtocol writeFieldBeginWithName: @"block_replication" type: TType_I16 fieldID: 4];
- [outProtocol writeI16: __block_replication];
- [outProtocol writeFieldEnd];
- }
- if (__blocksize_isset) {
- [outProtocol writeFieldBeginWithName: @"blocksize" type: TType_I64 fieldID: 5];
- [outProtocol writeI64: __blocksize];
- [outProtocol writeFieldEnd];
- }
- if (__modification_time_isset) {
- [outProtocol writeFieldBeginWithName: @"modification_time" type: TType_I64 fieldID: 6];
- [outProtocol writeI64: __modification_time];
- [outProtocol writeFieldEnd];
- }
- if (__permission_isset) {
- if (__permission != nil) {
- [outProtocol writeFieldBeginWithName: @"permission" type: TType_STRING fieldID: 7];
- [outProtocol writeString: __permission];
- [outProtocol writeFieldEnd];
- }
- }
- if (__owner_isset) {
- if (__owner != nil) {
- [outProtocol writeFieldBeginWithName: @"owner" type: TType_STRING fieldID: 8];
- [outProtocol writeString: __owner];
- [outProtocol writeFieldEnd];
- }
- }
- if (__group_isset) {
- if (__group != nil) {
- [outProtocol writeFieldBeginWithName: @"group" type: TType_STRING fieldID: 9];
- [outProtocol writeString: __group];
- [outProtocol writeFieldEnd];
- }
- }
- [outProtocol writeFieldStop];
- [outProtocol writeStructEnd];
- }
- - (NSString *) description {
- NSMutableString * ms = [NSMutableString stringWithString: @"FileStatus("];
- [ms appendString: @"path:"];
- [ms appendFormat: @"\"%@\"", __path];
- [ms appendString: @",length:"];
- [ms appendFormat: @"%qi", __length];
- [ms appendString: @",isdir:"];
- [ms appendFormat: @"%i", __isdir];
- [ms appendString: @",block_replication:"];
- [ms appendFormat: @"%hi", __block_replication];
- [ms appendString: @",blocksize:"];
- [ms appendFormat: @"%qi", __blocksize];
- [ms appendString: @",modification_time:"];
- [ms appendFormat: @"%qi", __modification_time];
- [ms appendString: @",permission:"];
- [ms appendFormat: @"\"%@\"", __permission];
- [ms appendString: @",owner:"];
- [ms appendFormat: @"\"%@\"", __owner];
- [ms appendString: @",group:"];
- [ms appendFormat: @"\"%@\"", __group];
- [ms appendString: @")"];
- return [ms copy];
- }
- @end
- @implementation BlockLocation
- - (id) initWithHosts: (NSArray *) hosts names: (NSArray *) names offset: (int64_t) offset length: (int64_t) length
- {
- self = [super init];
- __hosts = [hosts retain];
- __hosts_isset = YES;
- __names = [names retain];
- __names_isset = YES;
- __offset = offset;
- __offset_isset = YES;
- __length = length;
- __length_isset = YES;
- return self;
- }
- - (void) dealloc
- {
- [__hosts release];
- [__names release];
- [super dealloc];
- }
- - (NSArray *) hosts {
- return [[__hosts retain] autorelease];
- }
- - (void) setHosts: (NSArray *) hosts {
- [hosts retain];
- [__hosts release];
- __hosts = hosts;
- __hosts_isset = YES;
- }
- - (BOOL) hostsIsSet {
- return __hosts_isset;
- }
- - (void) unsetHosts {
- [__hosts release];
- __hosts = nil;
- __hosts_isset = NO;
- }
- - (NSArray *) names {
- return [[__names retain] autorelease];
- }
- - (void) setNames: (NSArray *) names {
- [names retain];
- [__names release];
- __names = names;
- __names_isset = YES;
- }
- - (BOOL) namesIsSet {
- return __names_isset;
- }
- - (void) unsetNames {
- [__names release];
- __names = nil;
- __names_isset = NO;
- }
- - (int64_t) offset {
- return __offset;
- }
- - (void) setOffset: (int64_t) offset {
- __offset = offset;
- __offset_isset = YES;
- }
- - (BOOL) offsetIsSet {
- return __offset_isset;
- }
- - (void) unsetOffset {
- __offset_isset = NO;
- }
- - (int64_t) length {
- return __length;
- }
- - (void) setLength: (int64_t) length {
- __length = length;
- __length_isset = YES;
- }
- - (BOOL) lengthIsSet {
- return __length_isset;
- }
- - (void) unsetLength {
- __length_isset = NO;
- }
- - (void) read: (id <TProtocol>) inProtocol
- {
- NSString * fieldName;
- int fieldType;
- int fieldID;
- [inProtocol readStructBeginReturningName: NULL];
- while (true)
- {
- [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
- if (fieldType == TType_STOP) {
- break;
- }
- switch (fieldID)
- {
- case 1:
- if (fieldType == TType_LIST) {
- int _size0;
- [inProtocol readListBeginReturningElementType: NULL size: &_size0];
- NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size0];
- int _i1;
- for (_i1 = 0; _i1 < _size0; ++_i1)
- {
- NSString * _elem2 = [inProtocol readString];
- [fieldValue addObject: _elem2];
- }
- [inProtocol readListEnd];
- [self setHosts: fieldValue];
- [fieldValue release];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 2:
- if (fieldType == TType_LIST) {
- int _size3;
- [inProtocol readListBeginReturningElementType: NULL size: &_size3];
- NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size3];
- int _i4;
- for (_i4 = 0; _i4 < _size3; ++_i4)
- {
- NSString * _elem5 = [inProtocol readString];
- [fieldValue addObject: _elem5];
- }
- [inProtocol readListEnd];
- [self setNames: fieldValue];
- [fieldValue release];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 3:
- if (fieldType == TType_I64) {
- int64_t fieldValue = [inProtocol readI64];
- [self setOffset: fieldValue];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 4:
- if (fieldType == TType_I64) {
- int64_t fieldValue = [inProtocol readI64];
- [self setLength: fieldValue];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- default:
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- break;
- }
- [inProtocol readFieldEnd];
- }
- [inProtocol readStructEnd];
- }
- - (void) write: (id <TProtocol>) outProtocol {
- [outProtocol writeStructBeginWithName: @"BlockLocation"];
- if (__hosts_isset) {
- if (__hosts != nil) {
- [outProtocol writeFieldBeginWithName: @"hosts" type: TType_LIST fieldID: 1];
- {
- [outProtocol writeListBeginWithElementType: TType_STRING size: [__hosts count]];
- int i7;
- for (i7 = 0; i7 < [__hosts count]; i7++)
- {
- [outProtocol writeString: [__hosts objectAtIndex: i7]];
- }
- [outProtocol writeListEnd];
- }
- [outProtocol writeFieldEnd];
- }
- }
- if (__names_isset) {
- if (__names != nil) {
- [outProtocol writeFieldBeginWithName: @"names" type: TType_LIST fieldID: 2];
- {
- [outProtocol writeListBeginWithElementType: TType_STRING size: [__names count]];
- int i9;
- for (i9 = 0; i9 < [__names count]; i9++)
- {
- [outProtocol writeString: [__names objectAtIndex: i9]];
- }
- [outProtocol writeListEnd];
- }
- [outProtocol writeFieldEnd];
- }
- }
- if (__offset_isset) {
- [outProtocol writeFieldBeginWithName: @"offset" type: TType_I64 fieldID: 3];
- [outProtocol writeI64: __offset];
- [outProtocol writeFieldEnd];
- }
- if (__length_isset) {
- [outProtocol writeFieldBeginWithName: @"length" type: TType_I64 fieldID: 4];
- [outProtocol writeI64: __length];
- [outProtocol writeFieldEnd];
- }
- [outProtocol writeFieldStop];
- [outProtocol writeStructEnd];
- }
- - (NSString *) description {
- NSMutableString * ms = [NSMutableString stringWithString: @"BlockLocation("];
- [ms appendString: @"hosts:"];
- [ms appendFormat: @"%@", __hosts];
- [ms appendString: @",names:"];
- [ms appendFormat: @"%@", __names];
- [ms appendString: @",offset:"];
- [ms appendFormat: @"%qi", __offset];
- [ms appendString: @",length:"];
- [ms appendFormat: @"%qi", __length];
- [ms appendString: @")"];
- return [ms copy];
- }
- @end
- @implementation MalformedInputException
- - (id) init
- {
- return [super initWithName: @"MalformedInputException" reason: @"unknown" userInfo: nil];
- }
- - (id) initWithMessage: (NSString *) message
- {
- self = [self init];
- __message = [message retain];
- __message_isset = YES;
- return self;
- }
- - (void) dealloc
- {
- [__message release];
- [super dealloc];
- }
- - (NSString *) message {
- return [[__message retain] autorelease];
- }
- - (void) setMessage: (NSString *) message {
- [message retain];
- [__message release];
- __message = message;
- __message_isset = YES;
- }
- - (BOOL) messageIsSet {
- return __message_isset;
- }
- - (void) unsetMessage {
- [__message release];
- __message = nil;
- __message_isset = NO;
- }
- - (void) read: (id <TProtocol>) inProtocol
- {
- NSString * fieldName;
- int fieldType;
- int fieldID;
- [inProtocol readStructBeginReturningName: NULL];
- while (true)
- {
- [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
- if (fieldType == TType_STOP) {
- break;
- }
- switch (fieldID)
- {
- case -1:
- if (fieldType == TType_STRING) {
- NSString * fieldValue = [inProtocol readString];
- [self setMessage: fieldValue];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- default:
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- break;
- }
- [inProtocol readFieldEnd];
- }
- [inProtocol readStructEnd];
- }
- - (void) write: (id <TProtocol>) outProtocol {
- [outProtocol writeStructBeginWithName: @"MalformedInputException"];
- if (__message_isset) {
- if (__message != nil) {
- [outProtocol writeFieldBeginWithName: @"message" type: TType_STRING fieldID: -1];
- [outProtocol writeString: __message];
- [outProtocol writeFieldEnd];
- }
- }
- [outProtocol writeFieldStop];
- [outProtocol writeStructEnd];
- }
- - (NSString *) description {
- NSMutableString * ms = [NSMutableString stringWithString: @"MalformedInputException("];
- [ms appendString: @"message:"];
- [ms appendFormat: @"\"%@\"", __message];
- [ms appendString: @")"];
- return [ms copy];
- }
- @end
- @implementation ThriftIOException
- - (id) init
- {
- return [super initWithName: @"ThriftIOException" reason: @"unknown" userInfo: nil];
- }
- - (id) initWithMessage: (NSString *) message
- {
- self = [self init];
- __message = [message retain];
- __message_isset = YES;
- return self;
- }
- - (void) dealloc
- {
- [__message release];
- [super dealloc];
- }
- - (NSString *) message {
- return [[__message retain] autorelease];
- }
- - (void) setMessage: (NSString *) message {
- [message retain];
- [__message release];
- __message = message;
- __message_isset = YES;
- }
- - (BOOL) messageIsSet {
- return __message_isset;
- }
- - (void) unsetMessage {
- [__message release];
- __message = nil;
- __message_isset = NO;
- }
- - (void) read: (id <TProtocol>) inProtocol
- {
- NSString * fieldName;
- int fieldType;
- int fieldID;
- [inProtocol readStructBeginReturningName: NULL];
- while (true)
- {
- [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
- if (fieldType == TType_STOP) {
- break;
- }
- switch (fieldID)
- {
- case -1:
- if (fieldType == TType_STRING) {
- NSString * fieldValue = [inProtocol readString];
- [self setMessage: fieldValue];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- default:
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- break;
- }
- [inProtocol readFieldEnd];
- }
- [inProtocol readStructEnd];
- }
- - (void) write: (id <TProtocol>) outProtocol {
- [outProtocol writeStructBeginWithName: @"ThriftIOException"];
- if (__message_isset) {
- if (__message != nil) {
- [outProtocol writeFieldBeginWithName: @"message" type: TType_STRING fieldID: -1];
- [outProtocol writeString: __message];
- [outProtocol writeFieldEnd];
- }
- }
- [outProtocol writeFieldStop];
- [outProtocol writeStructEnd];
- }
- - (NSString *) description {
- NSMutableString * ms = [NSMutableString stringWithString: @"ThriftIOException("];
- [ms appendString: @"message:"];
- [ms appendFormat: @"\"%@\"", __message];
- [ms appendString: @")"];
- return [ms copy];
- }
- @end
- @interface SetInactivityTimeoutPeriodResult_ : NSObject {
- }
- - (void) read: (id <TProtocol>) inProtocol;
- - (void) write: (id <TProtocol>) outProtocol;
- @end
- @implementation SetInactivityTimeoutPeriodResult_
- - (void) read: (id <TProtocol>) inProtocol
- {
- NSString * fieldName;
- int fieldType;
- int fieldID;
- [inProtocol readStructBeginReturningName: NULL];
- while (true)
- {
- [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
- if (fieldType == TType_STOP) {
- break;
- }
- switch (fieldID)
- {
- default:
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- break;
- }
- [inProtocol readFieldEnd];
- }
- [inProtocol readStructEnd];
- }
- - (void) write: (id <TProtocol>) outProtocol {
- [outProtocol writeStructBeginWithName: @"SetInactivityTimeoutPeriodResult_"];
- [outProtocol writeFieldStop];
- [outProtocol writeStructEnd];
- }
- - (NSString *) description {
- NSMutableString * ms = [NSMutableString stringWithString: @"SetInactivityTimeoutPeriodResult_("];
- [ms appendString: @")"];
- return [ms copy];
- }
- @end
- @interface ShutdownResult_ : NSObject {
- }
- - (void) read: (id <TProtocol>) inProtocol;
- - (void) write: (id <TProtocol>) outProtocol;
- @end
- @implementation ShutdownResult_
- - (void) read: (id <TProtocol>) inProtocol
- {
- NSString * fieldName;
- int fieldType;
- int fieldID;
- [inProtocol readStructBeginReturningName: NULL];
- while (true)
- {
- [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
- if (fieldType == TType_STOP) {
- break;
- }
- switch (fieldID)
- {
- default:
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- break;
- }
- [inProtocol readFieldEnd];
- }
- [inProtocol readStructEnd];
- }
- - (void) write: (id <TProtocol>) outProtocol {
- [outProtocol writeStructBeginWithName: @"ShutdownResult_"];
- [outProtocol writeFieldStop];
- [outProtocol writeStructEnd];
- }
- - (NSString *) description {
- NSMutableString * ms = [NSMutableString stringWithString: @"ShutdownResult_("];
- [ms appendString: @")"];
- return [ms copy];
- }
- @end
- @interface CreateResult_ : NSObject {
- ThriftHandle * __success;
- ThriftIOException * __ouch;
- BOOL __success_isset;
- BOOL __ouch_isset;
- }
- - (id) initWithSuccess: (ThriftHandle *) success ouch: (ThriftIOException *) ouch;
- - (void) read: (id <TProtocol>) inProtocol;
- - (void) write: (id <TProtocol>) outProtocol;
- - (ThriftHandle *) success;
- - (void) setSuccess: (ThriftHandle *) success;
- - (BOOL) successIsSet;
- - (ThriftIOException *) ouch;
- - (void) setOuch: (ThriftIOException *) ouch;
- - (BOOL) ouchIsSet;
- @end
- @implementation CreateResult_
- - (id) initWithSuccess: (ThriftHandle *) success ouch: (ThriftIOException *) ouch
- {
- self = [super init];
- __success = [success retain];
- __success_isset = YES;
- __ouch = [ouch retain];
- __ouch_isset = YES;
- return self;
- }
- - (void) dealloc
- {
- [__success release];
- [__ouch release];
- [super dealloc];
- }
- - (ThriftHandle *) success {
- return [[__success retain] autorelease];
- }
- - (void) setSuccess: (ThriftHandle *) success {
- [success retain];
- [__success release];
- __success = success;
- __success_isset = YES;
- }
- - (BOOL) successIsSet {
- return __success_isset;
- }
- - (void) unsetSuccess {
- [__success release];
- __success = nil;
- __success_isset = NO;
- }
- - (ThriftIOException *) ouch {
- return [[__ouch retain] autorelease];
- }
- - (void) setOuch: (ThriftIOException *) ouch {
- [ouch retain];
- [__ouch release];
- __ouch = ouch;
- __ouch_isset = YES;
- }
- - (BOOL) ouchIsSet {
- return __ouch_isset;
- }
- - (void) unsetOuch {
- [__ouch release];
- __ouch = nil;
- __ouch_isset = NO;
- }
- - (void) read: (id <TProtocol>) inProtocol
- {
- NSString * fieldName;
- int fieldType;
- int fieldID;
- [inProtocol readStructBeginReturningName: NULL];
- while (true)
- {
- [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
- if (fieldType == TType_STOP) {
- break;
- }
- switch (fieldID)
- {
- case 0:
- if (fieldType == TType_STRUCT) {
- ThriftHandle *fieldValue = [[ThriftHandle alloc] init];
- [fieldValue read: inProtocol];
- [self setSuccess: fieldValue];
- [fieldValue release];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 1:
- if (fieldType == TType_STRUCT) {
- ThriftIOException *fieldValue = [[ThriftIOException alloc] init];
- [fieldValue read: inProtocol];
- [self setOuch: fieldValue];
- [fieldValue release];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- default:
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- break;
- }
- [inProtocol readFieldEnd];
- }
- [inProtocol readStructEnd];
- }
- - (void) write: (id <TProtocol>) outProtocol {
- [outProtocol writeStructBeginWithName: @"CreateResult_"];
- if (__success_isset) {
- if (__success != nil) {
- [outProtocol writeFieldBeginWithName: @"success" type: TType_STRUCT fieldID: 0];
- [__success write: outProtocol];
- [outProtocol writeFieldEnd];
- }
- } else if (__ouch_isset) {
- if (__ouch != nil) {
- [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1];
- [__ouch write: outProtocol];
- [outProtocol writeFieldEnd];
- }
- }
- [outProtocol writeFieldStop];
- [outProtocol writeStructEnd];
- }
- - (NSString *) description {
- NSMutableString * ms = [NSMutableString stringWithString: @"CreateResult_("];
- [ms appendString: @"success:"];
- [ms appendFormat: @"%@", __success];
- [ms appendString: @",ouch:"];
- [ms appendFormat: @"%@", __ouch];
- [ms appendString: @")"];
- return [ms copy];
- }
- @end
- @interface CreateFileResult_ : NSObject {
- ThriftHandle * __success;
- ThriftIOException * __ouch;
- BOOL __success_isset;
- BOOL __ouch_isset;
- }
- - (id) initWithSuccess: (ThriftHandle *) success ouch: (ThriftIOException *) ouch;
- - (void) read: (id <TProtocol>) inProtocol;
- - (void) write: (id <TProtocol>) outProtocol;
- - (ThriftHandle *) success;
- - (void) setSuccess: (ThriftHandle *) success;
- - (BOOL) successIsSet;
- - (ThriftIOException *) ouch;
- - (void) setOuch: (ThriftIOException *) ouch;
- - (BOOL) ouchIsSet;
- @end
- @implementation CreateFileResult_
- - (id) initWithSuccess: (ThriftHandle *) success ouch: (ThriftIOException *) ouch
- {
- self = [super init];
- __success = [success retain];
- __success_isset = YES;
- __ouch = [ouch retain];
- __ouch_isset = YES;
- return self;
- }
- - (void) dealloc
- {
- [__success release];
- [__ouch release];
- [super dealloc];
- }
- - (ThriftHandle *) success {
- return [[__success retain] autorelease];
- }
- - (void) setSuccess: (ThriftHandle *) success {
- [success retain];
- [__success release];
- __success = success;
- __success_isset = YES;
- }
- - (BOOL) successIsSet {
- return __success_isset;
- }
- - (void) unsetSuccess {
- [__success release];
- __success = nil;
- __success_isset = NO;
- }
- - (ThriftIOException *) ouch {
- return [[__ouch retain] autorelease];
- }
- - (void) setOuch: (ThriftIOException *) ouch {
- [ouch retain];
- [__ouch release];
- __ouch = ouch;
- __ouch_isset = YES;
- }
- - (BOOL) ouchIsSet {
- return __ouch_isset;
- }
- - (void) unsetOuch {
- [__ouch release];
- __ouch = nil;
- __ouch_isset = NO;
- }
- - (void) read: (id <TProtocol>) inProtocol
- {
- NSString * fieldName;
- int fieldType;
- int fieldID;
- [inProtocol readStructBeginReturningName: NULL];
- while (true)
- {
- [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
- if (fieldType == TType_STOP) {
- break;
- }
- switch (fieldID)
- {
- case 0:
- if (fieldType == TType_STRUCT) {
- ThriftHandle *fieldValue = [[ThriftHandle alloc] init];
- [fieldValue read: inProtocol];
- [self setSuccess: fieldValue];
- [fieldValue release];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 1:
- if (fieldType == TType_STRUCT) {
- ThriftIOException *fieldValue = [[ThriftIOException alloc] init];
- [fieldValue read: inProtocol];
- [self setOuch: fieldValue];
- [fieldValue release];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- default:
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- break;
- }
- [inProtocol readFieldEnd];
- }
- [inProtocol readStructEnd];
- }
- - (void) write: (id <TProtocol>) outProtocol {
- [outProtocol writeStructBeginWithName: @"CreateFileResult_"];
- if (__success_isset) {
- if (__success != nil) {
- [outProtocol writeFieldBeginWithName: @"success" type: TType_STRUCT fieldID: 0];
- [__success write: outProtocol];
- [outProtocol writeFieldEnd];
- }
- } else if (__ouch_isset) {
- if (__ouch != nil) {
- [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1];
- [__ouch write: outProtocol];
- [outProtocol writeFieldEnd];
- }
- }
- [outProtocol writeFieldStop];
- [outProtocol writeStructEnd];
- }
- - (NSString *) description {
- NSMutableString * ms = [NSMutableString stringWithString: @"CreateFileResult_("];
- [ms appendString: @"success:"];
- [ms appendFormat: @"%@", __success];
- [ms appendString: @",ouch:"];
- [ms appendFormat: @"%@", __ouch];
- [ms appendString: @")"];
- return [ms copy];
- }
- @end
- @interface OpenResult_ : NSObject {
- ThriftHandle * __success;
- ThriftIOException * __ouch;
- BOOL __success_isset;
- BOOL __ouch_isset;
- }
- - (id) initWithSuccess: (ThriftHandle *) success ouch: (ThriftIOException *) ouch;
- - (void) read: (id <TProtocol>) inProtocol;
- - (void) write: (id <TProtocol>) outProtocol;
- - (ThriftHandle *) success;
- - (void) setSuccess: (ThriftHandle *) success;
- - (BOOL) successIsSet;
- - (ThriftIOException *) ouch;
- - (void) setOuch: (ThriftIOException *) ouch;
- - (BOOL) ouchIsSet;
- @end
- @implementation OpenResult_
- - (id) initWithSuccess: (ThriftHandle *) success ouch: (ThriftIOException *) ouch
- {
- self = [super init];
- __success = [success retain];
- __success_isset = YES;
- __ouch = [ouch retain];
- __ouch_isset = YES;
- return self;
- }
- - (void) dealloc
- {
- [__success release];
- [__ouch release];
- [super dealloc];
- }
- - (ThriftHandle *) success {
- return [[__success retain] autorelease];
- }
- - (void) setSuccess: (ThriftHandle *) success {
- [success retain];
- [__success release];
- __success = success;
- __success_isset = YES;
- }
- - (BOOL) successIsSet {
- return __success_isset;
- }
- - (void) unsetSuccess {
- [__success release];
- __success = nil;
- __success_isset = NO;
- }
- - (ThriftIOException *) ouch {
- return [[__ouch retain] autorelease];
- }
- - (void) setOuch: (ThriftIOException *) ouch {
- [ouch retain];
- [__ouch release];
- __ouch = ouch;
- __ouch_isset = YES;
- }
- - (BOOL) ouchIsSet {
- return __ouch_isset;
- }
- - (void) unsetOuch {
- [__ouch release];
- __ouch = nil;
- __ouch_isset = NO;
- }
- - (void) read: (id <TProtocol>) inProtocol
- {
- NSString * fieldName;
- int fieldType;
- int fieldID;
- [inProtocol readStructBeginReturningName: NULL];
- while (true)
- {
- [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
- if (fieldType == TType_STOP) {
- break;
- }
- switch (fieldID)
- {
- case 0:
- if (fieldType == TType_STRUCT) {
- ThriftHandle *fieldValue = [[ThriftHandle alloc] init];
- [fieldValue read: inProtocol];
- [self setSuccess: fieldValue];
- [fieldValue release];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 1:
- if (fieldType == TType_STRUCT) {
- ThriftIOException *fieldValue = [[ThriftIOException alloc] init];
- [fieldValue read: inProtocol];
- [self setOuch: fieldValue];
- [fieldValue release];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- default:
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- break;
- }
- [inProtocol readFieldEnd];
- }
- [inProtocol readStructEnd];
- }
- - (void) write: (id <TProtocol>) outProtocol {
- [outProtocol writeStructBeginWithName: @"OpenResult_"];
- if (__success_isset) {
- if (__success != nil) {
- [outProtocol writeFieldBeginWithName: @"success" type: TType_STRUCT fieldID: 0];
- [__success write: outProtocol];
- [outProtocol writeFieldEnd];
- }
- } else if (__ouch_isset) {
- if (__ouch != nil) {
- [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1];
- [__ouch write: outProtocol];
- [outProtocol writeFieldEnd];
- }
- }
- [outProtocol writeFieldStop];
- [outProtocol writeStructEnd];
- }
- - (NSString *) description {
- NSMutableString * ms = [NSMutableString stringWithString: @"OpenResult_("];
- [ms appendString: @"success:"];
- [ms appendFormat: @"%@", __success];
- [ms appendString: @",ouch:"];
- [ms appendFormat: @"%@", __ouch];
- [ms appendString: @")"];
- return [ms copy];
- }
- @end
- @interface AppendResult_ : NSObject {
- ThriftHandle * __success;
- ThriftIOException * __ouch;
- BOOL __success_isset;
- BOOL __ouch_isset;
- }
- - (id) initWithSuccess: (ThriftHandle *) success ouch: (ThriftIOException *) ouch;
- - (void) read: (id <TProtocol>) inProtocol;
- - (void) write: (id <TProtocol>) outProtocol;
- - (ThriftHandle *) success;
- - (void) setSuccess: (ThriftHandle *) success;
- - (BOOL) successIsSet;
- - (ThriftIOException *) ouch;
- - (void) setOuch: (ThriftIOException *) ouch;
- - (BOOL) ouchIsSet;
- @end
- @implementation AppendResult_
- - (id) initWithSuccess: (ThriftHandle *) success ouch: (ThriftIOException *) ouch
- {
- self = [super init];
- __success = [success retain];
- __success_isset = YES;
- __ouch = [ouch retain];
- __ouch_isset = YES;
- return self;
- }
- - (void) dealloc
- {
- [__success release];
- [__ouch release];
- [super dealloc];
- }
- - (ThriftHandle *) success {
- return [[__success retain] autorelease];
- }
- - (void) setSuccess: (ThriftHandle *) success {
- [success retain];
- [__success release];
- __success = success;
- __success_isset = YES;
- }
- - (BOOL) successIsSet {
- return __success_isset;
- }
- - (void) unsetSuccess {
- [__success release];
- __success = nil;
- __success_isset = NO;
- }
- - (ThriftIOException *) ouch {
- return [[__ouch retain] autorelease];
- }
- - (void) setOuch: (ThriftIOException *) ouch {
- [ouch retain];
- [__ouch release];
- __ouch = ouch;
- __ouch_isset = YES;
- }
- - (BOOL) ouchIsSet {
- return __ouch_isset;
- }
- - (void) unsetOuch {
- [__ouch release];
- __ouch = nil;
- __ouch_isset = NO;
- }
- - (void) read: (id <TProtocol>) inProtocol
- {
- NSString * fieldName;
- int fieldType;
- int fieldID;
- [inProtocol readStructBeginReturningName: NULL];
- while (true)
- {
- [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
- if (fieldType == TType_STOP) {
- break;
- }
- switch (fieldID)
- {
- case 0:
- if (fieldType == TType_STRUCT) {
- ThriftHandle *fieldValue = [[ThriftHandle alloc] init];
- [fieldValue read: inProtocol];
- [self setSuccess: fieldValue];
- [fieldValue release];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 1:
- if (fieldType == TType_STRUCT) {
- ThriftIOException *fieldValue = [[ThriftIOException alloc] init];
- [fieldValue read: inProtocol];
- [self setOuch: fieldValue];
- [fieldValue release];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- default:
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- break;
- }
- [inProtocol readFieldEnd];
- }
- [inProtocol readStructEnd];
- }
- - (void) write: (id <TProtocol>) outProtocol {
- [outProtocol writeStructBeginWithName: @"AppendResult_"];
- if (__success_isset) {
- if (__success != nil) {
- [outProtocol writeFieldBeginWithName: @"success" type: TType_STRUCT fieldID: 0];
- [__success write: outProtocol];
- [outProtocol writeFieldEnd];
- }
- } else if (__ouch_isset) {
- if (__ouch != nil) {
- [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1];
- [__ouch write: outProtocol];
- [outProtocol writeFieldEnd];
- }
- }
- [outProtocol writeFieldStop];
- [outProtocol writeStructEnd];
- }
- - (NSString *) description {
- NSMutableString * ms = [NSMutableString stringWithString: @"AppendResult_("];
- [ms appendString: @"success:"];
- [ms appendFormat: @"%@", __success];
- [ms appendString: @",ouch:"];
- [ms appendFormat: @"%@", __ouch];
- [ms appendString: @")"];
- return [ms copy];
- }
- @end
- @interface WriteResult_ : NSObject {
- BOOL __success;
- ThriftIOException * __ouch;
- BOOL __success_isset;
- BOOL __ouch_isset;
- }
- - (id) initWithSuccess: (BOOL) success ouch: (ThriftIOException *) ouch;
- - (void) read: (id <TProtocol>) inProtocol;
- - (void) write: (id <TProtocol>) outProtocol;
- - (BOOL) success;
- - (void) setSuccess: (BOOL) success;
- - (BOOL) successIsSet;
- - (ThriftIOException *) ouch;
- - (void) setOuch: (ThriftIOException *) ouch;
- - (BOOL) ouchIsSet;
- @end
- @implementation WriteResult_
- - (id) initWithSuccess: (BOOL) success ouch: (ThriftIOException *) ouch
- {
- self = [super init];
- __success = success;
- __success_isset = YES;
- __ouch = [ouch retain];
- __ouch_isset = YES;
- return self;
- }
- - (void) dealloc
- {
- [__ouch release];
- [super dealloc];
- }
- - (BOOL) success {
- return __success;
- }
- - (void) setSuccess: (BOOL) success {
- __success = success;
- __success_isset = YES;
- }
- - (BOOL) successIsSet {
- return __success_isset;
- }
- - (void) unsetSuccess {
- __success_isset = NO;
- }
- - (ThriftIOException *) ouch {
- return [[__ouch retain] autorelease];
- }
- - (void) setOuch: (ThriftIOException *) ouch {
- [ouch retain];
- [__ouch release];
- __ouch = ouch;
- __ouch_isset = YES;
- }
- - (BOOL) ouchIsSet {
- return __ouch_isset;
- }
- - (void) unsetOuch {
- [__ouch release];
- __ouch = nil;
- __ouch_isset = NO;
- }
- - (void) read: (id <TProtocol>) inProtocol
- {
- NSString * fieldName;
- int fieldType;
- int fieldID;
- [inProtocol readStructBeginReturningName: NULL];
- while (true)
- {
- [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
- if (fieldType == TType_STOP) {
- break;
- }
- switch (fieldID)
- {
- case 0:
- if (fieldType == TType_BOOL) {
- BOOL fieldValue = [inProtocol readBool];
- [self setSuccess: fieldValue];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 1:
- if (fieldType == TType_STRUCT) {
- ThriftIOException *fieldValue = [[ThriftIOException alloc] init];
- [fieldValue read: inProtocol];
- [self setOuch: fieldValue];
- [fieldValue release];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- default:
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- break;
- }
- [inProtocol readFieldEnd];
- }
- [inProtocol readStructEnd];
- }
- - (void) write: (id <TProtocol>) outProtocol {
- [outProtocol writeStructBeginWithName: @"WriteResult_"];
- if (__success_isset) {
- [outProtocol writeFieldBeginWithName: @"success" type: TType_BOOL fieldID: 0];
- [outProtocol writeBool: __success];
- [outProtocol writeFieldEnd];
- } else if (__ouch_isset) {
- if (__ouch != nil) {
- [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1];
- [__ouch write: outProtocol];
- [outProtocol writeFieldEnd];
- }
- }
- [outProtocol writeFieldStop];
- [outProtocol writeStructEnd];
- }
- - (NSString *) description {
- NSMutableString * ms = [NSMutableString stringWithString: @"WriteResult_("];
- [ms appendString: @"success:"];
- [ms appendFormat: @"%i", __success];
- [ms appendString: @",ouch:"];
- [ms appendFormat: @"%@", __ouch];
- [ms appendString: @")"];
- return [ms copy];
- }
- @end
- @interface ReadResult_ : NSObject {
- NSString * __success;
- ThriftIOException * __ouch;
- BOOL __success_isset;
- BOOL __ouch_isset;
- }
- - (id) initWithSuccess: (NSString *) success ouch: (ThriftIOException *) ouch;
- - (void) read: (id <TProtocol>) inProtocol;
- - (void) write: (id <TProtocol>) outProtocol;
- - (NSString *) success;
- - (void) setSuccess: (NSString *) success;
- - (BOOL) successIsSet;
- - (ThriftIOException *) ouch;
- - (void) setOuch: (ThriftIOException *) ouch;
- - (BOOL) ouchIsSet;
- @end
- @implementation ReadResult_
- - (id) initWithSuccess: (NSString *) success ouch: (ThriftIOException *) ouch
- {
- self = [super init];
- __success = [success retain];
- __success_isset = YES;
- __ouch = [ouch retain];
- __ouch_isset = YES;
- return self;
- }
- - (void) dealloc
- {
- [__success release];
- [__ouch release];
- [super dealloc];
- }
- - (NSString *) success {
- return [[__success retain] autorelease];
- }
- - (void) setSuccess: (NSString *) success {
- [success retain];
- [__success release];
- __success = success;
- __success_isset = YES;
- }
- - (BOOL) successIsSet {
- return __success_isset;
- }
- - (void) unsetSuccess {
- [__success release];
- __success = nil;
- __success_isset = NO;
- }
- - (ThriftIOException *) ouch {
- return [[__ouch retain] autorelease];
- }
- - (void) setOuch: (ThriftIOException *) ouch {
- [ouch retain];
- [__ouch release];
- __ouch = ouch;
- __ouch_isset = YES;
- }
- - (BOOL) ouchIsSet {
- return __ouch_isset;
- }
- - (void) unsetOuch {
- [__ouch release];
- __ouch = nil;
- __ouch_isset = NO;
- }
- - (void) read: (id <TProtocol>) inProtocol
- {
- NSString * fieldName;
- int fieldType;
- int fieldID;
- [inProtocol readStructBeginReturningName: NULL];
- while (true)
- {
- [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
- if (fieldType == TType_STOP) {
- break;
- }
- switch (fieldID)
- {
- case 0:
- if (fieldType == TType_STRING) {
- NSString * fieldValue = [inProtocol readString];
- [self setSuccess: fieldValue];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 1:
- if (fieldType == TType_STRUCT) {
- ThriftIOException *fieldValue = [[ThriftIOException alloc] init];
- [fieldValue read: inProtocol];
- [self setOuch: fieldValue];
- [fieldValue release];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- default:
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- break;
- }
- [inProtocol readFieldEnd];
- }
- [inProtocol readStructEnd];
- }
- - (void) write: (id <TProtocol>) outProtocol {
- [outProtocol writeStructBeginWithName: @"ReadResult_"];
- if (__success_isset) {
- if (__success != nil) {
- [outProtocol writeFieldBeginWithName: @"success" type: TType_STRING fieldID: 0];
- [outProtocol writeString: __success];
- [outProtocol writeFieldEnd];
- }
- } else if (__ouch_isset) {
- if (__ouch != nil) {
- [outProtocol writeFieldBeginWithName: @"ouch" type: TType_STRUCT fieldID: 1];
- [__ouch write: outProtocol];
- [outProtocol writeFieldEnd];
- }
- }
- [outProtocol writeFieldStop];
- [outProtocol writeStructEnd];
- }
- - (NSString *) description {
- NSMutableString * ms = [NSMutableString stringWithString: @"ReadResult_("];
- [ms appendString: @"success:"];
- [ms appendFormat: @"\"%@\"", __success];
- [ms appendString: @",ouch:"];
- [ms appendFormat: @"%@", __ouch];
- [ms appendString: @")"];
- return [ms copy];
- }
- @end
- @interface CloseResult_ : NSObject {
- BOOL __success;
- ThriftIOException * __ouch;
- BOOL __success_isset;
- BOOL __ouch_isset;
- }
- - (id) initWithSuccess: (BOOL) success ouch: (ThriftIOException *) ouch;
- - (void) read: (id <TProtocol>) inProtocol;
- - (void) write: (id <TProtocol>) outProtocol;
- - (BOOL) success;
- - (void) setSuccess: (BOOL) success;
- - (BOOL) successIsSet;
- - (ThriftIOException *) ouch;
- - (void) setOuch: (ThriftIOException *) ouch;
- - (BOOL) ouchIsSet;
- @end
- @implementation CloseResult_
- - (id) initWithSuccess: (BOOL) success ouch: (ThriftIOException *) ouch
- {
- self = [super init];
- __success = success;
- __success_isset = YES;
- __ouch = [ouch retain];
- __ouch_isset = YES;
- return self;
- }
- - (void) dealloc
- {
- [__ouch release];
- [super dealloc];
- }
- - (BOOL) success {
- return __success;
- }
- - (void) setSuccess: (BOOL) success {
- __success = success;
- __success_isset = YES;
- }
- - (BOOL) successIsSet {
- return __success_isset;
- }
- - (void) unsetSuccess {
- __success_isset = NO;
- }
- - (ThriftIOException *) ouch {
- return [[__ouch retain] autorelease];
- }
- - (void) setOuch: (ThriftIOException *) ouch {
- [ouch retain];
- [__ouch release];
- __ouch = ouch;
- __ouch_isset = YES;
- }
- - (BOOL) ouchIsSet {
- return __ouch_isset;
- }
- - (void) unsetOuch {
- [__ouch release];
- __ouch = nil;
- __ouch_isset = NO;
- }
- - (void) read: (id <TProtocol>) inProtocol
- {
- NSString * fieldName;
- int fieldType;
- int fieldID;
- [inProtocol readStructBeginReturningName: NULL];
- while (true)
- {
- [inProtocol readFieldBeginReturningName: &fieldName type: &fieldType fieldID: &fieldID];
- if (fieldType == TType_STOP) {
- break;
- }
- switch (fieldID)
- {
- case 0:
- if (fieldType == TType_BOOL) {
- BOOL fieldValue = [inProtocol readBool];
- [self setSuccess: fieldValue];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 1:
- if (fieldType == TType_STRUCT) {
- ThriftIOException *fieldValue = [[ThriftIOException alloc] init];
- [fieldValue read: inProtocol];
- [self setOuch: fieldValue];
- [fieldValue release];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- default:
-