Diffstat (limited to 'noncore/net/opieirc/ircsession.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opieirc/ircsession.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/noncore/net/opieirc/ircsession.h b/noncore/net/opieirc/ircsession.h index aa4bed3..a6a3e50 100644 --- a/noncore/net/opieirc/ircsession.h +++ b/noncore/net/opieirc/ircsession.h | |||
@@ -22,53 +22,61 @@ | |||
22 | #define __IRCSESSION_H | 22 | #define __IRCSESSION_H |
23 | 23 | ||
24 | #include <qstring.h> | 24 | #include <qstring.h> |
25 | #include <qlist.h> | 25 | #include <qlist.h> |
26 | #include "ircserver.h" | 26 | #include "ircserver.h" |
27 | #include "ircconnection.h" | 27 | #include "ircconnection.h" |
28 | #include "ircmessage.h" | 28 | #include "ircmessage.h" |
29 | #include "ircchannel.h" | 29 | #include "ircchannel.h" |
30 | #include "ircoutput.h" | 30 | #include "ircoutput.h" |
31 | 31 | ||
32 | class IRCMessageParser; | 32 | class IRCMessageParser; |
33 | 33 | ||
34 | /* The IRCSession stores all information relating to the connection | 34 | /* The IRCSession stores all information relating to the connection |
35 | to one IRC server. IRCSession makes it possible to run multiple | 35 | to one IRC server. IRCSession makes it possible to run multiple |
36 | IRC server connections from within the same program */ | 36 | IRC server connections from within the same program */ |
37 | 37 | ||
38 | class IRCSession : public QObject { | 38 | class IRCSession : public QObject { |
39 | friend class IRCMessageParser; | 39 | friend class IRCMessageParser; |
40 | Q_OBJECT | 40 | Q_OBJECT |
41 | public: | 41 | public: |
42 | IRCSession(IRCServer *server); | 42 | IRCSession(IRCServer *server); |
43 | ~IRCSession(); | 43 | ~IRCSession(); |
44 | 44 | ||
45 | void join(QString channel); | 45 | void join(QString channel); |
46 | void quit(QString message); | ||
47 | void quit(); | ||
48 | void raw(QString message); | ||
49 | void topic(IRCChannel *channel, QString message); | ||
50 | void mode(IRCChannel *channel, QString message); | ||
51 | void mode(IRCPerson *person, QString message); | ||
52 | void mode(QString message); | ||
46 | void part(IRCChannel *channel); | 53 | void part(IRCChannel *channel); |
54 | void kick(IRCChannel *channel, IRCPerson *person); | ||
55 | void kick(IRCChannel *channel, IRCPerson *person, QString message); | ||
47 | void beginSession(); | 56 | void beginSession(); |
48 | bool isSessionActive(); | 57 | bool isSessionActive(); |
49 | void endSession(); | 58 | void endSession(); |
50 | |||
51 | void sendMessage(IRCPerson *person, QString message); | 59 | void sendMessage(IRCPerson *person, QString message); |
52 | void sendMessage(IRCChannel *channel, QString message); | 60 | void sendMessage(IRCChannel *channel, QString message); |
53 | void sendAction(IRCPerson *person, QString message); | 61 | void sendAction(IRCPerson *person, QString message); |
54 | void sendAction(IRCChannel *channel, QString message); | 62 | void sendAction(IRCChannel *channel, QString message); |
55 | IRCChannel *getChannel(QString channelname); | 63 | IRCChannel *getChannel(QString channelname); |
56 | IRCPerson *getPerson(QString nickname); | 64 | IRCPerson *getPerson(QString nickname); |
57 | protected: | 65 | protected: |
58 | void addPerson(IRCPerson *person); | 66 | void addPerson(IRCPerson *person); |
59 | void addChannel(IRCChannel *channel); | 67 | void addChannel(IRCChannel *channel); |
60 | void removeChannel(IRCChannel *channel); | 68 | void removeChannel(IRCChannel *channel); |
61 | void removePerson(IRCPerson *person); | 69 | void removePerson(IRCPerson *person); |
62 | void getChannelsByPerson(IRCPerson *person, QList<IRCChannel> &channels); | 70 | void getChannelsByPerson(IRCPerson *person, QList<IRCChannel> &channels); |
63 | protected slots: | 71 | protected slots: |
64 | void handleMessage(IRCMessage *message); | 72 | void handleMessage(IRCMessage *message); |
65 | signals: | 73 | signals: |
66 | void outputReady(IRCOutput output); | 74 | void outputReady(IRCOutput output); |
67 | protected: | 75 | protected: |
68 | IRCServer *m_server; | 76 | IRCServer *m_server; |
69 | IRCConnection *m_connection; | 77 | IRCConnection *m_connection; |
70 | IRCMessageParser *m_parser; | 78 | IRCMessageParser *m_parser; |
71 | QList<IRCChannel> m_channels; | 79 | QList<IRCChannel> m_channels; |
72 | QList<IRCPerson> m_people; | 80 | QList<IRCPerson> m_people; |
73 | }; | 81 | }; |
74 | 82 | ||