Diffstat (limited to 'noncore/net/opieirc/ircoutput.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/opieirc/ircoutput.h | 17 |
1 files changed, 14 insertions, 3 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 | |||
@@ -45,7 +45,14 @@ enum IRCOutputType { | |||
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 |
@@ -54,7 +61,7 @@ enum IRCOutputType { | |||
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); |
@@ -64,12 +71,16 @@ public: | |||
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 |