Revision: 29221 http://sourceforge.net/p/bibdesk/svn/29221 Author: hofman Date: 2025-04-27 16:40:20 +0000 (Sun, 27 Apr 2025) Log Message: ----------- Rename enum values
Modified Paths: -------------- trunk/bibdesk/BDSKEntrezGroupServer.m Modified: trunk/bibdesk/BDSKEntrezGroupServer.m =================================================================== --- trunk/bibdesk/BDSKEntrezGroupServer.m 2025-04-27 16:37:14 UTC (rev 29220) +++ trunk/bibdesk/BDSKEntrezGroupServer.m 2025-04-27 16:40:20 UTC (rev 29221) @@ -79,7 +79,7 @@ @synthesize searchTerm, errorMessage, webEnv, queryKey; -enum { BDSKIdleState, BDSKEsearchState, BDSKEfetchState }; +enum { BDSKEntrezStateIdle, BDSKEntrezStateEsearch, BDSKEntrezStateEfetch }; + (NSString *)baseURLString { return @"https://eutils.ncbi.nlm.nih.gov/entrez/eutils"; } @@ -107,7 +107,7 @@ limitResults = 0; requestedResults = 0; download = nil; - downloadState = BDSKIdleState; + downloadState = BDSKEntrezStateIdle; errorMessage = nil; } return self; @@ -129,7 +129,7 @@ { [download cancel]; download = nil; - downloadState = BDSKIdleState; + downloadState = BDSKEntrezStateIdle; } - (void)retrieveWithSearchTerm:(NSString *)aSearchTerm { @@ -163,7 +163,7 @@ - (BOOL)failedDownload { return failedDownload; } -- (BOOL)isRetrieving { return BDSKIdleState != downloadState; } +- (BOOL)isRetrieving { return BDSKEntrezStateIdle != downloadState; } - (NSFormatter *)searchStringFormatter { return nil; } @@ -180,7 +180,7 @@ NSURL *initialURL = [[self class] esearchURLWithDatabase:[[self serverInfo] database] searchTerm:[self searchTerm]]; BDSKPRECONDITION(initialURL); - downloadState = BDSKEsearchState; + downloadState = BDSKEntrezStateEsearch; [self startDownloadFromURL:initialURL]; needsReset = NO; } @@ -189,7 +189,7 @@ - (void)fetch; { if ([self webEnv] == nil || [self queryKey] == nil || [self numberOfAvailableResults] <= [self numberOfFetchedResults]) { - downloadState = BDSKIdleState; + downloadState = BDSKEntrezStateIdle; [group addPublications:@[]]; return; } @@ -202,7 +202,7 @@ requestedResults = returnRange.length; - downloadState = BDSKEfetchState; + downloadState = BDSKEntrezStateEfetch; [self startDownloadFromURL:theURL]; } @@ -216,7 +216,7 @@ if ([[error domain] isEqualToString:NSURLErrorDomain] && [error code] == NSURLErrorCancelled) return; - downloadState = BDSKIdleState; + downloadState = BDSKEntrezStateIdle; failedDownload = YES; [self setErrorMessage:[error localizedDescription]]; @@ -234,10 +234,10 @@ download = nil; switch (downloadState) { - case BDSKEsearchState: + case BDSKEntrezStateEsearch: { // okay to reset state before calling -fetch - downloadState = BDSKIdleState; + downloadState = BDSKEntrezStateIdle; NSXMLDocument *document = nil; if (data) @@ -265,7 +265,7 @@ break; } - case BDSKEfetchState: + case BDSKEntrezStateEfetch: { // specifically requested the XML type, so go straight to the correct parser NSArray *pubs = [BDSKPubMedXMLParser itemsFromData:data error:&presentableError]; @@ -278,7 +278,7 @@ failedDownload = YES; [self setErrorMessage:[presentableError localizedDescription]]; // set before addPublications: - downloadState = BDSKIdleState; + downloadState = BDSKEntrezStateIdle; [group addPublications:nil]; } else if (limitResults > [self numberOfFetchedResults]) { @@ -287,12 +287,12 @@ } else { // set before addPublications: - downloadState = BDSKIdleState; + downloadState = BDSKEntrezStateIdle; [group addPublications:pubs]; } break; } - case BDSKIdleState: + case BDSKEntrezStateIdle: break; default: [NSException raise:NSInternalInconsistencyException format:@"Unhandled case %ld", (long)downloadState]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit