![]() |
Communi
1.1.0
A cross-platform IRC client library written with Qt 4
|
The IrcMessage class is the base class of all IRC message classes. More...
#include <IrcMessage>
Inherited by IrcErrorMessage, IrcInviteMessage, IrcJoinMessage, IrcKickMessage, IrcModeMessage, IrcNickMessage, IrcNoticeMessage, IrcNumericMessage, IrcPartMessage, IrcPingMessage, IrcPongMessage, IrcPrivateMessage, IrcQuitMessage, and IrcTopicMessage.
Public Types | |
| enum | Type { Unknown, Nick, Quit, Join, Part, Topic, Invite, Kick, Mode, Private, Notice, Ping, Pong, Error, Numeric } |
Public Member Functions | |
| Q_INVOKABLE | IrcMessage (QObject *parent=0) |
| virtual | ~IrcMessage () |
| Q_INVOKABLE QByteArray | toData () const |
Static Public Member Functions | |
| static Q_INVOKABLE IrcMessage * | fromCommand (const QString &sender, IrcCommand *command, QObject *parent=0) |
| static Q_INVOKABLE IrcMessage * | fromData (const QByteArray &data, const QByteArray &encoding, QObject *parent=0) |
Properties | |
| QString | command |
| bool | own |
| QStringList | parameters |
| IrcSender | sender |
| Type | type |
| bool | valid |
The IrcMessage class is the base class of all IRC message classes.
IRC messages are received from an IRC server. IrcSession translates received messages into IrcMessage instances and emits the IrcSession::messageReceived() signal upon message received.
Subclasses of IrcMessage contain specialized accessors for parameters that are specific to the particular type of message. See IrcMessage::Type for the list of supported message types.
| enum IrcMessage::Type |
This enum describes the supported message types.
| Unknown |
An unknown message (IrcMessage). |
| Nick |
A nick message (IrcNickMessage). |
| Quit |
A quit message (IrcQuitMessage). |
| Join |
A join message (IrcJoinMessage). |
| Part |
A part message (IrcPartMessage). |
| Topic |
A topic message (IrcTopicMessage). |
| Invite |
An invite message (IrcInviteMessage). |
| Kick |
A kick message (IrcKickMessage). |
| Mode |
A mode message (IrcModeMessage). |
| Private |
A private message (IrcPrivateMessage). |
| Notice |
A notice message (IrcNoticeMessage). |
| Ping |
A ping message (IrcPingMessage). |
| Pong |
A pong message (IrcPongMessage). |
| Error |
An error message (IrcErrorMessage). |
| Numeric |
A numeric message (IrcNumericMessage). |
|
explicit |
Constructs a new IrcMessage with parent.
|
virtual |
Destructs the IRC message.
|
static |
Creates a new message from sender and command with parent.
|
static |
Creates a new message from data with encoding and parent.
| QByteArray IrcMessage::toData | ( | ) | const |
Returns the message as received from an IRC server.
|
read |
This property holds the message command.
|
read |
This property is true if this is user's own message; otherwise false.
A message is considered own if the sender matches IrcSession::nickName.
|
read |
This property holds the message parameters.
|
read |
This property holds the message sender.
|
read |
This property holds the message type.
|
read |
This property is true if the message is valid; otherwise false.
A message is considered valid if the sender is valid and the parameters match the message.
1.8.1.1