@@ -646,7 +646,7 @@ extern const NSTimeInterval XMPPStreamTimeoutNone;
646646 * Even if you close the xmpp stream after this point, the OS will still do everything it can to send the data.
647647**/
648648- (void )sendElement : (NSXMLElement *)element andGetReceipt : (XMPPElementReceipt * _Nullable * _Nullable)receiptPtr ;
649- - (void )sendElement : (NSXMLElement *)element registeringEventWithID : ( NSString *) eventID andGetReceipt : (XMPPElementReceipt * _Nullable * _Nullable)receiptPtr ;
649+ - (void )sendElement : (NSXMLElement *)element andGetReceipt : (XMPPElementReceipt * _Nullable * _Nullable)receiptPtr registeringEventWithID : ( NSString *) eventID ;
650650
651651/* *
652652 * Fetches and resends the myPresence element (if available) in a single atomic operation.
@@ -741,13 +741,13 @@ extern const NSTimeInterval XMPPStreamTimeoutNone;
741741// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
742742
743743/* *
744- * Returns the stream metadata corresponding to the currently processed XMPP stanza.
744+ * The stream metadata corresponding to the currently processed XMPP stanza.
745745 *
746746 * Event information is only available in the context of @c didSendXXX/didFailToSendXXX/didReceiveXXX delegate callbacks.
747- * This method returns nil if called outside of those callbacks.
747+ * This property is nil if accessed outside of those callbacks.
748748 * For more details, please refer to @c XMPPElementEvent documentation.
749749 */
750- - ( nullable XMPPElementEvent *) currentElementEvent ;
750+ @property ( nonatomic , readonly , nullable ) XMPPElementEvent *currentElementEvent;
751751
752752// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
753753#pragma mark Utilities
@@ -801,79 +801,6 @@ extern const NSTimeInterval XMPPStreamTimeoutNone;
801801
802802@end
803803
804- /* *
805- * A handle that allows identifying elements sent or received in the stream across different delegates
806- * and tracking their processing progress.
807- *
808- * While the core XMPP specification does not require stanzas to be uniquely identifiable, you may still want to
809- * identify them internally across different modules or trace the sent ones to the respective send result delegate callbacks.
810- *
811- * An instance of this class is provided in the context of execution of any of the @c didSendXXX/didFailToSendXXX/didReceiveXXX
812- * stream delegate methods. It is retrieved by calling the @c currentElementEvent method on the calling stream.
813- * The delegates can then use it to:
814- * - identify the corresponding XMPP stanzas.
815- * - be notified of asynchronous processing completion for a given XMPP stanza.
816- *
817- * Using @c XMPPElementEvent handles is a more robust approach than relying on pointer equality of @c XMPPElement instances.
818- */
819- @interface XMPPElementEvent : NSObject
820-
821- // / The universally unique identifier of the event that provides the internal identity of the corresponding XMPP stanza.
822- @property (nonatomic , copy , readonly ) NSString *uniqueID;
823-
824- // / The value of the stream's @c myJID property at the time when the event occured.
825- @property (nonatomic , strong , readonly , nullable ) XMPPJID *myJID;
826-
827- // / The local device time when the event occured.
828- @property (nonatomic , strong , readonly ) NSDate *timestamp;
829-
830- /* *
831- * A flag indicating whether all delegates are done processing the given event.
832- *
833- * Supports Key-Value Observing. Change notifications are emitted on the stream queue.
834- *
835- * @see beginDelayedProcessing
836- * @see endDelayedProcessingWithToken
837- */
838- @property (nonatomic , assign , readonly , getter =isProcessingCompleted) BOOL processingCompleted;
839-
840- // Instances are created by the stream only.
841- - (instancetype )init NS_UNAVAILABLE;
842-
843- /* *
844- * Marks the event as being asynchronously processed by a delegate and returns a completion token.
845- *
846- * Event processing is completed after every @c beginDelayedProcessing call has been followed
847- * by @c endDelayedProcessingWithToken: with a matching completion token.
848- *
849- * Unpaired invocations may lead to undefined behavior or stalled events.
850- *
851- * Events that are not marked for asynchronous processing by any of the delegates complete immediately
852- * after control returns from all callbacks.
853- *
854- * @see endDelayedProcessingWithToken:
855- * @see processingCompleted
856- */
857- - (id )beginDelayedProcessing ;
858-
859- /* *
860- * Marks an end of the previously initiated asynchronous delegate processing.
861- *
862- * Event processing is completed after every @c beginDelayedProcessing call has been followed
863- * by @c endDelayedProcessingWithToken: with a matching completion token.
864- *
865- * Unpaired invocations may lead to undefined behavior or stalled events.
866- *
867- * Events that are not marked for asynchronous processing by any of the delegates complete immediately
868- * after control returns from all callbacks.
869- *
870- * @see beginDelayedProcessing
871- * @see processingCompleted
872- */
873- - (void )endDelayedProcessingWithToken : (id )delayedProcessingToken ;
874-
875- @end
876-
877804// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
878805#pragma mark -
879806// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1077,7 +1004,7 @@ extern const NSTimeInterval XMPPStreamTimeoutNone;
10771004 * If you have need to modify an element for any reason,
10781005 * you should copy the element first, and then modify and use the copy.
10791006 *
1080- * Delegates can obtain event metadata associated with the respective element by calling @c currentElementEvent on @c sender
1007+ * Delegates can obtain event metadata associated with the respective element by accessing @c currentElementEvent on @c sender
10811008 * from within these callbacks. For more details, please refer to @c XMPPElementEvent documentation.
10821009**/
10831010- (BOOL )xmppStream : (XMPPStream *)sender didReceiveIQ : (XMPPIQ *)iq ;
@@ -1125,7 +1052,7 @@ extern const NSTimeInterval XMPPStreamTimeoutNone;
11251052 * These methods may be used to listen for certain events (such as an unavailable presence having been sent),
11261053 * or for general logging purposes. (E.g. a central history logging mechanism).
11271054 *
1128- * Delegates can obtain event metadata associated with the respective element by calling @c currentElementEvent on @c sender
1055+ * Delegates can obtain event metadata associated with the respective element by accessing @c currentElementEvent on @c sender
11291056 * from within these callbacks. For more details, please refer to @c XMPPElementEvent documentation.
11301057**/
11311058- (void )xmppStream : (XMPPStream *)sender didSendIQ : (XMPPIQ *)iq ;
@@ -1136,7 +1063,7 @@ extern const NSTimeInterval XMPPStreamTimeoutNone;
11361063 * These methods are called after failing to send the respective XML elements over the stream.
11371064 * This occurs when the stream gets disconnected before the element can get sent out.
11381065 *
1139- * Delegates can obtain event metadata associated with the respective element by calling @c currentElementEvent on @c sender
1066+ * Delegates can obtain event metadata associated with the respective element by accessing @c currentElementEvent on @c sender
11401067 * from within these callbacks.
11411068 * Note that if these methods are called, the event context is incomplete, e.g. the stream might have not been connected
11421069 * and the actual myJID value is not determined. For more details, please refer to @c XMPPElementEvent documentation.
@@ -1244,7 +1171,7 @@ NS_SWIFT_NAME(xmppStream(_:didFinishProcessing:));
12441171 * If you're using custom elements, you must register the custom element name(s).
12451172 * Otherwise the xmppStream will treat non-XMPP elements as errors (xmppStream:didReceiveError:).
12461173 *
1247- * Delegates can obtain event metadata associated with the respective element by calling @c currentElementEvent on @c sender
1174+ * Delegates can obtain event metadata associated with the respective element by accessing @c currentElementEvent on @c sender
12481175 * from within these callbacks. For more details, please refer to @c XMPPElementEvent documentation.
12491176 *
12501177 * @see registerCustomElementNames (in XMPPInternal.h)
0 commit comments