/Classes/ShareKit/Sharers/Services/Evernote/Helpers/edam/NoteStore.m
https://github.com/Punnya/ShareKit_Posterous · Objective C · 1855 lines · 1689 code · 161 blank · 5 comment · 246 complexity · 556c1bc5abc8fa5db5488e14f134d482 MD5 · raw file
- /**
- * Autogenerated by Thrift
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- */
- #import <Foundation/Foundation.h>
- #import "TProtocol.h"
- #import "TApplicationException.h"
- #import "TProtocolUtil.h"
- #import "TProcessor.h"
- #import "UserStore.h"
- #import "Types.h"
- #import "Errors.h"
- #import "Limits.h"
- #import "NoteStore.h"
- @implementation EDAMNoteStoreConstants
- + (void) initialize {
- }
- @end
- @implementation EDAMSyncState
- #if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
- @dynamic currentTime;
- @dynamic fullSyncBefore;
- @dynamic updateCount;
- @dynamic uploaded;
- #endif
- - (id) initWithCurrentTime: (EDAMTimestamp) currentTime fullSyncBefore: (EDAMTimestamp) fullSyncBefore updateCount: (int32_t) updateCount uploaded: (int64_t) uploaded
- {
- self = [super init];
- __currentTime = currentTime;
- __currentTime_isset = YES;
- __fullSyncBefore = fullSyncBefore;
- __fullSyncBefore_isset = YES;
- __updateCount = updateCount;
- __updateCount_isset = YES;
- __uploaded = uploaded;
- __uploaded_isset = YES;
- return self;
- }
- - (id) initWithCoder: (NSCoder *) decoder
- {
- self = [super init];
- if ([decoder containsValueForKey: @"currentTime"])
- {
- __currentTime = [decoder decodeInt64ForKey: @"currentTime"];
- __currentTime_isset = YES;
- }
- if ([decoder containsValueForKey: @"fullSyncBefore"])
- {
- __fullSyncBefore = [decoder decodeInt64ForKey: @"fullSyncBefore"];
- __fullSyncBefore_isset = YES;
- }
- if ([decoder containsValueForKey: @"updateCount"])
- {
- __updateCount = [decoder decodeInt32ForKey: @"updateCount"];
- __updateCount_isset = YES;
- }
- if ([decoder containsValueForKey: @"uploaded"])
- {
- __uploaded = [decoder decodeInt64ForKey: @"uploaded"];
- __uploaded_isset = YES;
- }
- return self;
- }
- - (void) encodeWithCoder: (NSCoder *) encoder
- {
- if (__currentTime_isset)
- {
- [encoder encodeInt64: __currentTime forKey: @"currentTime"];
- }
- if (__fullSyncBefore_isset)
- {
- [encoder encodeInt64: __fullSyncBefore forKey: @"fullSyncBefore"];
- }
- if (__updateCount_isset)
- {
- [encoder encodeInt32: __updateCount forKey: @"updateCount"];
- }
- if (__uploaded_isset)
- {
- [encoder encodeInt64: __uploaded forKey: @"uploaded"];
- }
- }
- - (void) dealloc
- {
- [super dealloc];
- }
- - (int64_t) currentTime {
- return __currentTime;
- }
- - (void) setCurrentTime: (int64_t) currentTime {
- __currentTime = currentTime;
- __currentTime_isset = YES;
- }
- - (BOOL) currentTimeIsSet {
- return __currentTime_isset;
- }
- - (void) unsetCurrentTime {
- __currentTime_isset = NO;
- }
- - (int64_t) fullSyncBefore {
- return __fullSyncBefore;
- }
- - (void) setFullSyncBefore: (int64_t) fullSyncBefore {
- __fullSyncBefore = fullSyncBefore;
- __fullSyncBefore_isset = YES;
- }
- - (BOOL) fullSyncBeforeIsSet {
- return __fullSyncBefore_isset;
- }
- - (void) unsetFullSyncBefore {
- __fullSyncBefore_isset = NO;
- }
- - (int32_t) updateCount {
- return __updateCount;
- }
- - (void) setUpdateCount: (int32_t) updateCount {
- __updateCount = updateCount;
- __updateCount_isset = YES;
- }
- - (BOOL) updateCountIsSet {
- return __updateCount_isset;
- }
- - (void) unsetUpdateCount {
- __updateCount_isset = NO;
- }
- - (int64_t) uploaded {
- return __uploaded;
- }
- - (void) setUploaded: (int64_t) uploaded {
- __uploaded = uploaded;
- __uploaded_isset = YES;
- }
- - (BOOL) uploadedIsSet {
- return __uploaded_isset;
- }
- - (void) unsetUploaded {
- __uploaded_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 setCurrentTime: fieldValue];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 2:
- if (fieldType == TType_I64) {
- int64_t fieldValue = [inProtocol readI64];
- [self setFullSyncBefore: fieldValue];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 3:
- if (fieldType == TType_I32) {
- int32_t fieldValue = [inProtocol readI32];
- [self setUpdateCount: fieldValue];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 4:
- if (fieldType == TType_I64) {
- int64_t fieldValue = [inProtocol readI64];
- [self setUploaded: 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: @"SyncState"];
- if (__currentTime_isset) {
- [outProtocol writeFieldBeginWithName: @"currentTime" type: TType_I64 fieldID: 1];
- [outProtocol writeI64: __currentTime];
- [outProtocol writeFieldEnd];
- }
- if (__fullSyncBefore_isset) {
- [outProtocol writeFieldBeginWithName: @"fullSyncBefore" type: TType_I64 fieldID: 2];
- [outProtocol writeI64: __fullSyncBefore];
- [outProtocol writeFieldEnd];
- }
- if (__updateCount_isset) {
- [outProtocol writeFieldBeginWithName: @"updateCount" type: TType_I32 fieldID: 3];
- [outProtocol writeI32: __updateCount];
- [outProtocol writeFieldEnd];
- }
- if (__uploaded_isset) {
- [outProtocol writeFieldBeginWithName: @"uploaded" type: TType_I64 fieldID: 4];
- [outProtocol writeI64: __uploaded];
- [outProtocol writeFieldEnd];
- }
- [outProtocol writeFieldStop];
- [outProtocol writeStructEnd];
- }
- - (NSString *) description {
- NSMutableString * ms = [NSMutableString stringWithString: @"SyncState("];
- [ms appendString: @"currentTime:"];
- [ms appendFormat: @"%qi", __currentTime];
- [ms appendString: @",fullSyncBefore:"];
- [ms appendFormat: @"%qi", __fullSyncBefore];
- [ms appendString: @",updateCount:"];
- [ms appendFormat: @"%i", __updateCount];
- [ms appendString: @",uploaded:"];
- [ms appendFormat: @"%qi", __uploaded];
- [ms appendString: @")"];
- return [NSString stringWithString: ms];
- }
- @end
- @implementation EDAMSyncChunk
- #if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
- @dynamic currentTime;
- @dynamic chunkHighUSN;
- @dynamic updateCount;
- @dynamic notes;
- @dynamic notebooks;
- @dynamic tags;
- @dynamic searches;
- @dynamic resources;
- @dynamic expungedNotes;
- @dynamic expungedNotebooks;
- @dynamic expungedTags;
- @dynamic expungedSearches;
- #endif
- - (id) initWithCurrentTime: (EDAMTimestamp) currentTime chunkHighUSN: (int32_t) chunkHighUSN updateCount: (int32_t) updateCount notes: (NSArray *) notes notebooks: (NSArray *) notebooks tags: (NSArray *) tags searches: (NSArray *) searches resources: (NSArray *) resources expungedNotes: (NSArray *) expungedNotes expungedNotebooks: (NSArray *) expungedNotebooks expungedTags: (NSArray *) expungedTags expungedSearches: (NSArray *) expungedSearches
- {
- self = [super init];
- __currentTime = currentTime;
- __currentTime_isset = YES;
- __chunkHighUSN = chunkHighUSN;
- __chunkHighUSN_isset = YES;
- __updateCount = updateCount;
- __updateCount_isset = YES;
- __notes = [notes retain];
- __notes_isset = YES;
- __notebooks = [notebooks retain];
- __notebooks_isset = YES;
- __tags = [tags retain];
- __tags_isset = YES;
- __searches = [searches retain];
- __searches_isset = YES;
- __resources = [resources retain];
- __resources_isset = YES;
- __expungedNotes = [expungedNotes retain];
- __expungedNotes_isset = YES;
- __expungedNotebooks = [expungedNotebooks retain];
- __expungedNotebooks_isset = YES;
- __expungedTags = [expungedTags retain];
- __expungedTags_isset = YES;
- __expungedSearches = [expungedSearches retain];
- __expungedSearches_isset = YES;
- return self;
- }
- - (id) initWithCoder: (NSCoder *) decoder
- {
- self = [super init];
- if ([decoder containsValueForKey: @"currentTime"])
- {
- __currentTime = [decoder decodeInt64ForKey: @"currentTime"];
- __currentTime_isset = YES;
- }
- if ([decoder containsValueForKey: @"chunkHighUSN"])
- {
- __chunkHighUSN = [decoder decodeInt32ForKey: @"chunkHighUSN"];
- __chunkHighUSN_isset = YES;
- }
- if ([decoder containsValueForKey: @"updateCount"])
- {
- __updateCount = [decoder decodeInt32ForKey: @"updateCount"];
- __updateCount_isset = YES;
- }
- if ([decoder containsValueForKey: @"notes"])
- {
- __notes = [[decoder decodeObjectForKey: @"notes"] retain];
- __notes_isset = YES;
- }
- if ([decoder containsValueForKey: @"notebooks"])
- {
- __notebooks = [[decoder decodeObjectForKey: @"notebooks"] retain];
- __notebooks_isset = YES;
- }
- if ([decoder containsValueForKey: @"tags"])
- {
- __tags = [[decoder decodeObjectForKey: @"tags"] retain];
- __tags_isset = YES;
- }
- if ([decoder containsValueForKey: @"searches"])
- {
- __searches = [[decoder decodeObjectForKey: @"searches"] retain];
- __searches_isset = YES;
- }
- if ([decoder containsValueForKey: @"resources"])
- {
- __resources = [[decoder decodeObjectForKey: @"resources"] retain];
- __resources_isset = YES;
- }
- if ([decoder containsValueForKey: @"expungedNotes"])
- {
- __expungedNotes = [[decoder decodeObjectForKey: @"expungedNotes"] retain];
- __expungedNotes_isset = YES;
- }
- if ([decoder containsValueForKey: @"expungedNotebooks"])
- {
- __expungedNotebooks = [[decoder decodeObjectForKey: @"expungedNotebooks"] retain];
- __expungedNotebooks_isset = YES;
- }
- if ([decoder containsValueForKey: @"expungedTags"])
- {
- __expungedTags = [[decoder decodeObjectForKey: @"expungedTags"] retain];
- __expungedTags_isset = YES;
- }
- if ([decoder containsValueForKey: @"expungedSearches"])
- {
- __expungedSearches = [[decoder decodeObjectForKey: @"expungedSearches"] retain];
- __expungedSearches_isset = YES;
- }
- return self;
- }
- - (void) encodeWithCoder: (NSCoder *) encoder
- {
- if (__currentTime_isset)
- {
- [encoder encodeInt64: __currentTime forKey: @"currentTime"];
- }
- if (__chunkHighUSN_isset)
- {
- [encoder encodeInt32: __chunkHighUSN forKey: @"chunkHighUSN"];
- }
- if (__updateCount_isset)
- {
- [encoder encodeInt32: __updateCount forKey: @"updateCount"];
- }
- if (__notes_isset)
- {
- [encoder encodeObject: __notes forKey: @"notes"];
- }
- if (__notebooks_isset)
- {
- [encoder encodeObject: __notebooks forKey: @"notebooks"];
- }
- if (__tags_isset)
- {
- [encoder encodeObject: __tags forKey: @"tags"];
- }
- if (__searches_isset)
- {
- [encoder encodeObject: __searches forKey: @"searches"];
- }
- if (__resources_isset)
- {
- [encoder encodeObject: __resources forKey: @"resources"];
- }
- if (__expungedNotes_isset)
- {
- [encoder encodeObject: __expungedNotes forKey: @"expungedNotes"];
- }
- if (__expungedNotebooks_isset)
- {
- [encoder encodeObject: __expungedNotebooks forKey: @"expungedNotebooks"];
- }
- if (__expungedTags_isset)
- {
- [encoder encodeObject: __expungedTags forKey: @"expungedTags"];
- }
- if (__expungedSearches_isset)
- {
- [encoder encodeObject: __expungedSearches forKey: @"expungedSearches"];
- }
- }
- - (void) dealloc
- {
- [__notes release];
- [__notebooks release];
- [__tags release];
- [__searches release];
- [__resources release];
- [__expungedNotes release];
- [__expungedNotebooks release];
- [__expungedTags release];
- [__expungedSearches release];
- [super dealloc];
- }
- - (int64_t) currentTime {
- return __currentTime;
- }
- - (void) setCurrentTime: (int64_t) currentTime {
- __currentTime = currentTime;
- __currentTime_isset = YES;
- }
- - (BOOL) currentTimeIsSet {
- return __currentTime_isset;
- }
- - (void) unsetCurrentTime {
- __currentTime_isset = NO;
- }
- - (int32_t) chunkHighUSN {
- return __chunkHighUSN;
- }
- - (void) setChunkHighUSN: (int32_t) chunkHighUSN {
- __chunkHighUSN = chunkHighUSN;
- __chunkHighUSN_isset = YES;
- }
- - (BOOL) chunkHighUSNIsSet {
- return __chunkHighUSN_isset;
- }
- - (void) unsetChunkHighUSN {
- __chunkHighUSN_isset = NO;
- }
- - (int32_t) updateCount {
- return __updateCount;
- }
- - (void) setUpdateCount: (int32_t) updateCount {
- __updateCount = updateCount;
- __updateCount_isset = YES;
- }
- - (BOOL) updateCountIsSet {
- return __updateCount_isset;
- }
- - (void) unsetUpdateCount {
- __updateCount_isset = NO;
- }
- - (NSArray *) notes {
- return [[__notes retain] autorelease];
- }
- - (void) setNotes: (NSArray *) notes {
- [notes retain];
- [__notes release];
- __notes = notes;
- __notes_isset = YES;
- }
- - (BOOL) notesIsSet {
- return __notes_isset;
- }
- - (void) unsetNotes {
- [__notes release];
- __notes = nil;
- __notes_isset = NO;
- }
- - (NSArray *) notebooks {
- return [[__notebooks retain] autorelease];
- }
- - (void) setNotebooks: (NSArray *) notebooks {
- [notebooks retain];
- [__notebooks release];
- __notebooks = notebooks;
- __notebooks_isset = YES;
- }
- - (BOOL) notebooksIsSet {
- return __notebooks_isset;
- }
- - (void) unsetNotebooks {
- [__notebooks release];
- __notebooks = nil;
- __notebooks_isset = NO;
- }
- - (NSArray *) tags {
- return [[__tags retain] autorelease];
- }
- - (void) setTags: (NSArray *) tags {
- [tags retain];
- [__tags release];
- __tags = tags;
- __tags_isset = YES;
- }
- - (BOOL) tagsIsSet {
- return __tags_isset;
- }
- - (void) unsetTags {
- [__tags release];
- __tags = nil;
- __tags_isset = NO;
- }
- - (NSArray *) searches {
- return [[__searches retain] autorelease];
- }
- - (void) setSearches: (NSArray *) searches {
- [searches retain];
- [__searches release];
- __searches = searches;
- __searches_isset = YES;
- }
- - (BOOL) searchesIsSet {
- return __searches_isset;
- }
- - (void) unsetSearches {
- [__searches release];
- __searches = nil;
- __searches_isset = NO;
- }
- - (NSArray *) resources {
- return [[__resources retain] autorelease];
- }
- - (void) setResources: (NSArray *) resources {
- [resources retain];
- [__resources release];
- __resources = resources;
- __resources_isset = YES;
- }
- - (BOOL) resourcesIsSet {
- return __resources_isset;
- }
- - (void) unsetResources {
- [__resources release];
- __resources = nil;
- __resources_isset = NO;
- }
- - (NSArray *) expungedNotes {
- return [[__expungedNotes retain] autorelease];
- }
- - (void) setExpungedNotes: (NSArray *) expungedNotes {
- [expungedNotes retain];
- [__expungedNotes release];
- __expungedNotes = expungedNotes;
- __expungedNotes_isset = YES;
- }
- - (BOOL) expungedNotesIsSet {
- return __expungedNotes_isset;
- }
- - (void) unsetExpungedNotes {
- [__expungedNotes release];
- __expungedNotes = nil;
- __expungedNotes_isset = NO;
- }
- - (NSArray *) expungedNotebooks {
- return [[__expungedNotebooks retain] autorelease];
- }
- - (void) setExpungedNotebooks: (NSArray *) expungedNotebooks {
- [expungedNotebooks retain];
- [__expungedNotebooks release];
- __expungedNotebooks = expungedNotebooks;
- __expungedNotebooks_isset = YES;
- }
- - (BOOL) expungedNotebooksIsSet {
- return __expungedNotebooks_isset;
- }
- - (void) unsetExpungedNotebooks {
- [__expungedNotebooks release];
- __expungedNotebooks = nil;
- __expungedNotebooks_isset = NO;
- }
- - (NSArray *) expungedTags {
- return [[__expungedTags retain] autorelease];
- }
- - (void) setExpungedTags: (NSArray *) expungedTags {
- [expungedTags retain];
- [__expungedTags release];
- __expungedTags = expungedTags;
- __expungedTags_isset = YES;
- }
- - (BOOL) expungedTagsIsSet {
- return __expungedTags_isset;
- }
- - (void) unsetExpungedTags {
- [__expungedTags release];
- __expungedTags = nil;
- __expungedTags_isset = NO;
- }
- - (NSArray *) expungedSearches {
- return [[__expungedSearches retain] autorelease];
- }
- - (void) setExpungedSearches: (NSArray *) expungedSearches {
- [expungedSearches retain];
- [__expungedSearches release];
- __expungedSearches = expungedSearches;
- __expungedSearches_isset = YES;
- }
- - (BOOL) expungedSearchesIsSet {
- return __expungedSearches_isset;
- }
- - (void) unsetExpungedSearches {
- [__expungedSearches release];
- __expungedSearches = nil;
- __expungedSearches_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 setCurrentTime: fieldValue];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 2:
- if (fieldType == TType_I32) {
- int32_t fieldValue = [inProtocol readI32];
- [self setChunkHighUSN: fieldValue];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 3:
- if (fieldType == TType_I32) {
- int32_t fieldValue = [inProtocol readI32];
- [self setUpdateCount: fieldValue];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 4:
- 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)
- {
- EDAMNote *_elem2 = [[EDAMNote alloc] init];
- [_elem2 read: inProtocol];
- [fieldValue addObject: _elem2];
- [_elem2 release];
- }
- [inProtocol readListEnd];
- [self setNotes: fieldValue];
- [fieldValue release];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 5:
- 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)
- {
- EDAMNotebook *_elem5 = [[EDAMNotebook alloc] init];
- [_elem5 read: inProtocol];
- [fieldValue addObject: _elem5];
- [_elem5 release];
- }
- [inProtocol readListEnd];
- [self setNotebooks: fieldValue];
- [fieldValue release];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 6:
- if (fieldType == TType_LIST) {
- int _size6;
- [inProtocol readListBeginReturningElementType: NULL size: &_size6];
- NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size6];
- int _i7;
- for (_i7 = 0; _i7 < _size6; ++_i7)
- {
- EDAMTag *_elem8 = [[EDAMTag alloc] init];
- [_elem8 read: inProtocol];
- [fieldValue addObject: _elem8];
- [_elem8 release];
- }
- [inProtocol readListEnd];
- [self setTags: fieldValue];
- [fieldValue release];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 7:
- if (fieldType == TType_LIST) {
- int _size9;
- [inProtocol readListBeginReturningElementType: NULL size: &_size9];
- NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size9];
- int _i10;
- for (_i10 = 0; _i10 < _size9; ++_i10)
- {
- EDAMSavedSearch *_elem11 = [[EDAMSavedSearch alloc] init];
- [_elem11 read: inProtocol];
- [fieldValue addObject: _elem11];
- [_elem11 release];
- }
- [inProtocol readListEnd];
- [self setSearches: fieldValue];
- [fieldValue release];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 8:
- if (fieldType == TType_LIST) {
- int _size12;
- [inProtocol readListBeginReturningElementType: NULL size: &_size12];
- NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size12];
- int _i13;
- for (_i13 = 0; _i13 < _size12; ++_i13)
- {
- EDAMResource *_elem14 = [[EDAMResource alloc] init];
- [_elem14 read: inProtocol];
- [fieldValue addObject: _elem14];
- [_elem14 release];
- }
- [inProtocol readListEnd];
- [self setResources: fieldValue];
- [fieldValue release];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 9:
- if (fieldType == TType_LIST) {
- int _size15;
- [inProtocol readListBeginReturningElementType: NULL size: &_size15];
- NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size15];
- int _i16;
- for (_i16 = 0; _i16 < _size15; ++_i16)
- {
- NSString * _elem17 = [inProtocol readString];
- [fieldValue addObject: _elem17];
- }
- [inProtocol readListEnd];
- [self setExpungedNotes: fieldValue];
- [fieldValue release];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 10:
- if (fieldType == TType_LIST) {
- int _size18;
- [inProtocol readListBeginReturningElementType: NULL size: &_size18];
- NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size18];
- int _i19;
- for (_i19 = 0; _i19 < _size18; ++_i19)
- {
- NSString * _elem20 = [inProtocol readString];
- [fieldValue addObject: _elem20];
- }
- [inProtocol readListEnd];
- [self setExpungedNotebooks: fieldValue];
- [fieldValue release];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 11:
- if (fieldType == TType_LIST) {
- int _size21;
- [inProtocol readListBeginReturningElementType: NULL size: &_size21];
- NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size21];
- int _i22;
- for (_i22 = 0; _i22 < _size21; ++_i22)
- {
- NSString * _elem23 = [inProtocol readString];
- [fieldValue addObject: _elem23];
- }
- [inProtocol readListEnd];
- [self setExpungedTags: fieldValue];
- [fieldValue release];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 12:
- if (fieldType == TType_LIST) {
- int _size24;
- [inProtocol readListBeginReturningElementType: NULL size: &_size24];
- NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size24];
- int _i25;
- for (_i25 = 0; _i25 < _size24; ++_i25)
- {
- NSString * _elem26 = [inProtocol readString];
- [fieldValue addObject: _elem26];
- }
- [inProtocol readListEnd];
- [self setExpungedSearches: 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: @"SyncChunk"];
- if (__currentTime_isset) {
- [outProtocol writeFieldBeginWithName: @"currentTime" type: TType_I64 fieldID: 1];
- [outProtocol writeI64: __currentTime];
- [outProtocol writeFieldEnd];
- }
- if (__chunkHighUSN_isset) {
- [outProtocol writeFieldBeginWithName: @"chunkHighUSN" type: TType_I32 fieldID: 2];
- [outProtocol writeI32: __chunkHighUSN];
- [outProtocol writeFieldEnd];
- }
- if (__updateCount_isset) {
- [outProtocol writeFieldBeginWithName: @"updateCount" type: TType_I32 fieldID: 3];
- [outProtocol writeI32: __updateCount];
- [outProtocol writeFieldEnd];
- }
- if (__notes_isset) {
- if (__notes != nil) {
- [outProtocol writeFieldBeginWithName: @"notes" type: TType_LIST fieldID: 4];
- {
- [outProtocol writeListBeginWithElementType: TType_STRUCT size: [__notes count]];
- int i28;
- for (i28 = 0; i28 < [__notes count]; i28++)
- {
- [[__notes objectAtIndex: i28] write: outProtocol];
- }
- [outProtocol writeListEnd];
- }
- [outProtocol writeFieldEnd];
- }
- }
- if (__notebooks_isset) {
- if (__notebooks != nil) {
- [outProtocol writeFieldBeginWithName: @"notebooks" type: TType_LIST fieldID: 5];
- {
- [outProtocol writeListBeginWithElementType: TType_STRUCT size: [__notebooks count]];
- int i30;
- for (i30 = 0; i30 < [__notebooks count]; i30++)
- {
- [[__notebooks objectAtIndex: i30] write: outProtocol];
- }
- [outProtocol writeListEnd];
- }
- [outProtocol writeFieldEnd];
- }
- }
- if (__tags_isset) {
- if (__tags != nil) {
- [outProtocol writeFieldBeginWithName: @"tags" type: TType_LIST fieldID: 6];
- {
- [outProtocol writeListBeginWithElementType: TType_STRUCT size: [__tags count]];
- int i32;
- for (i32 = 0; i32 < [__tags count]; i32++)
- {
- [[__tags objectAtIndex: i32] write: outProtocol];
- }
- [outProtocol writeListEnd];
- }
- [outProtocol writeFieldEnd];
- }
- }
- if (__searches_isset) {
- if (__searches != nil) {
- [outProtocol writeFieldBeginWithName: @"searches" type: TType_LIST fieldID: 7];
- {
- [outProtocol writeListBeginWithElementType: TType_STRUCT size: [__searches count]];
- int i34;
- for (i34 = 0; i34 < [__searches count]; i34++)
- {
- [[__searches objectAtIndex: i34] write: outProtocol];
- }
- [outProtocol writeListEnd];
- }
- [outProtocol writeFieldEnd];
- }
- }
- if (__resources_isset) {
- if (__resources != nil) {
- [outProtocol writeFieldBeginWithName: @"resources" type: TType_LIST fieldID: 8];
- {
- [outProtocol writeListBeginWithElementType: TType_STRUCT size: [__resources count]];
- int i36;
- for (i36 = 0; i36 < [__resources count]; i36++)
- {
- [[__resources objectAtIndex: i36] write: outProtocol];
- }
- [outProtocol writeListEnd];
- }
- [outProtocol writeFieldEnd];
- }
- }
- if (__expungedNotes_isset) {
- if (__expungedNotes != nil) {
- [outProtocol writeFieldBeginWithName: @"expungedNotes" type: TType_LIST fieldID: 9];
- {
- [outProtocol writeListBeginWithElementType: TType_STRING size: [__expungedNotes count]];
- int i38;
- for (i38 = 0; i38 < [__expungedNotes count]; i38++)
- {
- [outProtocol writeString: [__expungedNotes objectAtIndex: i38]];
- }
- [outProtocol writeListEnd];
- }
- [outProtocol writeFieldEnd];
- }
- }
- if (__expungedNotebooks_isset) {
- if (__expungedNotebooks != nil) {
- [outProtocol writeFieldBeginWithName: @"expungedNotebooks" type: TType_LIST fieldID: 10];
- {
- [outProtocol writeListBeginWithElementType: TType_STRING size: [__expungedNotebooks count]];
- int i40;
- for (i40 = 0; i40 < [__expungedNotebooks count]; i40++)
- {
- [outProtocol writeString: [__expungedNotebooks objectAtIndex: i40]];
- }
- [outProtocol writeListEnd];
- }
- [outProtocol writeFieldEnd];
- }
- }
- if (__expungedTags_isset) {
- if (__expungedTags != nil) {
- [outProtocol writeFieldBeginWithName: @"expungedTags" type: TType_LIST fieldID: 11];
- {
- [outProtocol writeListBeginWithElementType: TType_STRING size: [__expungedTags count]];
- int i42;
- for (i42 = 0; i42 < [__expungedTags count]; i42++)
- {
- [outProtocol writeString: [__expungedTags objectAtIndex: i42]];
- }
- [outProtocol writeListEnd];
- }
- [outProtocol writeFieldEnd];
- }
- }
- if (__expungedSearches_isset) {
- if (__expungedSearches != nil) {
- [outProtocol writeFieldBeginWithName: @"expungedSearches" type: TType_LIST fieldID: 12];
- {
- [outProtocol writeListBeginWithElementType: TType_STRING size: [__expungedSearches count]];
- int i44;
- for (i44 = 0; i44 < [__expungedSearches count]; i44++)
- {
- [outProtocol writeString: [__expungedSearches objectAtIndex: i44]];
- }
- [outProtocol writeListEnd];
- }
- [outProtocol writeFieldEnd];
- }
- }
- [outProtocol writeFieldStop];
- [outProtocol writeStructEnd];
- }
- - (NSString *) description {
- NSMutableString * ms = [NSMutableString stringWithString: @"SyncChunk("];
- [ms appendString: @"currentTime:"];
- [ms appendFormat: @"%qi", __currentTime];
- [ms appendString: @",chunkHighUSN:"];
- [ms appendFormat: @"%i", __chunkHighUSN];
- [ms appendString: @",updateCount:"];
- [ms appendFormat: @"%i", __updateCount];
- [ms appendString: @",notes:"];
- [ms appendFormat: @"%@", __notes];
- [ms appendString: @",notebooks:"];
- [ms appendFormat: @"%@", __notebooks];
- [ms appendString: @",tags:"];
- [ms appendFormat: @"%@", __tags];
- [ms appendString: @",searches:"];
- [ms appendFormat: @"%@", __searches];
- [ms appendString: @",resources:"];
- [ms appendFormat: @"%@", __resources];
- [ms appendString: @",expungedNotes:"];
- [ms appendFormat: @"%@", __expungedNotes];
- [ms appendString: @",expungedNotebooks:"];
- [ms appendFormat: @"%@", __expungedNotebooks];
- [ms appendString: @",expungedTags:"];
- [ms appendFormat: @"%@", __expungedTags];
- [ms appendString: @",expungedSearches:"];
- [ms appendFormat: @"%@", __expungedSearches];
- [ms appendString: @")"];
- return [NSString stringWithString: ms];
- }
- @end
- @implementation EDAMNoteFilter
- #if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
- @dynamic order;
- @dynamic ascending;
- @dynamic words;
- @dynamic notebookGuid;
- @dynamic tagGuids;
- @dynamic timeZone;
- @dynamic inactive;
- #endif
- - (id) initWithOrder: (int32_t) order ascending: (BOOL) ascending words: (NSString *) words notebookGuid: (EDAMGuid) notebookGuid tagGuids: (NSArray *) tagGuids timeZone: (NSString *) timeZone inactive: (BOOL) inactive
- {
- self = [super init];
- __order = order;
- __order_isset = YES;
- __ascending = ascending;
- __ascending_isset = YES;
- __words = [words retain];
- __words_isset = YES;
- __notebookGuid = [notebookGuid retain];
- __notebookGuid_isset = YES;
- __tagGuids = [tagGuids retain];
- __tagGuids_isset = YES;
- __timeZone = [timeZone retain];
- __timeZone_isset = YES;
- __inactive = inactive;
- __inactive_isset = YES;
- return self;
- }
- - (id) initWithCoder: (NSCoder *) decoder
- {
- self = [super init];
- if ([decoder containsValueForKey: @"order"])
- {
- __order = [decoder decodeInt32ForKey: @"order"];
- __order_isset = YES;
- }
- if ([decoder containsValueForKey: @"ascending"])
- {
- __ascending = [decoder decodeBoolForKey: @"ascending"];
- __ascending_isset = YES;
- }
- if ([decoder containsValueForKey: @"words"])
- {
- __words = [[decoder decodeObjectForKey: @"words"] retain];
- __words_isset = YES;
- }
- if ([decoder containsValueForKey: @"notebookGuid"])
- {
- __notebookGuid = [[decoder decodeObjectForKey: @"notebookGuid"] retain];
- __notebookGuid_isset = YES;
- }
- if ([decoder containsValueForKey: @"tagGuids"])
- {
- __tagGuids = [[decoder decodeObjectForKey: @"tagGuids"] retain];
- __tagGuids_isset = YES;
- }
- if ([decoder containsValueForKey: @"timeZone"])
- {
- __timeZone = [[decoder decodeObjectForKey: @"timeZone"] retain];
- __timeZone_isset = YES;
- }
- if ([decoder containsValueForKey: @"inactive"])
- {
- __inactive = [decoder decodeBoolForKey: @"inactive"];
- __inactive_isset = YES;
- }
- return self;
- }
- - (void) encodeWithCoder: (NSCoder *) encoder
- {
- if (__order_isset)
- {
- [encoder encodeInt32: __order forKey: @"order"];
- }
- if (__ascending_isset)
- {
- [encoder encodeBool: __ascending forKey: @"ascending"];
- }
- if (__words_isset)
- {
- [encoder encodeObject: __words forKey: @"words"];
- }
- if (__notebookGuid_isset)
- {
- [encoder encodeObject: __notebookGuid forKey: @"notebookGuid"];
- }
- if (__tagGuids_isset)
- {
- [encoder encodeObject: __tagGuids forKey: @"tagGuids"];
- }
- if (__timeZone_isset)
- {
- [encoder encodeObject: __timeZone forKey: @"timeZone"];
- }
- if (__inactive_isset)
- {
- [encoder encodeBool: __inactive forKey: @"inactive"];
- }
- }
- - (void) dealloc
- {
- [__words release];
- [__notebookGuid release];
- [__tagGuids release];
- [__timeZone release];
- [super dealloc];
- }
- - (int32_t) order {
- return __order;
- }
- - (void) setOrder: (int32_t) order {
- __order = order;
- __order_isset = YES;
- }
- - (BOOL) orderIsSet {
- return __order_isset;
- }
- - (void) unsetOrder {
- __order_isset = NO;
- }
- - (BOOL) ascending {
- return __ascending;
- }
- - (void) setAscending: (BOOL) ascending {
- __ascending = ascending;
- __ascending_isset = YES;
- }
- - (BOOL) ascendingIsSet {
- return __ascending_isset;
- }
- - (void) unsetAscending {
- __ascending_isset = NO;
- }
- - (NSString *) words {
- return [[__words retain] autorelease];
- }
- - (void) setWords: (NSString *) words {
- [words retain];
- [__words release];
- __words = words;
- __words_isset = YES;
- }
- - (BOOL) wordsIsSet {
- return __words_isset;
- }
- - (void) unsetWords {
- [__words release];
- __words = nil;
- __words_isset = NO;
- }
- - (NSString *) notebookGuid {
- return [[__notebookGuid retain] autorelease];
- }
- - (void) setNotebookGuid: (NSString *) notebookGuid {
- [notebookGuid retain];
- [__notebookGuid release];
- __notebookGuid = notebookGuid;
- __notebookGuid_isset = YES;
- }
- - (BOOL) notebookGuidIsSet {
- return __notebookGuid_isset;
- }
- - (void) unsetNotebookGuid {
- [__notebookGuid release];
- __notebookGuid = nil;
- __notebookGuid_isset = NO;
- }
- - (NSArray *) tagGuids {
- return [[__tagGuids retain] autorelease];
- }
- - (void) setTagGuids: (NSArray *) tagGuids {
- [tagGuids retain];
- [__tagGuids release];
- __tagGuids = tagGuids;
- __tagGuids_isset = YES;
- }
- - (BOOL) tagGuidsIsSet {
- return __tagGuids_isset;
- }
- - (void) unsetTagGuids {
- [__tagGuids release];
- __tagGuids = nil;
- __tagGuids_isset = NO;
- }
- - (NSString *) timeZone {
- return [[__timeZone retain] autorelease];
- }
- - (void) setTimeZone: (NSString *) timeZone {
- [timeZone retain];
- [__timeZone release];
- __timeZone = timeZone;
- __timeZone_isset = YES;
- }
- - (BOOL) timeZoneIsSet {
- return __timeZone_isset;
- }
- - (void) unsetTimeZone {
- [__timeZone release];
- __timeZone = nil;
- __timeZone_isset = NO;
- }
- - (BOOL) inactive {
- return __inactive;
- }
- - (void) setInactive: (BOOL) inactive {
- __inactive = inactive;
- __inactive_isset = YES;
- }
- - (BOOL) inactiveIsSet {
- return __inactive_isset;
- }
- - (void) unsetInactive {
- __inactive_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_I32) {
- int32_t fieldValue = [inProtocol readI32];
- [self setOrder: fieldValue];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 2:
- if (fieldType == TType_BOOL) {
- BOOL fieldValue = [inProtocol readBool];
- [self setAscending: fieldValue];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 3:
- if (fieldType == TType_STRING) {
- NSString * fieldValue = [inProtocol readString];
- [self setWords: fieldValue];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 4:
- if (fieldType == TType_STRING) {
- NSString * fieldValue = [inProtocol readString];
- [self setNotebookGuid: fieldValue];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 5:
- if (fieldType == TType_LIST) {
- int _size45;
- [inProtocol readListBeginReturningElementType: NULL size: &_size45];
- NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size45];
- int _i46;
- for (_i46 = 0; _i46 < _size45; ++_i46)
- {
- NSString * _elem47 = [inProtocol readString];
- [fieldValue addObject: _elem47];
- }
- [inProtocol readListEnd];
- [self setTagGuids: fieldValue];
- [fieldValue release];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 6:
- if (fieldType == TType_STRING) {
- NSString * fieldValue = [inProtocol readString];
- [self setTimeZone: fieldValue];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 7:
- if (fieldType == TType_BOOL) {
- BOOL fieldValue = [inProtocol readBool];
- [self setInactive: 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: @"NoteFilter"];
- if (__order_isset) {
- [outProtocol writeFieldBeginWithName: @"order" type: TType_I32 fieldID: 1];
- [outProtocol writeI32: __order];
- [outProtocol writeFieldEnd];
- }
- if (__ascending_isset) {
- [outProtocol writeFieldBeginWithName: @"ascending" type: TType_BOOL fieldID: 2];
- [outProtocol writeBool: __ascending];
- [outProtocol writeFieldEnd];
- }
- if (__words_isset) {
- if (__words != nil) {
- [outProtocol writeFieldBeginWithName: @"words" type: TType_STRING fieldID: 3];
- [outProtocol writeString: __words];
- [outProtocol writeFieldEnd];
- }
- }
- if (__notebookGuid_isset) {
- if (__notebookGuid != nil) {
- [outProtocol writeFieldBeginWithName: @"notebookGuid" type: TType_STRING fieldID: 4];
- [outProtocol writeString: __notebookGuid];
- [outProtocol writeFieldEnd];
- }
- }
- if (__tagGuids_isset) {
- if (__tagGuids != nil) {
- [outProtocol writeFieldBeginWithName: @"tagGuids" type: TType_LIST fieldID: 5];
- {
- [outProtocol writeListBeginWithElementType: TType_STRING size: [__tagGuids count]];
- int i49;
- for (i49 = 0; i49 < [__tagGuids count]; i49++)
- {
- [outProtocol writeString: [__tagGuids objectAtIndex: i49]];
- }
- [outProtocol writeListEnd];
- }
- [outProtocol writeFieldEnd];
- }
- }
- if (__timeZone_isset) {
- if (__timeZone != nil) {
- [outProtocol writeFieldBeginWithName: @"timeZone" type: TType_STRING fieldID: 6];
- [outProtocol writeString: __timeZone];
- [outProtocol writeFieldEnd];
- }
- }
- if (__inactive_isset) {
- [outProtocol writeFieldBeginWithName: @"inactive" type: TType_BOOL fieldID: 7];
- [outProtocol writeBool: __inactive];
- [outProtocol writeFieldEnd];
- }
- [outProtocol writeFieldStop];
- [outProtocol writeStructEnd];
- }
- - (NSString *) description {
- NSMutableString * ms = [NSMutableString stringWithString: @"NoteFilter("];
- [ms appendString: @"order:"];
- [ms appendFormat: @"%i", __order];
- [ms appendString: @",ascending:"];
- [ms appendFormat: @"%i", __ascending];
- [ms appendString: @",words:"];
- [ms appendFormat: @"\"%@\"", __words];
- [ms appendString: @",notebookGuid:"];
- [ms appendFormat: @"\"%@\"", __notebookGuid];
- [ms appendString: @",tagGuids:"];
- [ms appendFormat: @"%@", __tagGuids];
- [ms appendString: @",timeZone:"];
- [ms appendFormat: @"\"%@\"", __timeZone];
- [ms appendString: @",inactive:"];
- [ms appendFormat: @"%i", __inactive];
- [ms appendString: @")"];
- return [NSString stringWithString: ms];
- }
- @end
- @implementation EDAMNoteList
- #if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
- @dynamic startIndex;
- @dynamic totalNotes;
- @dynamic notes;
- @dynamic stoppedWords;
- @dynamic searchedWords;
- #endif
- - (id) initWithStartIndex: (int32_t) startIndex totalNotes: (int32_t) totalNotes notes: (NSArray *) notes stoppedWords: (NSArray *) stoppedWords searchedWords: (NSArray *) searchedWords
- {
- self = [super init];
- __startIndex = startIndex;
- __startIndex_isset = YES;
- __totalNotes = totalNotes;
- __totalNotes_isset = YES;
- __notes = [notes retain];
- __notes_isset = YES;
- __stoppedWords = [stoppedWords retain];
- __stoppedWords_isset = YES;
- __searchedWords = [searchedWords retain];
- __searchedWords_isset = YES;
- return self;
- }
- - (id) initWithCoder: (NSCoder *) decoder
- {
- self = [super init];
- if ([decoder containsValueForKey: @"startIndex"])
- {
- __startIndex = [decoder decodeInt32ForKey: @"startIndex"];
- __startIndex_isset = YES;
- }
- if ([decoder containsValueForKey: @"totalNotes"])
- {
- __totalNotes = [decoder decodeInt32ForKey: @"totalNotes"];
- __totalNotes_isset = YES;
- }
- if ([decoder containsValueForKey: @"notes"])
- {
- __notes = [[decoder decodeObjectForKey: @"notes"] retain];
- __notes_isset = YES;
- }
- if ([decoder containsValueForKey: @"stoppedWords"])
- {
- __stoppedWords = [[decoder decodeObjectForKey: @"stoppedWords"] retain];
- __stoppedWords_isset = YES;
- }
- if ([decoder containsValueForKey: @"searchedWords"])
- {
- __searchedWords = [[decoder decodeObjectForKey: @"searchedWords"] retain];
- __searchedWords_isset = YES;
- }
- return self;
- }
- - (void) encodeWithCoder: (NSCoder *) encoder
- {
- if (__startIndex_isset)
- {
- [encoder encodeInt32: __startIndex forKey: @"startIndex"];
- }
- if (__totalNotes_isset)
- {
- [encoder encodeInt32: __totalNotes forKey: @"totalNotes"];
- }
- if (__notes_isset)
- {
- [encoder encodeObject: __notes forKey: @"notes"];
- }
- if (__stoppedWords_isset)
- {
- [encoder encodeObject: __stoppedWords forKey: @"stoppedWords"];
- }
- if (__searchedWords_isset)
- {
- [encoder encodeObject: __searchedWords forKey: @"searchedWords"];
- }
- }
- - (void) dealloc
- {
- [__notes release];
- [__stoppedWords release];
- [__searchedWords release];
- [super dealloc];
- }
- - (int32_t) startIndex {
- return __startIndex;
- }
- - (void) setStartIndex: (int32_t) startIndex {
- __startIndex = startIndex;
- __startIndex_isset = YES;
- }
- - (BOOL) startIndexIsSet {
- return __startIndex_isset;
- }
- - (void) unsetStartIndex {
- __startIndex_isset = NO;
- }
- - (int32_t) totalNotes {
- return __totalNotes;
- }
- - (void) setTotalNotes: (int32_t) totalNotes {
- __totalNotes = totalNotes;
- __totalNotes_isset = YES;
- }
- - (BOOL) totalNotesIsSet {
- return __totalNotes_isset;
- }
- - (void) unsetTotalNotes {
- __totalNotes_isset = NO;
- }
- - (NSArray *) notes {
- return [[__notes retain] autorelease];
- }
- - (void) setNotes: (NSArray *) notes {
- [notes retain];
- [__notes release];
- __notes = notes;
- __notes_isset = YES;
- }
- - (BOOL) notesIsSet {
- return __notes_isset;
- }
- - (void) unsetNotes {
- [__notes release];
- __notes = nil;
- __notes_isset = NO;
- }
- - (NSArray *) stoppedWords {
- return [[__stoppedWords retain] autorelease];
- }
- - (void) setStoppedWords: (NSArray *) stoppedWords {
- [stoppedWords retain];
- [__stoppedWords release];
- __stoppedWords = stoppedWords;
- __stoppedWords_isset = YES;
- }
- - (BOOL) stoppedWordsIsSet {
- return __stoppedWords_isset;
- }
- - (void) unsetStoppedWords {
- [__stoppedWords release];
- __stoppedWords = nil;
- __stoppedWords_isset = NO;
- }
- - (NSArray *) searchedWords {
- return [[__searchedWords retain] autorelease];
- }
- - (void) setSearchedWords: (NSArray *) searchedWords {
- [searchedWords retain];
- [__searchedWords release];
- __searchedWords = searchedWords;
- __searchedWords_isset = YES;
- }
- - (BOOL) searchedWordsIsSet {
- return __searchedWords_isset;
- }
- - (void) unsetSearchedWords {
- [__searchedWords release];
- __searchedWords = nil;
- __searchedWords_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_I32) {
- int32_t fieldValue = [inProtocol readI32];
- [self setStartIndex: fieldValue];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 2:
- if (fieldType == TType_I32) {
- int32_t fieldValue = [inProtocol readI32];
- [self setTotalNotes: fieldValue];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 3:
- if (fieldType == TType_LIST) {
- int _size50;
- [inProtocol readListBeginReturningElementType: NULL size: &_size50];
- NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size50];
- int _i51;
- for (_i51 = 0; _i51 < _size50; ++_i51)
- {
- EDAMNote *_elem52 = [[EDAMNote alloc] init];
- [_elem52 read: inProtocol];
- [fieldValue addObject: _elem52];
- [_elem52 release];
- }
- [inProtocol readListEnd];
- [self setNotes: fieldValue];
- [fieldValue release];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 4:
- if (fieldType == TType_LIST) {
- int _size53;
- [inProtocol readListBeginReturningElementType: NULL size: &_size53];
- NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size53];
- int _i54;
- for (_i54 = 0; _i54 < _size53; ++_i54)
- {
- NSString * _elem55 = [inProtocol readString];
- [fieldValue addObject: _elem55];
- }
- [inProtocol readListEnd];
- [self setStoppedWords: fieldValue];
- [fieldValue release];
- } else {
- [TProtocolUtil skipType: fieldType onProtocol: inProtocol];
- }
- break;
- case 5:
- if (fieldType == TType_LIST) {
- int _size56;
- [inProtocol readListBeginReturningElementType: NULL size: &_size56];
- NSMutableArray * fieldValue = [[NSMutableArray alloc] initWithCapacity: _size56];
- int _i57;
- for (_i57 = 0; _i57 < _size56; ++_i57)
- {
- NSString * _elem58 = [inProtocol readString];
- [fieldValue addObject: _elem58];
- }
- [inProtocol readListEnd];
- [self setSearchedWords: 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: @"NoteList"];
- if (__startIndex_isset) {
- [outProtocol writeFieldBeginWithName: @"startIndex" type: TType_I32 fieldID: 1];
- [outProtocol writeI32: __startIndex];
- [outProtocol writeFieldEnd];
- }
- if (__totalNotes_isset) {
- [outProtocol writeFieldBeginWithName: @"totalNotes" type: TType_I32 fieldID: 2];
- [outProtocol writeI32: __totalNotes];
- [outProtocol writeFieldEnd];
- }
- if (__notes_isset) {
- if (__notes != nil) {
- [outProtocol writeFieldBeginWithName: @"notes" type: TType_LIST fieldID: 3];
- {
- [outProtocol writeListBeginWithElementType: TType_STRUCT size: [__notes count]];
- int i60;
- for (i60 = 0; i60 < [__notes count]; i60++)
- {
- [[__notes objectAtIndex: i60] write: outProtocol];
- }
- [outProtocol writeListEnd];
- }
- [outProtocol writeFieldEnd];
- }
- }
- if (__stoppedWords_isset) {
- if (__stoppedWords != nil) {
- [outProtocol writeFieldBeginWithName: @"stoppedWords" type: TType_LIST fieldID: 4];
- {
- [outProtocol writeListBeginWithElementType: TType_STRING size: [__stoppedWords count]];
- int i62;
- for (i62 = 0; i62 < [__stoppedWords count]; i62++)
- {
- [outProtocol writeString: [__stoppedWords objectAtIndex: i62]];
- }
- [outProtocol writeListEnd];
- }
- [outProtocol writeFieldEnd];
- }
- }
- if (__searchedWords_isset) {
- if (__searchedWords != nil) {
- [outProtocol writeFieldBeginWithName: @"searchedWords" type: TType_LIST fieldID: 5];
- {
- [outProtocol writeListBeginWithElementType: TType_STRING size: [__searchedWords count]];
- int i64;
- for (i64 = 0; i64 < [__searchedWords count]; i64++)
- {
- [outProtocol writeString: [__searchedWords objectAtIndex: i64]];
- }
- [outProtocol writeListEnd];
- }
- [outProtocol writeFieldEnd];
- }
- }
- [outProtocol writeFieldStop];
- [outProtocol writeStructEnd];
- }
- - (NSString