Revision: 29498
          http://sourceforge.net/p/bibdesk/svn/29498
Author:   hofman
Date:     2025-08-29 21:49:43 +0000 (Fri, 29 Aug 2025)
Log Message:
-----------
declare and use BDSKDownloadOption in BDSKItemDownload interface

Modified Paths:
--------------
    trunk/bibdesk/BDSKItemDownload.h
    trunk/bibdesk/BDSKItemDownload.m
    trunk/bibdesk/BibItem.h

Modified: trunk/bibdesk/BDSKItemDownload.h
===================================================================
--- trunk/bibdesk/BDSKItemDownload.h    2025-08-29 15:42:11 UTC (rev 29497)
+++ trunk/bibdesk/BDSKItemDownload.h    2025-08-29 21:49:43 UTC (rev 29498)
@@ -41,6 +41,12 @@
 
 NS_ASSUME_NONNULL_BEGIN
 
+typedef NS_OPTIONS(NSUInteger, BDSKDownloadOption) {
+    BDSKDownloadDefault = 0,
+    BDSKDownloadReplace = 1 << 0,
+    BDSKDownloadCheckType = 1 << 1,
+};
+
 @protocol BDSKItemDownloadDelegate;
 
 @class BDSKLinkedFile;
@@ -51,7 +57,7 @@
     BDSKLinkedFile *linkedFile;
     NSURL *URL;
     NSUInteger index;
-    NSUInteger options;
+    BDSKDownloadOption options;
     int64_t expectedLength, receivedLength;
     NSURL *fileURL;
 }
@@ -61,12 +67,12 @@
 @property (nonatomic, readonly) NSURL *URL;
 @property (nonatomic, nullable, readonly) NSURLResponse *response;
 @property (nonatomic) NSUInteger index;
-@property (nonatomic, readonly) NSUInteger options;
+@property (nonatomic, readonly) BDSKDownloadOption options;
 @property (nonatomic, readonly) double progress;
 @property (nonatomic, nullable, readonly) NSURL *fileURL;
 
-- (instancetype)initWithLinkedFile:(BDSKLinkedFile *)aLinkedFile 
atIndex:(NSUInteger)anIndex options:(NSUInteger)anOptions;
-- (instancetype)initWithURL:(NSURL *)aURL options:(NSUInteger)anOptions;
+- (instancetype)initWithLinkedFile:(BDSKLinkedFile *)aLinkedFile 
atIndex:(NSUInteger)anIndex options:(BDSKDownloadOption)anOptions;
+- (instancetype)initWithURL:(NSURL *)aURL 
options:(BDSKDownloadOption)anOptions;
 
 - (void)start;
 - (void)cancel;

Modified: trunk/bibdesk/BDSKItemDownload.m
===================================================================
--- trunk/bibdesk/BDSKItemDownload.m    2025-08-29 15:42:11 UTC (rev 29497)
+++ trunk/bibdesk/BDSKItemDownload.m    2025-08-29 21:49:43 UTC (rev 29498)
@@ -47,7 +47,7 @@
 @synthesize delegate, linkedFile, URL, index, options, fileURL;
 @dynamic response, progress;
 
-- (instancetype)initWithURL:(NSURL *)aURL options:(NSUInteger)anOptions {
+- (instancetype)initWithURL:(NSURL *)aURL 
options:(BDSKDownloadOption)anOptions {
     self = [super init];
     if (self) {
         linkedFile = nil;
@@ -61,7 +61,7 @@
     return self;
 }
 
-- (instancetype)initWithLinkedFile:(BDSKLinkedFile *)aLinkedFile 
atIndex:(NSUInteger)anIndex options:(NSUInteger)anOptions {
+- (instancetype)initWithLinkedFile:(BDSKLinkedFile *)aLinkedFile 
atIndex:(NSUInteger)anIndex options:(BDSKDownloadOption)anOptions {
     self = [super init];
     if (self) {
         linkedFile = aLinkedFile;

Modified: trunk/bibdesk/BibItem.h
===================================================================
--- trunk/bibdesk/BibItem.h     2025-08-29 15:42:11 UTC (rev 29497)
+++ trunk/bibdesk/BibItem.h     2025-08-29 21:49:43 UTC (rev 29498)
@@ -84,12 +84,6 @@
     BDSKFieldActionAsk = 3
 };
 
-typedef NS_OPTIONS(NSUInteger, BDSKDownloadOption) {
-    BDSKDownloadDefault = 0,
-    BDSKDownloadReplace = 1 << 0,
-    BDSKDownloadCheckType = 1 << 1,
-};
-
 @class BibDocument, BDSKCategoryGroup, BibAuthor, BDSKFieldCollection, 
BDSKTemplate, BDSKPublicationsArray, BDSKMacroResolver;
 @protocol BDSKOwner;
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to