Diffstat (limited to 'noncore/net/opieirc/ircsession.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opieirc/ircsession.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/net/opieirc/ircsession.h b/noncore/net/opieirc/ircsession.h index 7c91893..23a2540 100644 --- a/noncore/net/opieirc/ircsession.h +++ b/noncore/net/opieirc/ircsession.h | |||
@@ -9,58 +9,59 @@ | |||
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | 18 | ||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #ifndef __IRCSESSION_H | 21 | #ifndef __IRCSESSION_H |
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 | class IRCServerTab; | ||
33 | 34 | ||
34 | /* The IRCSession stores all information relating to the connection | 35 | /* The IRCSession stores all information relating to the connection |
35 | to one IRC server. IRCSession makes it possible to run multiple | 36 | to one IRC server. IRCSession makes it possible to run multiple |
36 | IRC server connections from within the same program */ | 37 | IRC server connections from within the same program */ |
37 | 38 | ||
38 | class IRCSession : public QObject { | 39 | class IRCSession : public QObject { |
39 | friend class IRCMessageParser; | 40 | friend class IRCMessageParser; |
40 | Q_OBJECT | 41 | Q_OBJECT |
41 | public: | 42 | public: |
42 | IRCSession(QWidget *parent, IRCServer *server); | 43 | IRCSession(QObject *parent, IRCServer *server); |
43 | ~IRCSession(); | 44 | ~IRCSession(); |
44 | 45 | ||
45 | void join(QString channel); | 46 | void join(QString channel); |
46 | void quit(QString message); | 47 | void quit(QString message); |
47 | void quit(); | 48 | void quit(); |
48 | void raw(QString message); | 49 | void raw(QString message); |
49 | void topic(IRCChannel *channel, QString message); | 50 | void topic(IRCChannel *channel, QString message); |
50 | void mode(IRCChannel *channel, QString message); | 51 | void mode(IRCChannel *channel, QString message); |
51 | void mode(IRCPerson *person, QString message); | 52 | void mode(IRCPerson *person, QString message); |
52 | void mode(QString message); | 53 | void mode(QString message); |
53 | void part(IRCChannel *channel); | 54 | void part(IRCChannel *channel); |
54 | void op(IRCChannel *channel, IRCPerson *person); | 55 | void op(IRCChannel *channel, IRCPerson *person); |
55 | void kick(IRCChannel *channel, IRCPerson *person); | 56 | void kick(IRCChannel *channel, IRCPerson *person); |
56 | void kick(IRCChannel *channel, IRCPerson *person, QString message); | 57 | void kick(IRCChannel *channel, IRCPerson *person, QString message); |
57 | void beginSession(); | 58 | void beginSession(); |
58 | bool isSessionActive(); | 59 | bool isSessionActive(); |
59 | void endSession(); | 60 | void endSession(); |
60 | bool isLoggedIn(); | 61 | bool isLoggedIn(); |
61 | void sendMessage(IRCPerson *person, QString message); | 62 | void sendMessage(IRCPerson *person, QString message); |
62 | void sendMessage(IRCChannel *channel, QString message); | 63 | void sendMessage(IRCChannel *channel, QString message); |
63 | void sendAction(IRCPerson *person, QString message); | 64 | void sendAction(IRCPerson *person, QString message); |
64 | void sendAction(IRCChannel *channel, QString message); | 65 | void sendAction(IRCChannel *channel, QString message); |
65 | void updateNickname(const QString &oldNickname, const QString &newNickname); | 66 | void updateNickname(const QString &oldNickname, const QString &newNickname); |
66 | void setValidUsermodes(const QString &modes); | 67 | void setValidUsermodes(const QString &modes); |
@@ -69,28 +70,27 @@ public: | |||
69 | void sendCTCPPing(const QString &nickname); | 70 | void sendCTCPPing(const QString &nickname); |
70 | void sendCTCPRequest(const QString &nickname, const QString &type, const QString &args); | 71 | void sendCTCPRequest(const QString &nickname, const QString &type, const QString &args); |
71 | void sendCTCPReply(const QString &nickname, const QString &type, const QString &args); | 72 | void sendCTCPReply(const QString &nickname, const QString &type, const QString &args); |
72 | IRCChannel *getChannel(QString channelname); | 73 | IRCChannel *getChannel(QString channelname); |
73 | IRCPerson *getPerson(QString nickname); | 74 | IRCPerson *getPerson(QString nickname); |
74 | protected: | 75 | protected: |
75 | void addPerson(IRCPerson *person); | 76 | void addPerson(IRCPerson *person); |
76 | void addChannel(IRCChannel *channel); | 77 | void addChannel(IRCChannel *channel); |
77 | void removeChannel(IRCChannel *channel); | 78 | void removeChannel(IRCChannel *channel); |
78 | void removePerson(IRCPerson *person); | 79 | void removePerson(IRCPerson *person); |
79 | void getChannelsByPerson(IRCPerson *person, QList<IRCChannel> &channels); | 80 | void getChannelsByPerson(IRCPerson *person, QList<IRCChannel> &channels); |
80 | protected slots: | 81 | protected slots: |
81 | void handleMessage(IRCMessage *message); | 82 | void handleMessage(IRCMessage *message); |
82 | signals: | 83 | signals: |
83 | void outputReady(IRCOutput output); | 84 | void outputReady(IRCOutput output); |
84 | void updateChannels(); | 85 | void updateChannels(); |
85 | protected: | 86 | protected: |
86 | IRCServer *m_server; | 87 | IRCServer *m_server; |
87 | IRCConnection *m_connection; | 88 | IRCConnection *m_connection; |
88 | IRCMessageParser *m_parser; | 89 | IRCMessageParser *m_parser; |
89 | QList<IRCChannel> m_channels; | 90 | QList<IRCChannel> m_channels; |
90 | QList<IRCPerson> m_people; | 91 | QList<IRCPerson> m_people; |
91 | QString m_validUsermodes; | 92 | QString m_validUsermodes; |
92 | QString m_validChannelmodes; | 93 | QString m_validChannelmodes; |
93 | QWidget *m_parent; | ||
94 | }; | 94 | }; |
95 | 95 | ||
96 | #endif /* __IRCSESSION_H */ | 96 | #endif /* __IRCSESSION_H */ |