Fix compilation with GCC

This commit is contained in:
Jonathan Schleifer 2018-11-05 23:02:42 +01:00
parent 3438e3569b
commit b3244f0d9d
No known key found for this signature in database
GPG key ID: D83A76BFE376345E
8 changed files with 59 additions and 11 deletions

View file

@ -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 <OFXMLParserDelegate,
OFXMLElementBuilderDelegate>
{
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.

View file

@ -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;

View file

@ -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;

View file

@ -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"

View file

@ -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
{

View file

@ -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];

View file

@ -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

View file

@ -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