Revision: 24055
http://sourceforge.net/p/bibdesk/svn/24055
Author: hofman
Date: 2019-07-18 21:58:17 +0000 (Thu, 18 Jul 2019)
Log Message:
-----------
use properties for some private classes
Modified Paths:
--------------
trunk/bibdesk/BDSKSharingClient.m
trunk/bibdesk/BDSKSharingServer.m
Modified: trunk/bibdesk/BDSKSharingClient.m
===================================================================
--- trunk/bibdesk/BDSKSharingClient.m 2019-07-18 21:43:57 UTC (rev 24054)
+++ trunk/bibdesk/BDSKSharingClient.m 2019-07-18 21:58:17 UTC (rev 24055)
@@ -85,13 +85,11 @@
- (id)initWithClient:(BDSKSharingClient *)aClient andService:(NSNetService
*)aService;
-- (BOOL)isRetrieving;
-- (void)setRetrieving:(BOOL)flag;
-- (BOOL)needsAuthentication;
-- (BOOL)authenticationFailed;
-- (BOOL)failedDownload;
-- (NSString *)errorMessage;
-- (void)setErrorMessage:(NSString *)newErrorMessage;
+@property (nonatomic, getter=isRetrieving) BOOL retrieving;
+@property (nonatomic, readonly) BOOL needsAuthentication;
+@property (nonatomic, readonly) BOOL authenticationFailed;
+@property (nonatomic, readonly) BOOL failedDownload;
+@property (nonatomic, copy) NSString *errorMessage;
// proxy object for messaging the remote server
- (id <BDSKSharingServer>)remoteServer;
@@ -190,6 +188,9 @@
@implementation BDSKSharingClientServer
+@synthesize errorMessage;
+@dynamic retrieving, needsAuthentication, authenticationFailed, failedDownload;
+
// If we introduce incompatible changes in future, bump this to avoid sharing
breakage
// Note we should always support -invalidate, as this can be called when we're
not accepted
+ (NSString *)supportedProtocolVersion { return @"0"; }
@@ -269,23 +270,6 @@
return flags.failedDownload == 1;
}
-- (NSString *)errorMessage {
- NSString *msg;
- @synchronized(self) {
- msg = [[errorMessage copy] autorelease];
- }
- return msg;
-}
-
-- (void)setErrorMessage:(NSString *)newErrorMessage {
- @synchronized(self) {
- if (errorMessage != newErrorMessage) {
- [errorMessage release];
- errorMessage = [newErrorMessage copy];
- }
- }
-}
-
#pragma mark Proxies
- (id <BDSKSharingServer>)remoteServer;
Modified: trunk/bibdesk/BDSKSharingServer.m
===================================================================
--- trunk/bibdesk/BDSKSharingServer.m 2019-07-18 21:43:57 UTC (rev 24054)
+++ trunk/bibdesk/BDSKSharingServer.m 2019-07-18 21:58:17 UTC (rev 24055)
@@ -120,8 +120,7 @@
- (id)initForSharingServer:(BDSKSharingServer *)aSharingServer;
-- (NSUInteger)numberOfConnections;
-- (void)setNumberOfConnections:(NSUInteger)count;
+@property NSUInteger numberOfConnections;
- (void)notifyClientConnectionsChanged;
@@ -533,6 +532,8 @@
@implementation BDSKSharingDOServer
+@dynamic numberOfConnections;
+
// This is the minimal version for the client that we require
// If we introduce incompatible changes in future, bump this to avoid sharing
breakage
+ (NSString *)requiredProtocolVersion { return @"0"; }
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