Update documentation
This commit is contained in:
parent
702f7e9ab7
commit
ba62ccdfc3
@ -17,7 +17,9 @@
|
|||||||
* License for more details.
|
* License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/********************************/
|
||||||
#pragma mark Defines and includes
|
#pragma mark Defines and includes
|
||||||
|
/********************************/
|
||||||
|
|
||||||
#define IRCCLIENTVERSION "2.0a3"
|
#define IRCCLIENTVERSION "2.0a3"
|
||||||
|
|
||||||
@ -26,7 +28,9 @@
|
|||||||
#import "IRCClientChannel_Private.h"
|
#import "IRCClientChannel_Private.h"
|
||||||
#import "NSData+SA_NSDataExtensions.h"
|
#import "NSData+SA_NSDataExtensions.h"
|
||||||
|
|
||||||
|
/********************************************/
|
||||||
#pragma mark - Callback function declarations
|
#pragma mark - Callback function declarations
|
||||||
|
/********************************************/
|
||||||
|
|
||||||
static void onConnect(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count);
|
static void onConnect(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count);
|
||||||
static void onNick(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count);
|
static void onNick(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count);
|
||||||
@ -50,7 +54,9 @@ static void onCtcpAction(irc_session_t *session, const char *event, const char *
|
|||||||
static void onUnknownEvent(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count);
|
static void onUnknownEvent(irc_session_t *session, const char *event, const char *origin, const char **params, unsigned int count);
|
||||||
static void onNumericEvent(irc_session_t *session, unsigned int event, const char *origin, const char **params, unsigned int count);
|
static void onNumericEvent(irc_session_t *session, unsigned int event, const char *origin, const char **params, unsigned int count);
|
||||||
|
|
||||||
|
/***********************************************************/
|
||||||
#pragma mark - IRCClientSession private category declaration
|
#pragma mark - IRCClientSession private category declaration
|
||||||
|
/***********************************************************/
|
||||||
|
|
||||||
static NSDictionary* ircNumericCodeList;
|
static NSDictionary* ircNumericCodeList;
|
||||||
|
|
||||||
@ -69,11 +75,15 @@ static NSDictionary* ircNumericCodeList;
|
|||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
/***************************************************/
|
||||||
#pragma mark - IRCClientSession class implementation
|
#pragma mark - IRCClientSession class implementation
|
||||||
|
/***************************************************/
|
||||||
|
|
||||||
@implementation IRCClientSession
|
@implementation IRCClientSession
|
||||||
|
|
||||||
|
/********************************/
|
||||||
#pragma mark - Property synthesis
|
#pragma mark - Property synthesis
|
||||||
|
/********************************/
|
||||||
|
|
||||||
@synthesize delegate = _delegate;
|
@synthesize delegate = _delegate;
|
||||||
@synthesize sessionID = _sessionID;
|
@synthesize sessionID = _sessionID;
|
||||||
@ -89,7 +99,9 @@ static NSDictionary* ircNumericCodeList;
|
|||||||
|
|
||||||
@synthesize encoding = _encoding;
|
@synthesize encoding = _encoding;
|
||||||
|
|
||||||
|
/******************************/
|
||||||
#pragma mark - Custom accessors
|
#pragma mark - Custom accessors
|
||||||
|
/******************************/
|
||||||
|
|
||||||
- (NSDictionary*)channels
|
- (NSDictionary*)channels
|
||||||
{
|
{
|
||||||
@ -107,13 +119,14 @@ static NSDictionary* ircNumericCodeList;
|
|||||||
return irc_is_connected(_irc_session);
|
return irc_is_connected(_irc_session);
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************/
|
/***************************/
|
||||||
#pragma mark - Class methods
|
#pragma mark - Class methods
|
||||||
/************************************/
|
/***************************/
|
||||||
|
|
||||||
- (instancetype)init
|
- (instancetype)init
|
||||||
{
|
{
|
||||||
if ((self = [super init])) {
|
if ((self = [super init]))
|
||||||
|
{
|
||||||
_callbacks.event_connect = onConnect;
|
_callbacks.event_connect = onConnect;
|
||||||
_callbacks.event_nick = onNick;
|
_callbacks.event_nick = onNick;
|
||||||
_callbacks.event_quit = onQuit;
|
_callbacks.event_quit = onQuit;
|
||||||
@ -168,7 +181,9 @@ static NSDictionary* ircNumericCodeList;
|
|||||||
- (void)dealloc
|
- (void)dealloc
|
||||||
{
|
{
|
||||||
if (irc_is_connected(_irc_session))
|
if (irc_is_connected(_irc_session))
|
||||||
|
{
|
||||||
NSLog(@"Warning: IRC Session is not disconnected on dealloc");
|
NSLog(@"Warning: IRC Session is not disconnected on dealloc");
|
||||||
|
}
|
||||||
|
|
||||||
irc_destroy_session(_irc_session);
|
irc_destroy_session(_irc_session);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user