/// <summary> /// Sends a RemoveBookmarksMessage to remove the given bookmark from the server. /// https://xmpp.org/extensions/xep-0402.html#removing-a-bookmark /// </summary> /// <param name="conferenceItem">The bookmark that should get removed from the server.</param> /// <param name="onMessage">The method that should get executed once the helper receives a new valid message (can be null).</param> /// <param name="onTimeout">The method that should get executed once the helper timeout gets triggered (can be null).</param> /// <returns>Returns a MessageResponseHelper listening for RemoveBookmarksMessage answers.</returns> public MessageResponseHelper <IQMessage> removeBookmark_xep_0402(ConferenceItem conferenceItem, MessageResponseHelper <IQMessage> .OnMessageHandler onMessage, MessageResponseHelper <IQMessage> .OnTimeoutHandler onTimeout) { MessageResponseHelper <IQMessage> helper = new MessageResponseHelper <IQMessage>(CONNECTION, onMessage, onTimeout); RemoveBookmarkMessage msg = new RemoveBookmarkMessage(CONNECTION.account.getFullJid(), conferenceItem); helper.start(msg); return(helper); }
/// <summary> /// Sends a RemoveBookmarksMessage for removing the given bookmark from the server. /// https://xmpp.org/extensions/xep-0402.html#removing-a-bookmark /// </summary> /// <param name="conferenceItem">The bookmark that should get removed from the server.</param> /// <param name="onMessage">The method that should get executed once the helper receives a new valid message (can be null).</param> /// <param name="onTimeout">The method that should get executed once the helper timeout gets triggered (can be null).</param> /// <returns>Returns a MessageResponseHelper listening for RemoveBookmarksMessage answers.</returns> public MessageResponseHelper <IQMessage> removeBookmark_xep_0402(ConferenceItem conferenceItem, Func <IQMessage, bool> onMessage, Action onTimeout) { MessageResponseHelper <IQMessage> helper = new MessageResponseHelper <IQMessage>(CLIENT, onMessage, onTimeout); RemoveBookmarkMessage msg = new RemoveBookmarkMessage(CLIENT.getXMPPAccount().getIdDomainAndResource(), conferenceItem); helper.start(msg); return(helper); }