Detect support for roster versioning.
This commit is contained in:
parent
af04bf7088
commit
f6c537a9e9
3 changed files with 18 additions and 5 deletions
|
@ -149,6 +149,7 @@
|
|||
OFString *domain, *domainToASCII;
|
||||
XMPPJID *JID;
|
||||
uint16_t port;
|
||||
id <XMPPStorage> dataStorage;
|
||||
OFString *language;
|
||||
XMPPMulticastDelegate *delegates;
|
||||
OFMutableDictionary *callbacks;
|
||||
|
@ -156,8 +157,8 @@
|
|||
BOOL streamOpen;
|
||||
BOOL needsSession;
|
||||
BOOL encryptionRequired, encrypted;
|
||||
BOOL rosterVersioningSupported;
|
||||
unsigned int lastID;
|
||||
id <XMPPStorage> dataStorage;
|
||||
/// \endcond
|
||||
}
|
||||
|
||||
|
@ -186,14 +187,16 @@
|
|||
@property (copy, readonly) XMPPJID *JID;
|
||||
/// \brief The port to connect to
|
||||
@property uint16_t port;
|
||||
/// \brief An object for data storage, conforming to the XMPPStorage protocol
|
||||
@property (assign) id <XMPPStorage> dataStorage;
|
||||
/// \brief The socket used for the connection
|
||||
@property (readonly, retain, getter=socket) OFTCPSocket *sock;
|
||||
/// \brief Whether encryption is required
|
||||
@property BOOL encryptionRequired;
|
||||
/// \brief Whether the connection is encrypted
|
||||
@property (readonly) BOOL encrypted;
|
||||
/// \brief An object for data storage, conforming to the XMPPStorage protocol
|
||||
@property (assign) id <XMPPStorage> dataStorage;
|
||||
/// \brief Whether roster versioning is supported
|
||||
@property (readonly) BOOL rosterVersioningSupported;
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
@ -350,6 +350,11 @@
|
|||
return streamOpen;
|
||||
}
|
||||
|
||||
- (BOOL)rosterVersioningSupported
|
||||
{
|
||||
return rosterVersioningSupported;
|
||||
}
|
||||
|
||||
- (BOOL)checkCertificateAndGetReason: (OFString**)reason
|
||||
{
|
||||
X509Certificate *cert;
|
||||
|
@ -845,6 +850,10 @@
|
|||
/* TODO: Find/create an exception to throw here */
|
||||
@throw [OFException exceptionWithClass: isa];
|
||||
|
||||
if ([element elementForName: @"ver"
|
||||
namespace: XMPP_NS_ROSTERVER] != nil)
|
||||
rosterVersioningSupported = YES;
|
||||
|
||||
if (mechs != nil) {
|
||||
OFEnumerator *enumerator;
|
||||
OFXMLElement *mech;
|
||||
|
|
|
@ -23,9 +23,10 @@
|
|||
#define XMPP_NS_BIND @"urn:ietf:params:xml:ns:xmpp-bind"
|
||||
#define XMPP_NS_CLIENT @"jabber:client"
|
||||
#define XMPP_NS_ROSTER @"jabber:iq:roster"
|
||||
#define XMPP_NS_ROSTERVER @"urn:xmpp:features:rosterver"
|
||||
#define XMPP_NS_SASL @"urn:ietf:params:xml:ns:xmpp-sasl"
|
||||
#define XMPP_NS_SESSION @"urn:ietf:params:xml:ns:xmpp-session"
|
||||
#define XMPP_NS_STARTTLS @"urn:ietf:params:xml:ns:xmpp-tls"
|
||||
#define XMPP_NS_STANZAS @"urn:ietf:params:xml:ns:xmpp-stanzas"
|
||||
#define XMPP_NS_SESSION @"urn:ietf:params:xml:ns:xmpp-session"
|
||||
#define XMPP_NS_XMPP_STREAM @"urn:ietf:params:xml:ns:xmpp-streams"
|
||||
#define XMPP_NS_STREAM @"http://etherx.jabber.org/streams"
|
||||
#define XMPP_NS_XMPP_STREAM @"urn:ietf:params:xml:ns:xmpp-streams"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue