File tree Expand file tree Collapse file tree 3 files changed +26
-0
lines changed
Sources/_AblyPluginSupportPrivate/include Expand file tree Collapse file tree 3 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ @import Foundation;
2+
3+ NS_ASSUME_NONNULL_BEGIN
4+
5+ NS_SWIFT_NAME (ConnectionDetailsProtocol)
6+ NS_SWIFT_SENDABLE
7+ // / The contents of a `CONNECTED` `ProtocolMessage`'s `connectionDetails`.
8+ @protocol APConnectionDetailsProtocol
9+
10+ // / Wraps an `NSTimeInterval` containing the `objectsGCGracePeriod`, if any, in seconds.
11+ @property (nonatomic, readonly, nullable) NSNumber *objectsGCGracePeriod;
12+
13+ @end
14+
15+ NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change 77@protocol APRealtimeChannel;
88@protocol APRealtimeClient;
99@protocol APPublicErrorInfo;
10+ @protocol APConnectionDetailsProtocol;
1011
1112NS_ASSUME_NONNULL_BEGIN
1213
@@ -83,6 +84,13 @@ NS_SWIFT_SENDABLE
8384 protocolMessageChannelSerial:(nullable NSString *)protocolMessageChannelSerial
8485 channel:(id <APRealtimeChannel>)channel;
8586
87+ // / Called whenever the client receives a `CONNECTED` `ProtocolMessage`, passing its `connectionDetails` (if any).
88+ // /
89+ // / Parameters:
90+ // / - channel: The channel that should be informed about the connection details.
91+ - (void )nosync_onConnectedWithConnectionDetails:(nullable id <APConnectionDetailsProtocol>)connectionDetails
92+ channel:(id <APRealtimeChannel>)channel;
93+
8694@end
8795
8896// / An `ObjectMessage`, as found in the `state` property of an `OBJECT` or `OBJECT_SYNC` `ProtocolMessage`.
Original file line number Diff line number Diff line change @@ -80,6 +80,9 @@ NS_SWIFT_SENDABLE
8080- (void )nosync_fetchServerTimeForClient:(id <APRealtimeClient>)client
8181 completion:(void (^ _Nullable)(NSDate *_Nullable serverTime, _Nullable id <APPublicErrorInfo> error))completion;
8282
83+ // / The `connectionDetails` from the latest `CONNECTED` `ProtocolMessage` that the client received (`nil` if it did not contain a `connectionDetails`).
84+ - (nullable id <APConnectionDetailsProtocol>)nosync_latestConnectionDetailsForClient:(id <APRealtimeClient>)client;
85+
8386// / Logs a message to a logger.
8487- (void )log:(NSString *)message
8588 withLevel:(APLogLevel)level
You can’t perform that action at this time.
0 commit comments