@@ -24,13 +24,11 @@ @class IRCConnection; @class IRCUser; @protocol IRCConnectionDelegate -#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; @@ -79,32 +77,17 @@ OFString *_nickname, *_username, *_realname; OFMutableDictionary *_channels; id _delegate; } -#ifdef OF_HAVE_PROPERTIES @property (copy) OFString *server; @property (assign) uint16_t port; @property (copy) OFString *nickname, *username, *realname; @property (assign) id delegate; @property (readonly, retain) OFTCPSocket *socket; -#endif + (instancetype)connection; -- (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 )delegate; -- (id )delegate; -- (OFTCPSocket*)socket; - (void)sendLine: (OFString*)line; - (void)sendLineWithFormat: (OFConstantString*)line, ...; - (void)connect; - (void)disconnect; - (void)disconnectWithReason: (OFString*)reason; @@ -122,8 +105,5 @@ - (void)changeNicknameTo: (OFString*)nickname; - (void)processLine: (OFString*)line; - (void)handleConnection; - (OFSet*)usersInChannel: (OFString*)channel; @end - -@interface OFObject (IRCConnectionDelegate) -@end