diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | bcb704366cb5e333a626c18c308c7e0448a8e69f (patch) | |
tree | f0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /ksirc/messageReceiver.h | |
download | tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.tar.gz tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksirc/messageReceiver.h')
-rw-r--r-- | ksirc/messageReceiver.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/ksirc/messageReceiver.h b/ksirc/messageReceiver.h new file mode 100644 index 00000000..a86817b0 --- /dev/null +++ b/ksirc/messageReceiver.h @@ -0,0 +1,62 @@ + +#ifndef KMESSAGERECEIVER_H +#define KMESSAGERECEIVER_H + +#include <qstring.h> +#include <qptrlist.h> + +class KSircProcess; +class QTextCodec; + +struct filterRule { + const char *desc; + const char *search; + const char *from; + const char *to; +}; + +typedef QPtrList<filterRule> filterRuleList; + +class KSircMessageReceiver +{ +public: + KSircMessageReceiver(KSircProcess *_proc); + virtual ~KSircMessageReceiver(); + + virtual void sirc_receive(QCString str, bool broadcast = false) = 0; + + virtual void control_message(int, QString) = 0; + + bool getBroadcast(); + void setBroadcast(bool bd); + + virtual filterRuleList *defaultRules(); + + KSircProcess *ksircProcess() const { return proc; } + +private: + KSircProcess *proc; + bool broadcast; + +}; + +class UnicodeMessageReceiver : public KSircMessageReceiver +{ +public: + UnicodeMessageReceiver( KSircProcess *process ); + + virtual void sirc_receive(QCString str, bool broadcast = false); + virtual void sirc_receive(QString str, bool broadcast = false) = 0; + +protected: + void setEncoding( const QString &encoding ); + QString encoding() const; + + QTextCodec *encoder() const; + +private: + QString m_encoding; + QTextCodec *m_encoder; +}; + +#endif |