/// <summary> /// Sends a RequestBookmarksMessage to request all bookmarks from the server. /// https://xmpp.org/extensions/xep-0402.html#retrieving-bookmarks /// </summary> /// <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 RequestBookmarksMessage answers.</returns> public MessageResponseHelper <IQMessage> requestBookmars_xep_0402(MessageResponseHelper <IQMessage> .OnMessageHandler onMessage, MessageResponseHelper <IQMessage> .OnTimeoutHandler onTimeout) { MessageResponseHelper <IQMessage> helper = new MessageResponseHelper <IQMessage>(CONNECTION, onMessage, onTimeout); RequestBookmarksMessage msg = new RequestBookmarksMessage(CONNECTION.account.getFullJid()); helper.start(msg); return(helper); }
/// <summary> /// Sends a RequestBookmarksMessage for requesting all bookmarks from the server. /// https://xmpp.org/extensions/xep-0402.html#retrieving-bookmarks /// </summary> /// <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 RequestBookmarksMessage answers.</returns> public MessageResponseHelper <IQMessage> requestBookmars_xep_0402(Func <IQMessage, bool> onMessage, Action onTimeout) { MessageResponseHelper <IQMessage> helper = new MessageResponseHelper <IQMessage>(CLIENT, onMessage, onTimeout); RequestBookmarksMessage msg = new RequestBookmarksMessage(CLIENT.getXMPPAccount().getIdDomainAndResource()); helper.start(msg); return(helper); }