@@ -1,10 +1,10 @@ /* - * Copyright (c) 2011, Jonathan Schleifer + * Copyright (c) 2011, 2012, 2013, 2016, Jonathan Schleifer * Copyright (c) 2012, Florian Zeitz * - * https://webkeks.org/git/?p=objxmpp.git + * https://heap.zone/git/?p=objxmpp.git * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice is present in all copies. * @@ -37,13 +37,11 @@ */ @protocol XMPPRosterDelegate #ifndef XMPP_ROSTER_M #endif -#ifdef OF_HAVE_OPTIONAL_PROTOCOLS @optional -#endif /** * \brief This callback is called after the roster was received (as a result of * calling -requestRoster). * * \param roster The roster that was received @@ -61,23 +59,19 @@ @end /** * \brief A class implementing roster related functionality. */ -@interface XMPPRoster: OFObject -#ifdef OF_HAVE_OPTIONAL_PROTOCOLS - -#endif +@interface XMPPRoster: OFObject { XMPPConnection *_connection; OFMutableDictionary *_rosterItems; XMPPMulticastDelegate *_delegates; id _dataStorage; bool _rosterRequested; } -#ifdef OF_HAVE_PROPERTIES /** * \brief The connection to which the roster belongs */ @property (readonly, assign) XMPPConnection *connection; @@ -91,11 +85,10 @@ /** * \brief The list of contacts as an OFDictionary with the bare JID as a string * as key. */ @property (readonly, copy) OFDictionary *rosterItems; -#endif /** * \brief Initializes an already allocated XMPPRoster. * * \param connection The connection roster related stanzas @@ -102,12 +95,10 @@ * are send and received over * \return An initialized XMPPRoster */ - initWithConnection: (XMPPConnection*)connection; -- (OFDictionary*)rosterItems; - /** * \brief Requests the roster from the server. */ - (void)requestRoster; @@ -144,18 +135,13 @@ * * \param delegate The delegate to remove */ - (void)removeDelegate: (id )delegate; -- (XMPPConnection*)connection; - -- (void)setDataStorage: (id )dataStorage; -- (id )dataStorage; - - (void)XMPP_updateRosterItem: (XMPPRosterItem*)rosterItem; - (void)XMPP_handleInitialRosterForConnection: (XMPPConnection*)connection IQ: (XMPPIQ*)iq; - (XMPPRosterItem*)XMPP_rosterItemWithXMLElement: (OFXMLElement*)element; @end @interface OFObject (XMPPRosterDelegate) @end