Diffstat (limited to 'noncore/net/opieirc/ircoutput.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opieirc/ircoutput.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/noncore/net/opieirc/ircoutput.h b/noncore/net/opieirc/ircoutput.h index 9c0b8bb..934dbda 100644 --- a/noncore/net/opieirc/ircoutput.h +++ b/noncore/net/opieirc/ircoutput.h | |||
@@ -42,34 +42,45 @@ enum IRCOutputType { | |||
42 | OUTPUT_CTCP = 11, /* parameters : none */ | 42 | OUTPUT_CTCP = 11, /* parameters : none */ |
43 | OUTPUT_SELFKICK = 12, /* parameters : channel (IRCChannel) */ | 43 | OUTPUT_SELFKICK = 12, /* parameters : channel (IRCChannel) */ |
44 | OUTPUT_OTHERKICK = 13, /* parameters : channel (IRCChannel) person (IRCChannelPerson) */ | 44 | OUTPUT_OTHERKICK = 13, /* parameters : channel (IRCChannel) person (IRCChannelPerson) */ |
45 | OUTPUT_CHANACTION = 14, /* parameters : channel (IRCChannel) person (IRCChannelPerson) */ | 45 | OUTPUT_CHANACTION = 14, /* parameters : channel (IRCChannel) person (IRCChannelPerson) */ |
46 | OUTPUT_QUERYACTION = 15, /* parameters : person (IRCPerson) */ | 46 | OUTPUT_QUERYACTION = 15, /* parameters : person (IRCPerson) */ |
47 | OUTPUT_CHANPERSONMODE = 16, /* parameters : channel (IRCCHannel) person (IRCChannelPerson) */ | 47 | OUTPUT_CHANPERSONMODE = 16, /* parameters : channel (IRCCHannel) person (IRCChannelPerson) */ |
48 | OUTPUT_TOPIC = 17 /* parameters : channel (IRCChannel) */ | 48 | OUTPUT_TOPIC = 17, /* parameters : channel (IRCChannel) */ |
49 | OUTPUT_TITLE = 18 /* parameters : channel (IRCChannel) */ | ||
50 | }; | ||
51 | |||
52 | typedef struct IRCOutputEscapeSecuences { | ||
53 | char escape; | ||
54 | char *open; | ||
55 | char *close; | ||
49 | }; | 56 | }; |
50 | 57 | ||
51 | /* The IRCOutput class is used as a kind of message which is sent by the | 58 | /* The IRCOutput class is used as a kind of message which is sent by the |
52 | IRC parser to inform the GUI of changes. This could for example be a | 59 | IRC parser to inform the GUI of changes. This could for example be a |
53 | channel message or a nickname change */ | 60 | channel message or a nickname change */ |
54 | 61 | ||
55 | class IRCOutput { | 62 | class IRCOutput { |
56 | public: | 63 | public: |
57 | IRCOutput(IRCOutputType type, QString message); | 64 | IRCOutput(IRCOutputType type = OUTPUT_SERVERMESSAGE, QString message = QString::null); |
58 | /* Used to add a parameter to this IRCOutput. Parameters are dependent | 65 | /* Used to add a parameter to this IRCOutput. Parameters are dependent |
59 | on which IRCOutputType we are using (see above) */ | 66 | on which IRCOutputType we are using (see above) */ |
60 | void addParam(void *data); | 67 | void addParam(void *data); |
61 | 68 | ||
62 | IRCOutputType type(); | 69 | IRCOutputType type(); |
63 | QString message(); | 70 | QString message(); |
64 | /* Return the message with all HTML code escaped (for example < instead of '<') */ | 71 | /* Return the message with all HTML code escaped (for example < instead of '<') */ |
65 | QString htmlMessage(); | 72 | QString htmlMessage(); |
66 | 73 | ||
67 | static QString toHTML(QString message); | 74 | void setType(IRCOutputType); |
75 | void setMessage(const QString &message); | ||
76 | |||
77 | static QString toHTML(const QString &message); | ||
68 | void *getParam(int index); | 78 | void *getParam(int index); |
69 | protected: | 79 | protected: |
70 | IRCOutputType m_type; | 80 | IRCOutputType m_type; |
71 | QString m_message; | 81 | QString m_message; |
72 | QList<void> m_parameters; | 82 | QList<void> m_parameters; |
83 | static IRCOutputEscapeSecuences m_escapeSecuences[]; | ||
73 | }; | 84 | }; |
74 | 85 | ||
75 | #endif | 86 | #endif |