diff --git a/src/XMPPConnection.h b/src/XMPPConnection.h index e744054..e6c8a13 100644 --- a/src/XMPPConnection.h +++ b/src/XMPPConnection.h @@ -120,7 +120,7 @@ OF_ASSUME_NONNULL_BEGIN * @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 @@ -144,7 +144,7 @@ OF_ASSUME_NONNULL_BEGIN @interface XMPPConnection: OFObject { - id _socket; + OF_KINDOF(OFTCPSocket *) _socket; OFXMLParser *_parser, *_oldParser; OFXMLElementBuilder *_elementBuilder, *_oldElementBuilder; OFString *_username, *_password, *_server, *_resource; @@ -226,7 +226,7 @@ OF_ASSUME_NONNULL_BEGIN /*! * The socket used for the connection. */ -@property (readonly, nonatomic) OFTCPSocket *socket; +@property (readonly, nonatomic) OF_KINDOF(OFTCPSocket *) socket; /*! * Whether encryption is required. diff --git a/src/XMPPConnection.m b/src/XMPPConnection.m index c53b46b..a813991 100644 --- a/src/XMPPConnection.m +++ b/src/XMPPConnection.m @@ -100,8 +100,8 @@ @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; diff --git a/src/XMPPContact.m b/src/XMPPContact.m index cee2dee..8123015 100644 --- a/src/XMPPContact.m +++ b/src/XMPPContact.m @@ -23,8 +23,10 @@ #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; diff --git a/src/XMPPContactManager.m b/src/XMPPContactManager.m index 5129e47..d5309e4 100644 --- a/src/XMPPContactManager.m +++ b/src/XMPPContactManager.m @@ -25,6 +25,7 @@ #import "XMPPContact.h" #import "XMPPContact+Private.h" #import "XMPPJID.h" +#import "XMPPMessage.h" #import "XMPPMulticastDelegate.h" #import "XMPPPresence.h" #import "XMPPRosterItem.h" diff --git a/src/XMPPDiscoEntity.m b/src/XMPPDiscoEntity.m index 3029572..f964b17 100644 --- a/src/XMPPDiscoEntity.m +++ b/src/XMPPDiscoEntity.m @@ -22,15 +22,29 @@ */ #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]; @@ -43,10 +57,10 @@ 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 @@ -56,6 +70,12 @@ OF_INVALID_INIT_METHOD } +- (instancetype)initWithConnection: (XMPPConnection *)connection +{ + return [self initWithConnection: connection + capsNode: nil]; +} + - (instancetype)initWithConnection: (XMPPConnection *)connection capsNode: (OFString *)capsNode { diff --git a/src/XMPPPresence.m b/src/XMPPPresence.m index 275861a..33bfe98 100644 --- a/src/XMPPPresence.m +++ b/src/XMPPPresence.m @@ -50,6 +50,7 @@ show_to_int(OFString *show) @implementation XMPPPresence @dynamic type; +@synthesize status = _status, show = _show, priority = _priority; + (instancetype)presence { @@ -127,7 +128,6 @@ show_to_int(OFString *show) return self; } - - (void)dealloc { [_status release]; diff --git a/src/XMPPSCRAMAuth.m b/src/XMPPSCRAMAuth.m index ae52722..6549e2a 100644 --- a/src/XMPPSCRAMAuth.m +++ b/src/XMPPSCRAMAuth.m @@ -77,6 +77,19 @@ 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 diff --git a/src/XMPPStanza.m b/src/XMPPStanza.m index f11a5c8..47d8bdc 100644 --- a/src/XMPPStanza.m +++ b/src/XMPPStanza.m @@ -66,6 +66,18 @@ 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