Add some documentation
This commit is contained in:
parent
0e200d99d7
commit
0c7b90ec2d
3 changed files with 322 additions and 28 deletions
|
@ -15,16 +15,43 @@
|
|||
didReceiveMessage: (XMPPMessage*)msg;
|
||||
@end
|
||||
|
||||
/**
|
||||
* \brief A class that abstracts a connection to an XMPP service
|
||||
*/
|
||||
@interface XMPPConnection: OFObject <OFXMLElementBuilderDelegate>
|
||||
{
|
||||
OFTCPSocket *sock;
|
||||
OFXMLParser *parser;
|
||||
OFXMLElementBuilder *elementBuilder;
|
||||
|
||||
/**
|
||||
* The username (local part of the JID) to connect with
|
||||
*/
|
||||
OFString *username;
|
||||
|
||||
/**
|
||||
* The password to connect with
|
||||
*/
|
||||
OFString *password;
|
||||
|
||||
/**
|
||||
* The server to connect to
|
||||
*/
|
||||
OFString *server;
|
||||
|
||||
/**
|
||||
* The resource to connect with
|
||||
*/
|
||||
OFString *resource;
|
||||
|
||||
/**
|
||||
* The port to connect to
|
||||
*/
|
||||
short port;
|
||||
|
||||
/**
|
||||
* Whether to use TLS
|
||||
*/
|
||||
BOOL useTLS;
|
||||
id <XMPPConnectionDelegate> delegate;
|
||||
OFMutableArray *mechanisms;
|
||||
|
@ -38,7 +65,20 @@
|
|||
@property (assign) BOOL useTLS;
|
||||
@property (retain) id <XMPPConnectionDelegate> delegate;
|
||||
|
||||
/**
|
||||
* Connects to the XMPP service
|
||||
*/
|
||||
- (void)connect;
|
||||
|
||||
/**
|
||||
* Starts a loop handling incomming data
|
||||
*/
|
||||
- (void)handleConnection;
|
||||
|
||||
/**
|
||||
* Sends a OFXMLElement (usually a XMPPStanza)
|
||||
*
|
||||
* \param elem The element to send
|
||||
*/
|
||||
- (void)sendStanza: (OFXMLElement*)elem;
|
||||
@end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue