Quassel IRC  Pre-Release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
CtcpParser Class Reference

#include </tmp/quassel/src/core/ctcpparser.h>

Collaboration diagram for CtcpParser:

Classes

struct  CtcpReply

Signals

void newEvent (Event *event)

Public Member Functions

 CtcpParser (CoreSession *coreSession, QObject *parent=0)
CoreSessioncoreSession () const
void query (CoreNetwork *network, const QString &bufname, const QString &ctcpTag, const QString &message)
void reply (CoreNetwork *network, const QString &bufname, const QString &ctcpTag, const QString &message)
Q_INVOKABLE void processIrcEventRawNotice (IrcEventRawMessage *event)
Q_INVOKABLE void processIrcEventRawPrivmsg (IrcEventRawMessage *event)
Q_INVOKABLE void sendCtcpEvent (CtcpEvent *event)

Protected Member Functions

CoreNetworkcoreNetwork (NetworkEvent *e) const
void displayMsg (NetworkEvent *event, Message::Type msgType, const QString &msg, const QString &sender=QString(), const QString &target=QString(), Message::Flags msgFlags=Message::None)
 Creates and sends a MessageEvent.
void parse (IrcEventRawMessage *event, Message::Type msgType)
void parseSimple (IrcEventRawMessage *e, Message::Type messagetype, QByteArray dequotedMessage, CtcpEvent::CtcpType ctcptype, Message::Flags flags)
void parseStandard (IrcEventRawMessage *e, Message::Type messagetype, QByteArray dequotedMessage, CtcpEvent::CtcpType ctcptype, Message::Flags flags)
QByteArray lowLevelQuote (const QByteArray &)
QByteArray lowLevelDequote (const QByteArray &)
QByteArray xdelimQuote (const QByteArray &)
QByteArray xdelimDequote (const QByteArray &)
QByteArray pack (const QByteArray &ctcpTag, const QByteArray &message)
void packedReply (CoreNetwork *network, const QString &bufname, const QList< QByteArray > &replies)

Private Slots

void setStandardCtcp (bool enabled)

Private Member Functions

QString targetDecode (IrcEventRawMessage *e, const QByteArray &msg)

Private Attributes

CoreSession_coreSession
QHash< QUuid, CtcpReply_replies
QHash< QByteArray, QByteArray > _ctcpMDequoteHash
QHash< QByteArray, QByteArray > _ctcpXDelimDequoteHash

Detailed Description

Definition at line 34 of file ctcpparser.h.

Constructor & Destructor Documentation

Member Function Documentation

CoreSession* coreSession ( ) const
inline

Definition at line 41 of file ctcpparser.h.

References _coreSession.

Referenced by parse(), parseSimple(), and parseStandard().

void query ( CoreNetwork network,
const QString &  bufname,
const QString &  ctcpTag,
const QString &  message 
)
void reply ( CoreNetwork network,
const QString &  bufname,
const QString &  ctcpTag,
const QString &  message 
)
void processIrcEventRawNotice ( IrcEventRawMessage event)

Definition at line 149 of file ctcpparser.cpp.

References parse().

void processIrcEventRawPrivmsg ( IrcEventRawMessage event)

Definition at line 155 of file ctcpparser.cpp.

References parse().

void newEvent ( Event event)
signal
CoreNetwork* coreNetwork ( NetworkEvent e) const
inlineprotected

Definition at line 55 of file ctcpparser.h.

References NetworkEvent::network().

Referenced by parseSimple(), parseStandard(), sendCtcpEvent(), and targetDecode().

void displayMsg ( NetworkEvent event,
Message::Type  msgType,
const QString &  msg,
const QString &  sender = QString(),
const QString &  target = QString(),
Message::Flags  msgFlags = Message::None 
)
protected
void parseSimple ( IrcEventRawMessage e,
Message::Type  messagetype,
QByteArray  dequotedMessage,
CtcpEvent::CtcpType  ctcptype,
Message::Flags  flags 
)
protected
void parseStandard ( IrcEventRawMessage e,
Message::Type  messagetype,
QByteArray  dequotedMessage,
CtcpEvent::CtcpType  ctcptype,
Message::Flags  flags 
)
protected
QByteArray lowLevelQuote ( const QByteArray &  message)
protected

Definition at line 72 of file ctcpparser.cpp.

References _ctcpMDequoteHash.

Referenced by query(), reply(), and sendCtcpEvent().

QByteArray lowLevelDequote ( const QByteArray &  message)
protected

Definition at line 90 of file ctcpparser.cpp.

References _ctcpMDequoteHash.

Referenced by parse().

QByteArray xdelimQuote ( const QByteArray &  message)
protected

Definition at line 114 of file ctcpparser.cpp.

References _ctcpXDelimDequoteHash.

Referenced by pack().

QByteArray xdelimDequote ( const QByteArray &  message)
protected

Definition at line 126 of file ctcpparser.cpp.

References _ctcpXDelimDequoteHash.

Referenced by parseSimple(), and parseStandard().

QByteArray pack ( const QByteArray &  ctcpTag,
const QByteArray &  message 
)
protected

Definition at line 304 of file ctcpparser.cpp.

References XDELIM, and xdelimQuote().

Referenced by query(), reply(), and sendCtcpEvent().

void packedReply ( CoreNetwork network,
const QString &  bufname,
const QList< QByteArray > &  replies 
)
protected

Definition at line 333 of file ctcpparser.cpp.

References CoreNetwork::putCmd(), and CoreNetwork::serverEncode().

Referenced by sendCtcpEvent().

void setStandardCtcp ( bool  enabled)
privateslot

Definition at line 48 of file ctcpparser.cpp.

References _ctcpXDelimDequoteHash, and XDELIM.

Referenced by CtcpParser().

QString targetDecode ( IrcEventRawMessage e,
const QByteArray &  msg 
)
inlineprivate

Definition at line 82 of file ctcpparser.h.

References coreNetwork(), IrcEventRawMessage::target(), and CoreNetwork::userDecode().

Referenced by parseSimple(), and parseStandard().

Member Data Documentation

CoreSession* _coreSession
private

Definition at line 84 of file ctcpparser.h.

Referenced by coreSession(), and CtcpParser().

QHash<QUuid, CtcpReply> _replies
private

Definition at line 95 of file ctcpparser.h.

Referenced by parseSimple(), parseStandard(), and sendCtcpEvent().

QHash<QByteArray, QByteArray> _ctcpMDequoteHash
private

Definition at line 97 of file ctcpparser.h.

Referenced by CtcpParser(), lowLevelDequote(), and lowLevelQuote().

QHash<QByteArray, QByteArray> _ctcpXDelimDequoteHash
private

Definition at line 98 of file ctcpparser.h.

Referenced by setStandardCtcp(), xdelimDequote(), and xdelimQuote().


The documentation for this class was generated from the following files: