Revision: 29210 http://sourceforge.net/p/bibdesk/svn/29210 Author: hofman Date: 2025-04-27 13:53:33 +0000 (Sun, 27 Apr 2025) Log Message: ----------- Rename enum values
Modified Paths: -------------- trunk/bibdesk/BDSKSRUGroupServer.m Modified: trunk/bibdesk/BDSKSRUGroupServer.m =================================================================== --- trunk/bibdesk/BDSKSRUGroupServer.m 2025-04-27 08:47:13 UTC (rev 29209) +++ trunk/bibdesk/BDSKSRUGroupServer.m 2025-04-27 13:53:33 UTC (rev 29210) @@ -51,7 +51,7 @@ #define DC_STRING @"DC" #define MODS_STRING @"MODS" -enum { BDSKIdleState, BDSKSearchState, BDSKFetchState }; +enum { BDSKSRUStateIdle, BDSKSRUStateSearch, BDSKSRUStateFetch }; @interface BDSKSRUGroupServer () @@ -84,7 +84,7 @@ fetchedResults = 0; requestedResults = 0; download = nil; - downloadState = BDSKIdleState; + downloadState = BDSKSRUStateIdle; errorMessage = nil; } return self; @@ -139,7 +139,7 @@ - (void)terminate { [download cancel]; download = nil; - downloadState = BDSKIdleState; + downloadState = BDSKSRUStateIdle; } - (void)retrieveWithSearchTerm:(NSString *)aSearchTerm { @@ -171,7 +171,7 @@ - (BOOL)failedDownload { return failedDownload; } -- (BOOL)isRetrieving { return BDSKIdleState != downloadState; } +- (BOOL)isRetrieving { return BDSKSRUStateIdle != downloadState; } - (NSFormatter *)searchStringFormatter { return nil; } @@ -185,7 +185,7 @@ NSURL *initialURL = [self searchURLWithRange:NSMakeRange(0, 0)]; BDSKPRECONDITION(initialURL); - downloadState = BDSKSearchState; + downloadState = BDSKSRUStateSearch; [self startDownloadFromURL:initialURL]; needsReset = NO; } @@ -212,7 +212,7 @@ - (void)fetch { if ([self numberOfAvailableResults] <= [self numberOfFetchedResults]) { - downloadState = BDSKIdleState; + downloadState = BDSKSRUStateIdle; [group addPublications:@[]]; return; } @@ -224,7 +224,7 @@ requestedResults = returnRange.length; - downloadState = BDSKFetchState; + downloadState = BDSKSRUStateFetch; [self startDownloadFromURL:theURL]; } @@ -236,7 +236,7 @@ if ([[error domain] isEqualToString:NSURLErrorDomain] && [error code] == NSURLErrorCancelled) return; - downloadState = BDSKIdleState; + downloadState = BDSKSRUStateIdle; failedDownload = YES; [self setErrorMessage:[error localizedDescription]]; @@ -253,10 +253,10 @@ download = nil; switch (downloadState) { - case BDSKSearchState: + case BDSKSRUStateSearch: { // okay to reset state before calling -fetch - downloadState = BDSKIdleState; + downloadState = BDSKSRUStateIdle; // parse the result opf the search NSXMLDocument *document = nil; @@ -283,7 +283,7 @@ break; } - case BDSKFetchState: + case BDSKSRUStateFetch: { // the number of returned results is not always equal to what we requested // fetchedResults should track the requests to get the correct offset @@ -311,18 +311,18 @@ } // set before addPublications: - downloadState = BDSKIdleState; + downloadState = BDSKSRUStateIdle; [group addPublications:pubs]; } else { failedDownload = YES; [self setErrorMessage:NSLocalizedString(@"Could not retrieve results", @"")]; // set before addPublications: - downloadState = BDSKIdleState; + downloadState = BDSKSRUStateIdle; [group addPublications:nil]; } break; } - case BDSKIdleState: + case BDSKSRUStateIdle: 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