25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
@class OFString;
@class OFMutableDictionary;
@class OFTCPSocket;
@class IRCConnection;
@class IRCUser;
@class IRCChannel;
@protocol IRCConnectionDelegate
@optional
- (void)connection: (IRCConnection*)connection
didReceiveLine: (OFString*)line;
- (void)connection: (IRCConnection*)connection
didSendLine: (OFString*)line;
- (void)connectionWasEstablished: (IRCConnection*)connection;
- (void)connection: (IRCConnection*)connection
didSeeUser: (IRCUser*)user
|
>
>
>
>
>
>
|
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
@class OFString;
@class OFMutableDictionary;
@class OFTCPSocket;
@class IRCConnection;
@class IRCUser;
@class IRCChannel;
#ifndef IRC_CONNECTION_M
@protocol IRCConnectionDelegate <OFObject>
#else
@protocol IRCConnectionDelegate
#endif
#ifdef OF_HAVE_OPTIONAL_PROTOCOLS
@optional
#endif
- (void)connection: (IRCConnection*)connection
didReceiveLine: (OFString*)line;
- (void)connection: (IRCConnection*)connection
didSendLine: (OFString*)line;
- (void)connectionWasEstablished: (IRCConnection*)connection;
- (void)connection: (IRCConnection*)connection
didSeeUser: (IRCUser*)user
|
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
@interface IRCConnection: OFObject
{
OFTCPSocket *sock;
OFString *server;
uint16_t port;
OFString *nickname, *username, *realname;
OFMutableDictionary *channels;
id <IRCConnectionDelegate, OFObject> delegate;
}
@property (copy) OFString *server;
@property (assign) uint16_t port;
@property (copy) OFString *nickname, *username, *realname;
@property (assign) id <IRCConnectionDelegate, OFObject> delegate;
@property (retain, getter=socket) OFTCPSocket *sock;
- (void)sendLine: (OFString*)line;
- (void)sendLineWithFormat: (OFConstantString*)line, ...;
- (void)connect;
- (void)disconnect;
- (void)disconnectWithReason: (OFString*)reason;
- (void)joinChannel: (OFString*)channelName;
- (void)leaveChannel: (IRCChannel*)channel;
|
|
>
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
@interface IRCConnection: OFObject
{
OFTCPSocket *sock;
OFString *server;
uint16_t port;
OFString *nickname, *username, *realname;
OFMutableDictionary *channels;
id <IRCConnectionDelegate> delegate;
}
#ifdef OF_HAVE_PROPERTIES
@property (copy) OFString *server;
@property (assign) uint16_t port;
@property (copy) OFString *nickname, *username, *realname;
@property (assign) id <IRCConnectionDelegate> delegate;
@property (readonly, retain, getter=socket) OFTCPSocket *sock;
#endif
- (void)setServer: (OFString*)server;
- (OFString*)server;
- (void)setPort: (uint16_t)port;
- (uint16_t)port;
- (void)setNickname: (OFString*)nickname;
- (OFString*)nickname;
- (void)setUsername: (OFString*)username;
- (OFString*)username;
- (void)setRealname: (OFString*)realname;
- (OFString*)realname;
- (void)setDelegate: (id <IRCConnectionDelegate>)delegate;
- (id <IRCConnectionDelegate>)delegate;
- (OFTCPSocket*)socket;
- (void)sendLine: (OFString*)line;
- (void)sendLineWithFormat: (OFConstantString*)line, ...;
- (void)connect;
- (void)disconnect;
- (void)disconnectWithReason: (OFString*)reason;
- (void)joinChannel: (OFString*)channelName;
- (void)leaveChannel: (IRCChannel*)channel;
|
109
110
111
112
113
114
115
|
- (void)kickUser: (OFString*)user
fromChannel: (IRCChannel*)channel
withReason: (OFString*)reason;
- (void)changeNicknameTo: (OFString*)nickname;
- (void)processLine: (OFString*)line;
- (void)handleConnection;
@end
|
>
>
>
|
130
131
132
133
134
135
136
137
138
139
|
- (void)kickUser: (OFString*)user
fromChannel: (IRCChannel*)channel
withReason: (OFString*)reason;
- (void)changeNicknameTo: (OFString*)nickname;
- (void)processLine: (OFString*)line;
- (void)handleConnection;
@end
@interface OFObject (IRCConnectionDelegate) <IRCConnectionDelegate>
@end
|