Differences From Artifact [51a0fb5754]:
- File src/IRCConnection.h — part of check-in [50a9cc56c6] at 2012-11-24 10:02:32 on branch trunk — API improvements. (user: js, size: 4882) [annotate] [blame] [check-ins using]
To Artifact [6d0137034c]:
- File
src/IRCConnection.h
— part of check-in
[620b9b2a30]
at
2012-11-24 11:56:58
on branch trunk
— Remove the IRCChannels class.
It was only overcomplicating things with no gain at all. Instead,
strings are used to describe channels now and the storage of users in a
channel is inside IRCConnection now. (user: js, size: 4660) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
16 17 18 19 20 21 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ | | < < < < | | | > | < > | < | | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #import <ObjFW/ObjFW.h> @class IRCConnection; @class IRCUser; #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 joinChannel: (OFString*)channel; - (void)connection: (IRCConnection*)connection didSeeUser: (IRCUser*)user leaveChannel: (OFString*)channel reason: (OFString*)reason; - (void)connection: (IRCConnection*)connection didSeeUser: (IRCUser*)user changeNicknameTo: (OFString*)nickname; - (void)connection: (IRCConnection*)connection didSeeUser: (IRCUser*)user kickUser: (OFString*)kickedUser channel: (OFString*)channel reason: (OFString*)reason; - (void)connection: (IRCConnection*)connection didSeeUserQuit: (IRCUser*)user reason: (OFString*)reason; - (void)connection: (IRCConnection*)connection didReceiveMessage: (OFString*)msg channel: (OFString*)channel user: (IRCUser*)user; - (void)connection: (IRCConnection*)connection didReceivePrivateMessage: (OFString*)msg user: (IRCUser*)user; - (void)connection: (IRCConnection*)connection didReceiveNotice: (OFString*)notice user: (IRCUser*)user; - (void)connection: (IRCConnection*)connection didReceiveNotice: (OFString*)notice channel: (OFString*)channel user: (IRCUser*)user; - (void)connection: (IRCConnection*)connection didReceiveNamesForChannel: (OFString*)channel; - (void)connectionWasClosed: (IRCConnection*)connection; @end @interface IRCConnection: OFObject { OFTCPSocket *sock; OFString *server; |
︙ | ︙ | |||
112 113 114 115 116 117 118 | - (OFTCPSocket*)socket; - (void)sendLine: (OFString*)line; - (void)sendLineWithFormat: (OFConstantString*)line, ...; - (void)connect; - (void)disconnect; - (void)disconnectWithReason: (OFString*)reason; - (void)joinChannel: (OFString*)channelName; | | | < < | | < < | > | 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | - (OFTCPSocket*)socket; - (void)sendLine: (OFString*)line; - (void)sendLineWithFormat: (OFConstantString*)line, ...; - (void)connect; - (void)disconnect; - (void)disconnectWithReason: (OFString*)reason; - (void)joinChannel: (OFString*)channelName; - (void)leaveChannel: (OFString*)channel; - (void)leaveChannel: (OFString*)channel reason: (OFString*)reason; - (void)sendMessage: (OFString*)msg to: (OFString*)to; - (void)sendNotice: (OFString*)notice to: (OFString*)to; - (void)kickUser: (OFString*)user channel: (OFString*)channel reason: (OFString*)reason; - (void)changeNicknameTo: (OFString*)nickname; - (void)processLine: (OFString*)line; - (void)handleConnection; - (OFSet*)usersInChannel: (OFString*)channel; @end @interface OFObject (IRCConnectionDelegate) <IRCConnectionDelegate> @end |