Diffstat (limited to 'noncore/net/opieirc/ircchannelperson.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opieirc/ircchannelperson.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/noncore/net/opieirc/ircchannelperson.h b/noncore/net/opieirc/ircchannelperson.h new file mode 100644 index 0000000..a8c4791 --- a/dev/null +++ b/noncore/net/opieirc/ircchannelperson.h | |||
@@ -0,0 +1,34 @@ | |||
1 | #ifndef IRCCHANNELPERSON_H | ||
2 | #define IRCCHANNELPERSON_H | ||
3 | |||
4 | class QString; | ||
5 | class IRCPerson; | ||
6 | |||
7 | /* This class encapsulates a IRCPerson and adds | ||
8 | * channel specific information */ | ||
9 | class IRCChannelPerson { | ||
10 | |||
11 | public: | ||
12 | /* Flags which a person can have inside a channel */ | ||
13 | enum IRCChannelPersonFlag { | ||
14 | PERSON_FLAG_OP = 0x01, | ||
15 | PERSON_FLAG_VOICE = 0x02, | ||
16 | PERSON_FLAG_HALFOP = 0x04 | ||
17 | }; | ||
18 | |||
19 | IRCChannelPerson(IRCPerson *person = 0); | ||
20 | ~IRCChannelPerson(); | ||
21 | |||
22 | QString setOp(const QString &nickname, bool set); | ||
23 | QString setVoice(const QString &nickname, bool set); | ||
24 | QString nick(); | ||
25 | const unsigned int flags(); | ||
26 | void setFlags(int flags); | ||
27 | void setNick(const QString &nickname); | ||
28 | |||
29 | protected: | ||
30 | IRCPerson *m_person; | ||
31 | unsigned int m_flags; | ||
32 | }; | ||
33 | |||
34 | #endif | ||