34 #include <QtCore/qobject.h> 35 #include <QtCore/qvariant.h> 36 #include <QtCore/qmetatype.h> 37 #include <QtCore/qdatetime.h> 38 #include <QtCore/qstringlist.h> 45 class IrcMessagePrivate;
52 Q_PROPERTY(
Type type READ type)
53 Q_PROPERTY(
bool own READ isOwn)
54 Q_PROPERTY(
bool implicit READ isImplicit)
55 Q_PROPERTY(Flags flags READ flags)
56 Q_PROPERTY(
bool valid READ isValid)
58 Q_PROPERTY(
QString prefix READ prefix WRITE setPrefix)
63 Q_PROPERTY(
QStringList parameters READ parameters WRITE setParameters)
64 Q_PROPERTY(
QDateTime timeStamp READ timeStamp WRITE setTimeStamp)
65 Q_PROPERTY(QVariantMap tags READ tags WRITE setTags)
106 Q_DECLARE_FLAGS(Flags,
Flag)
117 bool isImplicit() const;
120 void setFlags(Flags flags);
122 Q_INVOKABLE
bool testFlag(
Flag flag) const;
123 Q_INVOKABLE
void setFlag(
Flag flag,
bool on = true);
126 void setCommand(const
QString& command);
129 void setPrefix(const
QString& prefix);
139 QString parameter(
int index) const;
140 void setParameter(
int index, const
QString& parameter);
142 virtual
bool isValid() const;
145 void setTimeStamp(const
QDateTime& timeStamp);
150 QVariantMap tags() const;
151 void setTags(const QVariantMap& tags);
159 Q_INVOKABLE IrcMessage* clone(
QObject *parent = 0) const;
163 Q_DECLARE_PRIVATE(IrcMessage)
164 Q_DISABLE_COPY(IrcMessage)
167 Q_DECLARE_OPERATORS_FOR_FLAGS(IrcMessage::Flags)
179 bool isValid()
const;
189 Q_PROPERTY(
bool reply READ isReply)
190 Q_PROPERTY(
bool away READ isAway)
196 bool isReply() const;
199 bool isValid() const;
210 Q_PROPERTY(
QList<IrcMessage*> messages READ messages)
218 QList<IrcMessage*> messages() const;
220 bool isValid() const;
229 Q_PROPERTY(
QString subCommand READ subCommand)
238 bool isValid() const;
254 bool isValid()
const;
272 bool isValid() const;
283 Q_PROPERTY(
bool reply READ isReply)
290 bool isReply() const;
292 bool isValid() const;
312 bool isValid() const;
332 bool isValid() const;
345 Q_PROPERTY(
bool reply READ isReply)
346 Q_PROPERTY(
Kind kind READ kind)
356 bool isReply() const;
361 bool isValid()
const;
377 bool isValid()
const;
395 bool isValid() const;
413 bool isValid() const;
424 Q_PROPERTY(
QString statusPrefix READ statusPrefix)
425 Q_PROPERTY(
bool private READ isPrivate)
426 Q_PROPERTY(
bool reply READ isReply)
434 bool isPrivate() const;
435 bool isReply() const;
437 bool isValid() const;
446 Q_PROPERTY(
int code READ code)
447 Q_PROPERTY(
bool composed READ isComposed)
453 bool isComposed() const;
455 bool isValid() const;
473 bool isValid() const;
489 bool isValid()
const;
505 bool isValid()
const;
516 Q_PROPERTY(
QString statusPrefix READ statusPrefix)
517 Q_PROPERTY(
bool private READ isPrivate)
518 Q_PROPERTY(
bool action READ isAction)
519 Q_PROPERTY(
bool request READ isRequest)
527 bool isPrivate() const;
528 bool isAction() const;
529 bool isRequest() const;
531 bool isValid() const;
547 bool isValid()
const;
558 Q_PROPERTY(
bool reply READ isReply)
565 bool isReply() const;
567 bool isValid() const;
582 Q_PROPERTY(
int idle READ idle)
583 Q_PROPERTY(
bool secure READ isSecure)
585 Q_PROPERTY(
QString awayReason READ awayReason)
597 bool isSecure() const;
601 bool isValid() const;
623 bool isValid() const;
634 Q_PROPERTY(
bool away READ isAway)
635 Q_PROPERTY(
bool servOp READ isServOp)
644 bool isServOp() const;
647 bool isValid() const;
653 #ifndef QT_NO_DEBUG_STREAM 656 IRC_CORE_EXPORT
QDebug operator<<(
QDebug debug, IrcMessage::Flags flags);
658 IRC_CORE_EXPORT
QDebug operator<<(
QDebug debug,
const IrcMessage* message);
659 #endif // QT_NO_DEBUG_STREAM 664 Q_DECLARE_METATYPE(IRC_PREPEND_NAMESPACE(IrcMessage*))
666 Q_DECLARE_METATYPE(IRC_PREPEND_NAMESPACE(IrcAwayMessage*))
667 Q_DECLARE_METATYPE(IRC_PREPEND_NAMESPACE(IrcBatchMessage*))
670 Q_DECLARE_METATYPE(IRC_PREPEND_NAMESPACE(IrcHostChangeMessage*))
671 Q_DECLARE_METATYPE(IRC_PREPEND_NAMESPACE(IrcInviteMessage*))
672 Q_DECLARE_METATYPE(IRC_PREPEND_NAMESPACE(IrcJoinMessage*))
676 Q_DECLARE_METATYPE(IRC_PREPEND_NAMESPACE(IrcNamesMessage*))
677 Q_DECLARE_METATYPE(IRC_PREPEND_NAMESPACE(IrcNickMessage*))
678 Q_DECLARE_METATYPE(IRC_PREPEND_NAMESPACE(IrcNoticeMessage*))
679 Q_DECLARE_METATYPE(IRC_PREPEND_NAMESPACE(IrcNumericMessage*))
685 Q_DECLARE_METATYPE(IRC_PREPEND_NAMESPACE(IrcTopicMessage*))
686 Q_DECLARE_METATYPE(IRC_PREPEND_NAMESPACE(IrcWhoisMessage*))
687 Q_DECLARE_METATYPE(IRC_PREPEND_NAMESPACE(IrcWhowasMessage*))
688 Q_DECLARE_METATYPE(IRC_PREPEND_NAMESPACE(IrcWhoReplyMessage*))
690 #endif // IRCMESSAGE_H Represents an invite message.
Definition: ircmessage.h:278
Represents a private message.
Definition: ircmessage.h:511
A host change message (IrcHostChangeMessage).
Definition: ircmessage.h:94
Represents a names list message.
Definition: ircmessage.h:383
An invite message (IrcInviteMessage).
Definition: ircmessage.h:74
Represents a reply message to a WHOIS command.
Definition: ircmessage.h:573
Provides means to establish a connection to an IRC server.
Definition: ircconnection.h:48
Flag
Definition: ircmessage.h:98
Represents a host change message.
Definition: ircmessage.h:260
Provides network information and capability management.
Definition: ircnetwork.h:43
Represents a batch message.
Definition: ircmessage.h:205
Represents a reply message to a WHOWAS command.
Definition: ircmessage.h:607
A who reply message (IrcWhoReplyMessage).
Definition: ircmessage.h:89
Represents a numeric message.
Definition: ircmessage.h:443
A topic message (IrcTopicMessage).
Definition: ircmessage.h:88
A capability message (IrcCapabilityMessage).
Definition: ircmessage.h:72
Represents an error message.
Definition: ircmessage.h:244
A names message (IrcNamesMessage).
Definition: ircmessage.h:79
Represents a quit message.
Definition: ircmessage.h:537
Represents a join message.
Definition: ircmessage.h:298
Represents a pong message.
Definition: ircmessage.h:495
Represents a nick message.
Definition: ircmessage.h:401
A kick message (IrcKickMessage).
Definition: ircmessage.h:76
Represents a ping message.
Definition: ircmessage.h:479
An error message (IrcErrorMessage).
Definition: ircmessage.h:73
An unknown message (IrcMessage).
Definition: ircmessage.h:71
A message of the day (IrcMotdMessage).
Definition: ircmessage.h:78
A ping message (IrcPingMessage).
Definition: ircmessage.h:84
A private message (IrcPrivateMessage).
Definition: ircmessage.h:86
An away message (IrcAwayMessage).
Definition: ircmessage.h:91
A numeric message (IrcNumericMessage).
Definition: ircmessage.h:82
A whowas reply message (IrcWhowasMessage).
Definition: ircmessage.h:93
A quit message (IrcQuitMessage).
Definition: ircmessage.h:87
A whois reply message (IrcWhoisMessage).
Definition: ircmessage.h:92
Provides the most common commands.
Definition: irccommand.h:44
Kind
Definition: ircmessage.h:358
Represents a kick message.
Definition: ircmessage.h:318
Represents a reply message to a WHO command.
Definition: ircmessage.h:629
Type
Definition: ircmessage.h:70
Represents a capability message.
Definition: ircmessage.h:226
Represents an account notify message.
Definition: ircmessage.h:169
Represents a part message.
Definition: ircmessage.h:461
Represents a topic message.
Definition: ircmessage.h:553
The base class of all messages.
Definition: ircmessage.h:47
Represents an away message.
Definition: ircmessage.h:185
A join message (IrcJoinMessage).
Definition: ircmessage.h:75
Represents a mode message.
Definition: ircmessage.h:338
A nick message (IrcNickMessage).
Definition: ircmessage.h:80
Represents a message of the day.
Definition: ircmessage.h:367
An account notify message (IrcAccountMessage).
Definition: ircmessage.h:90
A mode message (IrcModeMessage).
Definition: ircmessage.h:77
Represents a notice message.
Definition: ircmessage.h:419
A pong message (IrcPongMessage).
Definition: ircmessage.h:85
A part message (IrcPartMessage).
Definition: ircmessage.h:83
A notice message (IrcNoticeMessage).
Definition: ircmessage.h:81