Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Channel/Sources/EDOBlockingQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ NS_ASSUME_NONNULL_BEGIN
@interface EDOBlockingQueue<ObjectType> : NSObject

/** Whether the queue has any objects. */
@property(readonly, getter=isEmpty) BOOL empty;
@property(atomic, readonly, getter=isEmpty) BOOL empty;

/** The number of objects in the queue. */
@property(readonly) NSUInteger count;
@property(atomic, readonly) NSUInteger count;

/** Appends the @c object to the end of the queue.
*
Expand Down
2 changes: 1 addition & 1 deletion Channel/Sources/EDOChannelMultiplexer.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ NS_ASSUME_NONNULL_BEGIN
@property(readonly, nonatomic) EDOHostPort *port;

/** The number of channels that are set up with the forwarder and ready to connect. */
@property(readonly) NSUInteger numberOfChannels;
@property(readonly, nonatomic) NSUInteger numberOfChannels;

/**
* Starts the multiplexer on the given @c port.
Expand Down
4 changes: 2 additions & 2 deletions Channel/Sources/EDOChannelPool.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ NS_ASSUME_NONNULL_BEGIN
@interface EDOChannelPool : NSObject

/** The singleton of @c EDOChannelPool. */
@property(class, readonly) EDOChannelPool *sharedChannelPool;
@property(atomic, class, readonly) EDOChannelPool *sharedChannelPool;

/**
* A port for clients to accept connection, and receive host name to register as service. This port
* will lazily create a listen socket when accessed.
*/
@property(readonly) UInt16 serviceConnectionPort;
@property(nonatomic, readonly) UInt16 serviceConnectionPort;

/**
* Fetches an already-connected channel from the pool, keyed by the host @c port.
Expand Down
2 changes: 1 addition & 1 deletion Channel/Sources/EDOHostPort.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ NS_ASSUME_NONNULL_BEGIN
* TODO(haowoo): This will be used to identify whether the host is on a real device or a machine
* later, to replace deviceSerialNumber.
*/
@property(readonly, class) NSString *deviceIdentifier;
@property(readonly, class, nonatomic) NSString *deviceIdentifier;

/** The listen port number of the host. 0 if the host port is identified by name. */
@property(readonly, nonatomic) UInt16 port;
Expand Down
4 changes: 2 additions & 2 deletions Device/Sources/EDODeviceConnector.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ extern NSString *const EDODeviceIDKey;
@interface EDODeviceConnector : NSObject

/** The serial numbers of connected devices. */
@property(readonly) NSArray<NSString *> *connectedDevices;
@property(nonatomic, readonly) NSArray<NSString *> *connectedDevices;
/** Shared device connector. */
@property(readonly, class) EDODeviceConnector *sharedConnector;
@property(atomic, readonly, class) EDODeviceConnector *sharedConnector;

- (instancetype)init NS_UNAVAILABLE;

Expand Down
8 changes: 1 addition & 7 deletions Device/Sources/EDODeviceDetector.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ @interface EDODeviceDetector ()
* is called.
*/
@property(nonatomic) EDODeviceChannel *channel;
/** @c YES if the detector has already started to listen to broadcast. */
@property(readonly) BOOL started;

@end

Expand All @@ -37,7 +35,7 @@ - (BOOL)listenToBroadcastWithError:(NSError **)error
__block NSError *resultError;
EDODeviceChannel *deviceChannel;
@synchronized(self) {
if (!self.started) {
if (!self.channel) {
deviceChannel = [EDODeviceChannel channelWithError:&resultError];
self.channel = deviceChannel;
} else {
Expand Down Expand Up @@ -93,10 +91,6 @@ - (void)cancel {
}
}

- (BOOL)started {
return self.channel != nil;
}

#pragma mark - Private

- (void)edo_scheduleReadBroadcastPacketWithHandler:(EDOBroadcastHandler)handler {
Expand Down
6 changes: 3 additions & 3 deletions Service/Sources/EDOHostNamingService.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ NS_ASSUME_NONNULL_BEGIN
@interface EDOHostNamingService : NSObject

/** The default port number 11237 which the naming service will be listening on. */
@property(class, readonly) UInt16 namingServerPort;
@property(nonatomic, class, readonly) UInt16 namingServerPort;

/** Shared singleton instance. */
@property(class, readonly) EDOHostNamingService *sharedService;
@property(atomic, class, readonly) EDOHostNamingService *sharedService;

/**
* The port for service registration. Clients can connect to this port to register their
* services by name.
*/
@property(readonly) UInt16 serviceConnectionPort;
@property(nonatomic, readonly) UInt16 serviceConnectionPort;

- (instancetype)init NS_UNAVAILABLE;

Expand Down
2 changes: 1 addition & 1 deletion Service/Sources/EDORemoteException.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface EDORemoteException : NSException <NSSecureCoding>

/** The merged call stack traces of both client process and host process. */
@property(readonly, copy) NSArray<NSString *> *callStackSymbols;
@property(atomic, readonly, copy) NSArray<NSString *> *callStackSymbols;

/** EDORemoteException cannot be initialized with default data members. */
- (instancetype)init NS_UNAVAILABLE;
Expand Down
2 changes: 1 addition & 1 deletion Service/Sources/EDOServiceRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ typedef EDOServiceResponse *_Nonnull (^EDORequestHandler)(EDOServiceRequest *req
* The sub classes should override this and provide its own handler. The default implementation
* returns an EDOErrorRequestNotHandled response.
*/
@property(readonly, class) EDORequestHandler requestHandler;
@property(readonly, class, nonatomic) EDORequestHandler requestHandler;

- (instancetype)initWithMessageID:(NSString *)messageID NS_UNAVAILABLE;

Expand Down