Skip to content

Commit

Permalink
I've added NS_SWIFT_SENDABLE to every type that has a docstring and…
Browse files Browse the repository at this point in the history
… their accompanied enums and params types.
  • Loading branch information
maratal committed Aug 23, 2024
1 parent 55ad795 commit 0ac6b31
Show file tree
Hide file tree
Showing 43 changed files with 75 additions and 0 deletions.
1 change: 1 addition & 0 deletions Source/PrivateHeaders/Ably/ARTAttachRequestParams.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
Provides parameters for a request to perform an operation that may ultimately call `ARTChannelRealtimeInternal`’s `internalAttach:callback:` method.
*/
NS_SWIFT_SENDABLE
NS_SWIFT_NAME(AttachRequestParams)
@interface ARTAttachRequestParams: NSObject

Expand Down
1 change: 1 addition & 0 deletions Source/PrivateHeaders/Ably/ARTChannelStateChangeParams.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ NS_ASSUME_NONNULL_BEGIN
`ARTRealtimeChannelInternal` will incorporate some of this data into the `ARTChannelStateChange` object that it emits as a result of the connection state change.
*/
NS_SWIFT_SENDABLE
NS_SWIFT_NAME(ChannelStateChangeParams)
@interface ARTChannelStateChangeParams: NSObject

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ NS_ASSUME_NONNULL_BEGIN
`ARTRealtimeInternal` will incorporate this data into the `ARTConnectionStateChange` object that it emits as a result of the connection state change.
*/
NS_SWIFT_SENDABLE
NS_SWIFT_NAME(ConnectionStateChangeParams)
@interface ARTConnectionStateChangeParams: NSObject

Expand Down
1 change: 1 addition & 0 deletions Source/PrivateHeaders/Ably/ARTTestClientOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ NS_ASSUME_NONNULL_BEGIN
This is for anything that test code wishes to be able to configure but which should not be part of the public API of these classes.
*/
NS_SWIFT_SENDABLE
@interface ARTTestClientOptions: NSObject <NSCopying>

/**
Expand Down
1 change: 1 addition & 0 deletions Source/include/Ably/ARTAuth.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ NS_ASSUME_NONNULL_BEGIN
*
* @see See `ARTAuthProtocol` for details.
*/
NS_SWIFT_SENDABLE
@interface ARTAuth : NSObject <ARTAuthProtocol>

@end
Expand Down
1 change: 1 addition & 0 deletions Source/include/Ably/ARTAuthDetails.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Contains the token string used to authenticate a client with Ably.
*/
NS_SWIFT_SENDABLE
@interface ARTAuthDetails : NSObject<NSCopying>

/**
Expand Down
1 change: 1 addition & 0 deletions Source/include/Ably/ARTAuthOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Passes authentication-specific properties in authentication requests to Ably. Properties set using `ARTAuthOptions` are used instead of the default values set when the client library is instantiated, as opposed to being merged with them.
*/
NS_SWIFT_SENDABLE
@interface ARTAuthOptions : NSObject<NSCopying>

/**
Expand Down
1 change: 1 addition & 0 deletions Source/include/Ably/ARTChannel.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ NS_ASSUME_NONNULL_BEGIN
*
* @see See `ARTChannelProtocol` for details.
*/
NS_SWIFT_SENDABLE
@interface ARTChannel : NSObject<ARTChannelProtocol>

/// :nodoc:
Expand Down
1 change: 1 addition & 0 deletions Source/include/Ably/ARTChannelOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Passes additional properties to an `ARTRestChannel` object, such as encryption.
*/
NS_SWIFT_SENDABLE
@interface ARTChannelOptions : NSObject

/**
Expand Down
1 change: 1 addition & 0 deletions Source/include/Ably/ARTChannels.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/**
* Creates and destroys `ARTRestChannel` and `ARTRealtimeChannel` objects.
*/
NS_SWIFT_SENDABLE
@interface ARTChannels<ChannelType> : NSObject

