Index: src/XMPPConnection.h ================================================================== --- src/XMPPConnection.h +++ src/XMPPConnection.h @@ -118,11 +118,11 @@ * * @param connection The connection which threw an exception * @param exception The exception the connection threw */ - (void)connection: (XMPPConnection *)connection - didThrowException: (OFException *)exception; + didThrowException: (id)exception; /*! * @brief This callback is called when the connection is about to upgrade to * TLS. * @@ -142,11 +142,11 @@ * @brief A class which abstracts a connection to an XMPP service. */ @interface XMPPConnection: OFObject { - id _socket; + OF_KINDOF(OFTCPSocket *) _socket; OFXMLParser *_parser, *_oldParser; OFXMLElementBuilder *_elementBuilder, *_oldElementBuilder; OFString *_username, *_password, *_server, *_resource; OFString *_privateKeyFile, *_certificateFile; const char *_privateKeyPassphrase; @@ -224,11 +224,11 @@ @property OF_NULLABLE_PROPERTY (nonatomic, assign) id dataStorage; /*! * The socket used for the connection. */ -@property (readonly, nonatomic) OFTCPSocket *socket; +@property (readonly, nonatomic) OF_KINDOF(OFTCPSocket *) socket; /*! * Whether encryption is required. */ @property (nonatomic) bool encryptionRequired; Index: src/XMPPConnection.m ================================================================== --- src/XMPPConnection.m +++ src/XMPPConnection.m @@ -98,12 +98,12 @@ - (XMPPMulticastDelegate *)xmpp_delegates; @end @implementation XMPPConnection @synthesize username = _username, resource = _resource, server = _server; -@synthesize domain = _domain, password = _password, language = _language; -@synthesize privateKeyFile = _privateKeyFile; +@synthesize domain = _domain, password = _password, JID = _JID, port = _port; +@synthesize language = _language, privateKeyFile = _privateKeyFile; @synthesize certificateFile = _certificateFile, socket = _socket; @synthesize encryptionRequired = _encryptionRequired, encrypted = _encrypted; @synthesize supportsRosterVersioning = _supportsRosterVersioning; @synthesize supportsStreamManagement = _supportsStreamManagement; Index: src/XMPPContact.m ================================================================== --- src/XMPPContact.m +++ src/XMPPContact.m @@ -21,12 +21,14 @@ * POSSIBILITY OF SUCH DAMAGE. */ #import "XMPPContact.h" #import "XMPPContact+Private.h" -#import "XMPPMessage.h" #import "XMPPConnection.h" +#import "XMPPJID.h" +#import "XMPPMessage.h" +#import "XMPPRosterItem.h" @implementation XMPPContact @synthesize rosterItem = _rosterItem; @synthesize presences = _presences; Index: src/XMPPContactManager.m ================================================================== --- src/XMPPContactManager.m +++ src/XMPPContactManager.m @@ -23,10 +23,11 @@ #import "XMPPContactManager.h" #import "XMPPContact.h" #import "XMPPContact+Private.h" #import "XMPPJID.h" +#import "XMPPMessage.h" #import "XMPPMulticastDelegate.h" #import "XMPPPresence.h" #import "XMPPRosterItem.h" @implementation XMPPContactManager Index: src/XMPPDiscoEntity.m ================================================================== --- src/XMPPDiscoEntity.m +++ src/XMPPDiscoEntity.m @@ -20,18 +20,32 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #import "XMPPDiscoEntity.h" +#import "XMPPDiscoIdentity.h" #import "XMPPDiscoNode.h" #import "XMPPDiscoNode+Private.h" -#import "XMPPDiscoIdentity.h" #import "XMPPIQ.h" +#import "XMPPJID.h" #import "namespaces.h" @implementation XMPPDiscoEntity @synthesize discoNodes = _discoNodes, capsNode = _capsNode; + ++ (instancetype)discoNodeWithJID: (XMPPJID *)JID + node: (OFString *)node +{ + OF_UNRECOGNIZED_SELECTOR +} + ++ (instancetype)discoNodeWithJID: (XMPPJID *)JID + node: (OFString *)node + name: (OFString *)name +{ + OF_UNRECOGNIZED_SELECTOR +} + (instancetype)discoEntityWithConnection: (XMPPConnection *)connection { return [[[self alloc] initWithConnection: connection] autorelease]; } @@ -41,22 +55,28 @@ { return [[[self alloc] initWithConnection: connection capsNode: capsNode] autorelease]; } -- (instancetype)initWithConnection: (XMPPConnection *)connection +- (instancetype)initWithJID: (XMPPJID *)JID + node: (nullable OFString *)node { - return [self initWithConnection: connection - capsNode: nil]; + OF_INVALID_INIT_METHOD } - (instancetype)initWithJID: (XMPPJID *)JID node: (nullable OFString *)node name: (nullable OFString *)name { OF_INVALID_INIT_METHOD } + +- (instancetype)initWithConnection: (XMPPConnection *)connection +{ + return [self initWithConnection: connection + capsNode: nil]; +} - (instancetype)initWithConnection: (XMPPConnection *)connection capsNode: (OFString *)capsNode { self = [super initWithJID: [connection JID] Index: src/XMPPPresence.m ================================================================== --- src/XMPPPresence.m +++ src/XMPPPresence.m @@ -48,10 +48,11 @@ OF_ENSURE(0); } @implementation XMPPPresence @dynamic type; +@synthesize status = _status, show = _show, priority = _priority; + (instancetype)presence { return [[[self alloc] init] autorelease]; } @@ -124,11 +125,10 @@ @throw e; } return self; } - - (void)dealloc { [_status release]; [_show release]; Index: src/XMPPSCRAMAuth.m ================================================================== --- src/XMPPSCRAMAuth.m +++ src/XMPPSCRAMAuth.m @@ -74,10 +74,23 @@ password: password connection: connection hash: hash plusAvailable: plusAvailable] autorelease]; } + +- (instancetype)initWithAuthcid: (OFString *)authcid + password: (OFString *)password +{ + OF_INVALID_INIT_METHOD +} + +- (instancetype)initWithAuthzid: (OFString *)authzid + authcid: (OFString *)authcid + password: (OFString *)password +{ + OF_INVALID_INIT_METHOD +} - (instancetype)initWithAuthcid: (OFString *)authcid password: (OFString *)password connection: (XMPPConnection *)connection hash: (Class)hash Index: src/XMPPStanza.m ================================================================== --- src/XMPPStanza.m +++ src/XMPPStanza.m @@ -63,10 +63,22 @@ + (instancetype)stanzaWithElement: (OFXMLElement *)element { return [[[self alloc] initWithElement: element] autorelease]; } + +- (instancetype)initWithName: (OFString *)name + stringValue: (OFString *)stringValue +{ + OF_INVALID_INIT_METHOD +} + +- (instancetype)initWithName: (OFString *)name + namespace: (OFString *)namespace +{ + OF_INVALID_INIT_METHOD +} - (instancetype)initWithName: (OFString *)name namespace: (nullable OFString *)namespace stringValue: (nullable OFString *)stringValue {