XMPPConnection class documentation

Authors

Generated by root

Contents -

  1. Software documentation for the XMPPConnection class
  2. XMPPConnection types

Software documentation for the XMPPConnection class

XMPPConnection : TRXMLNullHandler

Declared in:
XMPPConnection.h
Conforms to:
IqHandler
The XMPPConnection class represents a connection to an XMPP server. It is the root parser owner. All XML received from the server is parsed by this class (or delegated to others by this class). All sending of XML data goes via this class.

Instance Variables

Method summary

XMPPSend: 

- (void) XMPPSend: (NSString*)buffer;
Send the passed XML to the server.

connectToJabberServer: withJID: password: 

- (void) connectToJabberServer: (NSString*)jabberServer withJID: (JID*)aJID password: (NSString*)password;
Connect to the specified Jabber server as the specified user, with the given password. This needs changing for cases where the server is not that specified by the client's JID.

connected 

- (ConnectionState) connected;
Returns the current connection state.

disconnect 

- (void) disconnect;
Disconnect from the Jabber server.

dispatcher 

- (Dispatcher*) dispatcher;
Returns the dispatcher associated with the connection.

initWithAccount: 

- (id) initWithAccount: (id)_account;
Initialise the connection for a specified account.

newMessageID 

- (NSString*) newMessageID;
Returns a new connection-unique ID to be used with iq set/get stanzas.

parseXMPP: 

- (BOOL) parseXMPP: (id)sender;
Read data from the socket and parse the incoming XML. Returns NO in case of error.

reconnectToJabberServer 

- (void) reconnectToJabberServer;
Reconnect after disconnection.

setPresenceDisplay: 

- (void) setPresenceDisplay: (id<XMPPPresenceDisplay,NSObject>)_display;
Sets the UI component used to display the presence. This should definitely be replaced with a notification based system.

setStatus: withMessage: 

- (void) setStatus: (unsigned char)_status withMessage: (NSString*)_message;
Set the current status.

setTimer: 

- (void) setTimer: (NSTimer*)newTimer;
Use the given timer for periodic polling of the connection.



Instance Variables for XMPPConnection Class

SSLEnabled

@protected BOOL SSLEnabled;
Description forthcoming.

account

@protected id account;
Description forthcoming.

connectThread

@protected NSThread* connectThread;
Description forthcoming.

connectionMutex

@protected NSLock* connectionMutex;
Description forthcoming.

connectionState

@protected ConnectionState connectionState;
Description forthcoming.

currentNode

@protected id currentNode;
Description forthcoming.

dispatcher

@protected Dispatcher* dispatcher;
Description forthcoming.

keepalive

@protected unsigned int keepalive;
Description forthcoming.

messageID

@protected unsigned int messageID;
Description forthcoming.

messageIDMutex

@protected NSLock* messageIDMutex;
Description forthcoming.

pass

@protected NSString* pass;
Description forthcoming.

presenceDisplay

@protected id presenceDisplay;
Description forthcoming.

res

@protected NSString* res;
Description forthcoming.

roster

@protected Roster* roster;
Description forthcoming.

s

@protected int s;
Description forthcoming.

server

@protected NSString* server;
Description forthcoming.

serverHost

@protected NSString* serverHost;
Description forthcoming.

serverID

@protected NSString* serverID;
Description forthcoming.

sessionID

@protected NSString* sessionID;
Description forthcoming.

ssl

@protected SSL* ssl;
Description forthcoming.

sslContext

@protected SSL_CTX* sslContext;
Description forthcoming.

streamFeatures

@protected NSDictionary* streamFeatures;
Description forthcoming.

timer

@protected NSTimer* timer;
Description forthcoming.

unsentBuffer

@protected NSMutableString* unsentBuffer;
Description forthcoming.

user

@protected NSString* user;
Description forthcoming.

xmlLog

@protected Class xmlLog;
Description forthcoming.




XMPPConnection types

ConnectionState

typedef enum _connectionState ConnectionState;
Enumeration used to define the states in the XMPP Connection state machine.