/**
Expand Down
1 change: 1 addition & 0 deletions Source/include/Ably/ARTClientOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Passes additional client-specific properties to the REST `-[ARTRestProtocol initWithOptions:]` or the Realtime `-[ARTRealtimeProtocol initWithOptions:]`.
*/
NS_SWIFT_SENDABLE
@interface ARTClientOptions : ARTAuthOptions

/**
Expand Down
1 change: 1 addition & 0 deletions Source/include/Ably/ARTConnection.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ ART_EMBED_INTERFACE_EVENT_EMITTER(ARTRealtimeConnectionEvent, ARTConnectionState
*
* @see See `ARTConnectionProtocol` for details.
*/
NS_SWIFT_SENDABLE
@interface ARTConnection: NSObject <ARTConnectionProtocol>

@end
Expand Down
1 change: 1 addition & 0 deletions Source/include/Ably/ARTConnectionDetails.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
/**
* Contains any constraints a client should adhere to and provides additional metadata about a `ARTConnection`, such as if a request to `-[ARTChannelProtocol publish:callback:]` a message that exceeds the maximum message size should be rejected immediately without communicating with Ably.
*/
NS_SWIFT_SENDABLE
@interface ARTConnectionDetails : NSObject

NS_ASSUME_NONNULL_BEGIN
Expand Down
3 changes: 3 additions & 0 deletions Source/include/Ably/ARTDataQuery.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
NS_ASSUME_NONNULL_BEGIN

/// :nodoc:
NS_SWIFT_SENDABLE
typedef NS_ENUM(NSUInteger, ARTQueryDirection) {
ARTQueryDirectionForwards,
ARTQueryDirectionBackwards
Expand All @@ -13,6 +14,7 @@ typedef NS_ENUM(NSUInteger, ARTQueryDirection) {
/**
This object is used for providing parameters into methods with paginated results.
*/
NS_SWIFT_SENDABLE
@interface ARTDataQuery : NSObject

/**
Expand Down Expand Up @@ -40,6 +42,7 @@ typedef NS_ENUM(NSUInteger, ARTQueryDirection) {
/**
This object is used for providing parameters into `ARTRealtimePresence`'s methods with paginated results.
*/
NS_SWIFT_SENDABLE
@interface ARTRealtimeHistoryQuery : ARTDataQuery

/**
Expand Down
1 change: 1 addition & 0 deletions Source/include/Ably/ARTDeviceDetails.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Contains the properties of a device registered for push notifications.
*/
NS_SWIFT_SENDABLE
@interface ARTDeviceDetails : NSObject

/**
Expand Down
1 change: 1 addition & 0 deletions Source/include/Ably/ARTDeviceIdentityTokenDetails.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* An object representing a unique device identity token used to communicate with APNS.
*/
NS_SWIFT_SENDABLE
@interface ARTDeviceIdentityTokenDetails : NSObject <NSSecureCoding>

/**
Expand Down
1 change: 1 addition & 0 deletions Source/include/Ably/ARTDevicePushDetails.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Contains the details of the push registration of a device.
*/
NS_SWIFT_SENDABLE
@interface ARTDevicePushDetails : NSObject

/**
Expand Down
2 changes: 2 additions & 0 deletions Source/include/Ably/ARTEventEmitter.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ NS_ASSUME_NONNULL_BEGIN
/**
An object representing a listener returned by `ARTEventEmitter` methods.
*/
NS_SWIFT_SENDABLE
@interface ARTEventListener : NSObject
@end

/**
* A generic interface for event registration and delivery used in a number of the types in the Realtime client library. For example, the `ARTConnection` and `ARTRealtimeChannel` objects emit events for their state using the `ARTEventEmitter` pattern.
*/
NS_SWIFT_SENDABLE
@interface ARTEventEmitter<EventType:id<ARTEventIdentification>, ItemType> : NSObject

/// :nodoc:
Expand Down
1 change: 1 addition & 0 deletions Source/include/Ably/ARTHTTPPaginatedResponse.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* A superset of `ARTPaginatedResult` which represents a page of results plus metadata indicating the relative queries available to it. `ARTHttpPaginatedResponse` additionally carries information about the response to an HTTP request.
*/
NS_SWIFT_SENDABLE
@interface ARTHTTPPaginatedResponse : ARTPaginatedResult<NSDictionary *>

/**
Expand Down
1 change: 1 addition & 0 deletions Source/include/Ably/ARTLocalDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Contains the device identity token and secret of a device. `ARTLocalDevice` extends `ARTDeviceDetails`.
*/
NS_SWIFT_SENDABLE
@interface ARTLocalDevice : ARTDeviceDetails

/**
Expand Down
1 change: 1 addition & 0 deletions Source/include/Ably/ARTMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Contains an individual message that is sent to, or received from, Ably.
*/
NS_SWIFT_SENDABLE
@interface ARTMessage : ARTBaseMessage

/// The event name, if available
Expand Down
1 change: 1 addition & 0 deletions Source/include/Ably/ARTPaginatedResult.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Contains a page of results for message or presence history, stats, or REST presence requests. An `ARTPaginatedResult` response from a REST API paginated query is also accompanied by metadata that indicates the relative queries available to the `ARTPaginatedResult` object.
*/
NS_SWIFT_SENDABLE
@interface ARTPaginatedResult<ItemType> : NSObject

/**
Expand Down
1 change: 1 addition & 0 deletions Source/include/Ably/ARTPresence.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
NS_ASSUME_NONNULL_BEGIN

/// :nodoc:
NS_SWIFT_SENDABLE
@interface ARTPresence : NSObject

- (void)history:(ARTPaginatedPresenceCallback)callback;
Expand Down
2 changes: 2 additions & 0 deletions Source/include/Ably/ARTPresenceMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/**
* Describes the possible actions members in the presence set can emit.
*/
NS_SWIFT_SENDABLE
typedef NS_ENUM(NSUInteger, ARTPresenceAction) {
/**
* A member is not present in the channel.
Expand Down Expand Up @@ -35,6 +36,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Contains an individual presence update sent to, or received from, Ably.
*/
NS_SWIFT_SENDABLE
@interface ARTPresenceMessage : ARTBaseMessage

/**
Expand Down
1 change: 1 addition & 0 deletions Source/include/Ably/ARTPush.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Enables a device to be registered and deregistered from receiving push notifications.
*/
NS_SWIFT_SENDABLE
@interface ARTPush : NSObject <ARTPushProtocol>

/**
Expand Down
1 change: 1 addition & 0 deletions Source/include/Ably/ARTPushAdmin.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Enables the management of device registrations and push notification subscriptions. Also enables the publishing of push notifications to devices.
*/
NS_SWIFT_SENDABLE
@interface ARTPushAdmin : NSObject <ARTPushAdminProtocol>

/**
Expand Down
1 change: 1 addition & 0 deletions Source/include/Ably/ARTPushChannel.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ NS_ASSUME_NONNULL_BEGIN
*
* @see See `ARTPushChannelProtocol` for details.
*/
NS_SWIFT_SENDABLE
@interface ARTPushChannel : NSObject <ARTPushChannelProtocol>

@end
Expand Down
1 change: 1 addition & 0 deletions Source/include/Ably/ARTPushChannelSubscription.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Contains the subscriptions of a device, or a group of devices sharing the same `clientId`, has to a channel in order to receive push notifications.
*/
NS_SWIFT_SENDABLE
@interface ARTPushChannelSubscription : NSObject

/**
Expand Down
1 change: 1 addition & 0 deletions Source/include/Ably/ARTPushChannelSubscriptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ NS_ASSUME_NONNULL_BEGIN
*
* @see See `ARTPushChannelSubscriptionsProtocol` for details.
*/
NS_SWIFT_SENDABLE
@interface ARTPushChannelSubscriptions : NSObject <ARTPushChannelSubscriptionsProtocol>

@end
Expand Down
1 change: 1 addition & 0 deletions Source/include/Ably/ARTPushDeviceRegistrations.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ NS_ASSUME_NONNULL_BEGIN
*
* @see See `ARTPushDeviceRegistrationsProtocol` for details.
*/
NS_SWIFT_SENDABLE
@interface ARTPushDeviceRegistrations : NSObject <ARTPushDeviceRegistrationsProtocol>

@end
Expand Down
1 change: 1 addition & 0 deletions Source/include/Ably/ARTRealtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* A client that extends the functionality of the `ARTRest` and provides additional realtime-specific features.
*/
NS_SWIFT_SENDABLE
@interface ARTRealtime : NSObject <ARTRealtimeProtocol>

/**
Expand Down
1 change: 1 addition & 0 deletions Source/include/Ably/ARTRealtimeChannel.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ ART_EMBED_INTERFACE_EVENT_EMITTER(ARTChannelEvent, ARTChannelStateChange *)
* Enables messages to be published and subscribed to. Also enables historic messages to be retrieved and provides access to the `ARTRealtimePresence` object of a channel.
* Also implements `ARTEventEmitter` interface and emits `ARTChannelEvent` events, where a `ARTChannelEvent` is either a `ARTRealtimeChannelState` or an `ARTChannelEvent.ARTChannelEventUpdate`.
*/
NS_SWIFT_SENDABLE
@interface ARTRealtimeChannel : NSObject <ARTRealtimeChannelProtocol>

/**
Expand Down
2 changes: 2 additions & 0 deletions Source/include/Ably/ARTRealtimeChannelOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
/**
* Describes the possible flags used to configure client capabilities, using `ARTChannelOptions`.
*/
NS_SWIFT_SENDABLE
typedef NS_OPTIONS(NSUInteger, ARTChannelMode) {
/**
* The client can enter the presence set.
Expand All @@ -29,6 +30,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Passes additional properties to an `ARTRealtimeChannel` object, such as encryption, an `ARTChannelMode` and channel parameters.
*/
NS_SWIFT_SENDABLE
@interface ARTRealtimeChannelOptions : ARTChannelOptions

/**
Expand Down
2 changes: 2 additions & 0 deletions Source/include/Ably/ARTRealtimePresence.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
This object is used for providing parameters into `ARTRealtimePresence`'s methods with paginated results.
*/
NS_SWIFT_SENDABLE
@interface ARTRealtimePresenceQuery : ARTPresenceQuery

/**
Expand Down Expand Up @@ -217,6 +218,7 @@ NS_ASSUME_NONNULL_BEGIN
*
* @see See `ARTRealtimePresenceProtocol` for details.
*/
NS_SWIFT_SENDABLE
@interface ARTRealtimePresence : ARTPresence <ARTRealtimePresenceProtocol>
@end

Expand Down
1 change: 1 addition & 0 deletions Source/include/Ably/ARTRest.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* A client that offers a simple stateless API to interact directly with Ably's REST API.
*/
NS_SWIFT_SENDABLE
@interface ARTRest : NSObject <ARTRestProtocol>

/**
Expand Down
1 change: 1 addition & 0 deletions Source/include/Ably/ARTRestChannel.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* Enables messages to be published and historic messages to be retrieved for a channel.
*/
NS_SWIFT_SENDABLE
@interface ARTRestChannel : NSObject <ARTRestChannelProtocol>

/**
Expand Down
2 changes: 2 additions & 0 deletions Source/include/Ably/ARTRestPresence.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
This object is used for providing parameters into `ARTRestPresence`'s methods with paginated results.
*/
NS_SWIFT_SENDABLE
@interface ARTPresenceQuery : NSObject

/**
Expand Down Expand Up @@ -78,6 +79,7 @@ NS_ASSUME_NONNULL_BEGIN
*
* @see See `ARTRestPresenceProtocol` for details.
*/
NS_SWIFT_SENDABLE
@interface ARTRestPresence : ARTPresence <ARTRestPresenceProtocol>
@end

Expand Down
Loading

0 comments on commit 0ac6b31

Please sign in to comment.