Communi  3.5.0
A cross-platform IRC framework written with Qt
irc.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2008-2016 The Communi Project
3 
4  You may use this file under the terms of BSD license as follows:
5 
6  Redistribution and use in source and binary forms, with or without
7  modification, are permitted provided that the following conditions are met:
8  * Redistributions of source code must retain the above copyright
9  notice, this list of conditions and the following disclaimer.
10  * Redistributions in binary form must reproduce the above copyright
11  notice, this list of conditions and the following disclaimer in the
12  documentation and/or other materials provided with the distribution.
13  * Neither the name of the copyright holder nor the names of its
14  contributors may be used to endorse or promote products derived
15  from this software without specific prior written permission.
16 
17  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR
21  ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28 
29 #ifndef IRC_H
30 #define IRC_H
31 
32 #include <IrcGlobal>
33 #include <QtCore/qobject.h>
34 #include <QtCore/qstring.h>
35 #include <QtCore/qmetatype.h>
36 
37 IRC_BEGIN_NAMESPACE
38 
39 class IRC_CORE_EXPORT Irc : public QObject
40 {
41  Q_OBJECT
42  Q_PROPERTY(bool secureSupported READ isSecureSupported CONSTANT)
43  Q_PROPERTY(QStringList supportedSaslMechanisms READ supportedSaslMechanisms CONSTANT)
44  Q_PROPERTY(QStringList supportedCapabilities READ supportedCapabilities CONSTANT)
45  Q_ENUMS(Color DataRole SortMethod Code)
46 
47 public:
48  Q_INVOKABLE static QString version();
49  Q_INVOKABLE static QString codeToString(int code);
50  Q_INVOKABLE static QString nickFromPrefix(const QString& prefix);
51  Q_INVOKABLE static QString identFromPrefix(const QString& prefix);
52  Q_INVOKABLE static QString hostFromPrefix(const QString& prefix);
53  Q_INVOKABLE static void registerMetaTypes();
54 
55  static bool isSecureSupported();
56  static QStringList supportedSaslMechanisms();
57  static QStringList supportedCapabilities();
58 
59  enum Color {
60  White = 0,
61  Black = 1,
62  Blue = 2,
63  Green = 3,
64  Red = 4,
65  Brown = 5,
66  Purple = 6,
67  Orange = 7,
68  Yellow = 8,
69  LightGreen = 9,
70  Cyan = 10,
71  LightCyan = 11,
72  LightBlue = 12,
73  Pink = 13,
74  Gray = 14,
75  LightGray = 15
76  };
77 
78  enum DataRole {
79  UserRole = Qt::UserRole,
85  TitleRole
86  };
87 
88  enum SortMethod {
92  SortByActivity
93  };
94 
95  enum Code {
96  RPL_WELCOME = 1,
97  RPL_YOURHOST = 2,
98  RPL_CREATED = 3,
99  RPL_MYINFO = 4,
100  RPL_ISUPPORT = 5,
101  RPL_SNOMASK = 8,
102  RPL_STATMEMTOT = 9,
103  RPL_BOUNCE = 10,
104  RPL_STATMEM = 10,
105  RPL_YOURCOOKIE = 14,
106  RPL_YOURID = 42,
107  RPL_SAVENICK = 43,
108  RPL_ATTEMPTINGJUNC = 50,
109  RPL_ATTEMPTINGREROUTE = 51,
110  RPL_TRACELINK = 200,
111  RPL_TRACECONNECTING = 201,
112  RPL_TRACEHANDSHAKE = 202,
113  RPL_TRACEUNKNOWN = 203,
114  RPL_TRACEOPERATOR = 204,
115  RPL_TRACEUSER = 205,
116  RPL_TRACESERVER = 206,
117  RPL_TRACESERVICE = 207,
118  RPL_TRACENEWTYPE = 208,
119  RPL_TRACECLASS = 209,
120  RPL_TRACERECONNECT = 210,
121  RPL_STATS = 210,
122  RPL_STATSLINKINFO = 211,
123  RPL_STATSCOMMANDS = 212,
124  RPL_STATSCLINE = 213,
125  RPL_STATSNLINE = 214,
126  RPL_STATSILINE = 215,
127  RPL_STATSKLINE = 216,
128  RPL_STATSQLINE = 217,
129  RPL_STATSYLINE = 218,
130  RPL_ENDOFSTATS = 219,
131  RPL_UMODEIS = 221,
132  RPL_MODLIST = 222,
133  RPL_SQLINE_NICK = 222,
134  RPL_STATSZLINE = 225,
135  RPL_STATSCOUNT = 226,
136  RPL_SERVICEINFO = 231,
137  RPL_ENDOFSERVICES = 232,
138  RPL_SERVICE = 233,
139  RPL_SERVLIST = 234,
140  RPL_SERVLISTEND = 235,
141  RPL_STATSVERBOSE = 236,
142  RPL_STATSENGINE = 237,
143  RPL_STATSIAUTH = 239,
144  RPL_STATSVLINE = 240,
145  RPL_STATSLLINE = 241,
146  RPL_STATSUPTIME = 242,
147  RPL_STATSOLINE = 243,
148  RPL_STATSHLINE = 244,
149  RPL_STATSSLINE = 245,
150  RPL_STATSPING = 246,
151  RPL_STATSBLINE = 247,
152  RPL_STATSDEFINE = 248,
153  RPL_STATSDEBUG = 249,
154  RPL_STATSDLINE = 250,
155  RPL_STATSCONN = 250,
156  RPL_LUSERCLIENT = 251,
157  RPL_LUSEROP = 252,
158  RPL_LUSERUNKNOWN = 253,
159  RPL_LUSERCHANNELS = 254,
160  RPL_LUSERME = 255,
161  RPL_ADMINME = 256,
162  RPL_ADMINLOC1 = 257,
163  RPL_ADMINLOC2 = 258,
164  RPL_ADMINEMAIL = 259,
165  RPL_TRACELOG = 261,
166  RPL_TRACEPING = 262,
167  RPL_TRACEEND = 262,
168  RPL_TRYAGAIN = 263,
169  RPL_LOCALUSERS = 265,
170  RPL_GLOBALUSERS = 266,
171  RPL_START_NETSTAT = 267,
172  RPL_NETSTAT = 268,
173  RPL_END_NETSTAT = 269,
174  RPL_PRIVS = 270,
175  RPL_SILELIST = 271,
176  RPL_ENDOFSILELIST = 272,
177  RPL_NOTIFY = 273,
178  RPL_ENDNOTIFY = 274,
179  RPL_STATSDELTA = 274,
180  RPL_VCHANEXIST = 276,
181  RPL_VCHANLIST = 277,
182  RPL_VCHANHELP = 278,
183  RPL_GLIST = 280,
184  RPL_ENDOFGLIST = 281,
185  RPL_ACCEPTLIST = 281,
186  RPL_ENDOFACCEPT = 282,
187  RPL_JUPELIST = 282,
188  RPL_ENDOFJUPELIST = 283,
189  RPL_FEATURE = 284,
190  RPL_GLIST_HASH = 285,
191  RPL_CHANINFO_HANDLE = 285,
192  RPL_NEWHOSTIS = 285,
193  RPL_CHANINFO_USERS = 286,
194  RPL_CHKHEAD = 286,
195  RPL_CHANINFO_CHOPS = 287,
196  RPL_CHANUSER = 287,
197  RPL_CHANINFO_VOICES = 288,
198  RPL_PATCHHEAD = 288,
199  RPL_CHANINFO_AWAY = 289,
200  RPL_PATCHCON = 289,
201  RPL_CHANINFO_OPERS = 290,
202  RPL_HELPHDR = 290,
203  RPL_DATASTR = 290,
204  RPL_CHANINFO_BANNED = 291,
205  RPL_HELPOP = 291,
206  RPL_ENDOFCHECK = 291,
207  RPL_CHANINFO_BANS = 292,
208  RPL_HELPTLR = 292,
209  RPL_CHANINFO_INVITE = 293,
210  RPL_HELPHLP = 293,
211  RPL_CHANINFO_INVITES = 294,
212  RPL_HELPFWD = 294,
213  RPL_CHANINFO_KICK = 295,
214  RPL_HELPIGN = 295,
215  RPL_CHANINFO_KICKS = 296,
216  RPL_END_CHANINFO = 299,
217  RPL_NONE = 300,
218  RPL_AWAY = 301,
219  RPL_USERHOST = 302,
220  RPL_ISON = 303,
221  RPL_TEXT = 304,
222  RPL_UNAWAY = 305,
223  RPL_NOWAWAY = 306,
224  RPL_WHOISREGNICK = 307,
225  RPL_SUSERHOST = 307,
226  RPL_NOTIFYACTION = 308,
227  RPL_WHOISADMIN = 308,
228  RPL_NICKTRACE = 309,
229  RPL_WHOISSADMIN = 309,
230  RPL_WHOISHELPER = 309,
231  RPL_WHOISSVCMSG = 310,
232  RPL_WHOISHELPOP = 310,
233  RPL_WHOISSERVICE = 310,
234  RPL_WHOISUSER = 311,
235  RPL_WHOISSERVER = 312,
236  RPL_WHOISOPERATOR = 313,
237  RPL_WHOWASUSER = 314,
238  RPL_ENDOFWHO = 315,
239  RPL_WHOISCHANOP = 316,
240  RPL_WHOISIDLE = 317,
241  RPL_ENDOFWHOIS = 318,
242  RPL_WHOISCHANNELS = 319,
243  RPL_WHOISVIRT = 320,
244  RPL_WHOIS_HIDDEN = 320,
245  RPL_WHOISSPECIAL = 320,
246  RPL_LISTSTART = 321,
247  RPL_LIST = 322,
248  RPL_LISTEND = 323,
249  RPL_CHANNELMODEIS = 324,
250  RPL_UNIQOPIS = 325,
251  RPL_CHANNELPASSIS = 325,
252  RPL_NOCHANPASS = 326,
253  RPL_CHPASSUNKNOWN = 327,
254  RPL_CHANNEL_URL = 328,
255  RPL_CREATIONTIME = 329,
256  RPL_WHOWAS_TIME = 330,
257  RPL_WHOISACCOUNT = 330,
258  RPL_NOTOPIC = 331,
259  RPL_TOPIC = 332,
260  RPL_TOPICWHOTIME = 333,
261  RPL_LISTUSAGE = 334,
262  RPL_COMMANDSYNTAX = 334,
263  RPL_LISTSYNTAX = 334,
264  RPL_CHANPASSOK = 338,
265  RPL_WHOISACTUALLY = 338,
266  RPL_BADCHANPASS = 339,
267  RPL_INVITING = 341,
268  RPL_SUMMONING = 342,
269  RPL_INVITED = 345,
270  RPL_INVITELIST = 346,
271  RPL_ENDOFINVITELIST = 347,
272  RPL_EXCEPTLIST = 348,
273  RPL_ENDOFEXCEPTLIST = 349,
274  RPL_VERSION = 351,
275  RPL_WHOREPLY = 352,
276  RPL_NAMREPLY = 353,
277  RPL_WHOSPCRPL = 354,
278  RPL_NAMREPLY_ = 355,
279  RPL_KILLDONE = 361,
280  RPL_CLOSING = 362,
281  RPL_CLOSEEND = 363,
282  RPL_LINKS = 364,
283  RPL_ENDOFLINKS = 365,
284  RPL_ENDOFNAMES = 366,
285  RPL_BANLIST = 367,
286  RPL_ENDOFBANLIST = 368,
287  RPL_ENDOFWHOWAS = 369,
288  RPL_INFO = 371,
289  RPL_MOTD = 372,
290  RPL_INFOSTART = 373,
291  RPL_ENDOFINFO = 374,
292  RPL_MOTDSTART = 375,
293  RPL_ENDOFMOTD = 376,
294  RPL_KICKEXPIRED = 377,
295  RPL_SPAM = 377,
296  RPL_BANEXPIRED = 378,
297  RPL_WHOISHOST = 378,
298  RPL_KICKLINKED = 379,
299  RPL_WHOISMODES = 379,
300  RPL_BANLINKED = 380,
301  RPL_YOURHELPER = 380,
302  RPL_YOUREOPER = 381,
303  RPL_REHASHING = 382,
304  RPL_YOURESERVICE = 383,
305  RPL_MYPORTIS = 384,
306  RPL_NOTOPERANYMORE = 385,
307  RPL_QLIST = 386,
308  RPL_IRCOPS = 386,
309  RPL_ENDOFQLIST = 387,
310  RPL_ENDOFIRCOPS = 387,
311  RPL_ALIST = 388,
312  RPL_ENDOFALIST = 389,
313  RPL_TIME = 391,
314  RPL_USERSSTART = 392,
315  RPL_USERS = 393,
316  RPL_ENDOFUSERS = 394,
317  RPL_NOUSERS = 395,
318  RPL_HOSTHIDDEN = 396,
319  ERR_UNKNOWNERROR = 400,
320  ERR_NOSUCHNICK = 401,
321  ERR_NOSUCHSERVER = 402,
322  ERR_NOSUCHCHANNEL = 403,
323  ERR_CANNOTSENDTOCHAN = 404,
324  ERR_TOOMANYCHANNELS = 405,
325  ERR_WASNOSUCHNICK = 406,
326  ERR_TOOMANYTARGETS = 407,
327  ERR_NOSUCHSERVICE = 408,
328  ERR_NOCOLORSONCHAN = 408,
329  ERR_NOORIGIN = 409,
330  ERR_NORECIPIENT = 411,
331  ERR_NOTEXTTOSEND = 412,
332  ERR_NOTOPLEVEL = 413,
333  ERR_WILDTOPLEVEL = 414,
334  ERR_BADMASK = 415,
335  ERR_TOOMANYMATCHES = 416,
336  ERR_QUERYTOOLONG = 416,
337  ERR_LENGTHTRUNCATED = 419,
338  ERR_UNKNOWNCOMMAND = 421,
339  ERR_NOMOTD = 422,
340  ERR_NOADMININFO = 423,
341  ERR_FILEERROR = 424,
342  ERR_NOOPERMOTD = 425,
343  ERR_TOOMANYAWAY = 429,
344  ERR_EVENTNICKCHANGE = 430,
345  ERR_NONICKNAMEGIVEN = 431,
346  ERR_ERRONEUSNICKNAME = 432,
347  ERR_NICKNAMEINUSE = 433,
348  ERR_SERVICENAMEINUSE = 434,
349  ERR_NORULES = 434,
350  ERR_SERVICECONFUSED = 435,
351  ERR_BANONCHAN = 435,
352  ERR_NICKCOLLISION = 436,
353  ERR_UNAVAILRESOURCE = 437,
354  ERR_BANNICKCHANGE = 437,
355  ERR_NICKTOOFAST = 438,
356  ERR_DEAD = 438,
357  ERR_TARGETTOOFAST = 439,
358  ERR_SERVICESDOWN = 440,
359  ERR_USERNOTINCHANNEL = 441,
360  ERR_NOTONCHANNEL = 442,
361  ERR_USERONCHANNEL = 443,
362  ERR_NOLOGIN = 444,
363  ERR_SUMMONDISABLED = 445,
364  ERR_USERSDISABLED = 446,
365  ERR_NONICKCHANGE = 447,
366  ERR_NOTIMPLEMENTED = 449,
367  ERR_NOTREGISTERED = 451,
368  ERR_IDCOLLISION = 452,
369  ERR_NICKLOST = 453,
370  ERR_HOSTILENAME = 455,
371  ERR_ACCEPTFULL = 456,
372  ERR_ACCEPTEXIST = 457,
373  ERR_ACCEPTNOT = 458,
374  ERR_NOHIDING = 459,
375  ERR_NOTFORHALFOPS = 460,
376  ERR_NEEDMOREPARAMS = 461,
377  ERR_ALREADYREGISTERED = 462,
378  ERR_NOPERMFORHOST = 463,
379  ERR_PASSWDMISMATCH = 464,
380  ERR_YOUREBANNEDCREEP = 465,
381  ERR_YOUWILLBEBANNED = 466,
382  ERR_KEYSET = 467,
383  ERR_INVALIDUSERNAME = 468,
384  ERR_ONLYSERVERSCANCHANGE = 468,
385  ERR_LINKSET = 469,
386  ERR_LINKCHANNEL = 470,
387  ERR_KICKEDFROMCHAN = 470,
388  ERR_CHANNELISFULL = 471,
389  ERR_UNKNOWNMODE = 472,
390  ERR_INVITEONLYCHAN = 473,
391  ERR_BANNEDFROMCHAN = 474,
392  ERR_BADCHANNELKEY = 475,
393  ERR_BADCHANMASK = 476,
394  ERR_NOCHANMODES = 477,
395  ERR_NEEDREGGEDNICK = 477,
396  ERR_BANLISTFULL = 478,
397  ERR_BADCHANNAME = 479,
398  ERR_LINKFAIL = 479,
399  ERR_NOULINE = 480,
400  ERR_CANNOTKNOCK = 480,
401  ERR_NOPRIVILEGES = 481,
402  ERR_CHANOPRIVSNEEDED = 482,
403  ERR_CANTKILLSERVER = 483,
404  ERR_RESTRICTED = 484,
405  ERR_ISCHANSERVICE = 484,
406  ERR_DESYNC = 484,
407  ERR_ATTACKDENY = 484,
408  ERR_UNIQOPRIVSNEEDED = 485,
409  ERR_KILLDENY = 485,
410  ERR_CANTKICKADMIN = 485,
411  ERR_ISREALSERVICE = 485,
412  ERR_NONONREG = 486,
413  ERR_HTMDISABLED = 486,
414  ERR_ACCOUNTONLY = 486,
415  ERR_CHANTOORECENT = 487,
416  ERR_MSGSERVICES = 487,
417  ERR_TSLESSCHAN = 488,
418  ERR_VOICENEEDED = 489,
419  ERR_SECUREONLYCHAN = 489,
420  ERR_NOOPERHOST = 491,
421  ERR_NOSERVICEHOST = 492,
422  ERR_NOFEATURE = 493,
423  ERR_BADFEATURE = 494,
424  ERR_BADLOGTYPE = 495,
425  ERR_BADLOGSYS = 496,
426  ERR_BADLOGVALUE = 497,
427  ERR_ISOPERLCHAN = 498,
428  ERR_CHANOWNPRIVNEEDED = 499,
429  ERR_UMODEUNKNOWNFLAG = 501,
430  ERR_USERSDONTMATCH = 502,
431  ERR_GHOSTEDCLIENT = 503,
432  ERR_VWORLDWARN = 503,
433  ERR_USERNOTONSERV = 504,
434  ERR_SILELISTFULL = 511,
435  ERR_TOOMANYWATCH = 512,
436  ERR_BADPING = 513,
437  ERR_INVALID_ERROR = 514,
438  ERR_TOOMANYDCC = 514,
439  ERR_BADEXPIRE = 515,
440  ERR_DONTCHEAT = 516,
441  ERR_DISABLED = 517,
442  ERR_NOINVITE = 518,
443  ERR_LONGMASK = 518,
444  ERR_ADMONLY = 519,
445  ERR_TOOMANYUSERS = 519,
446  ERR_OPERONLY = 520,
447  ERR_MASKTOOWIDE = 520,
448  ERR_WHOTRUNC = 520,
449  ERR_LISTSYNTAX = 521,
450  ERR_WHOSYNTAX = 522,
451  ERR_WHOLIMEXCEED = 523,
452  ERR_QUARANTINED = 524,
453  ERR_OPERSPVERIFY = 524,
454  ERR_REMOTEPFX = 525,
455  ERR_PFXUNROUTABLE = 526,
456  ERR_BADHOSTMASK = 550,
457  ERR_HOSTUNAVAIL = 551,
458  ERR_USINGSLINE = 552,
459  ERR_STATSSLINE = 553,
460  RPL_LOGON = 600,
461  RPL_LOGOFF = 601,
462  RPL_WATCHOFF = 602,
463  RPL_WATCHSTAT = 603,
464  RPL_NOWON = 604,
465  RPL_NOWOFF = 605,
466  RPL_WATCHLIST = 606,
467  RPL_ENDOFWATCHLIST = 607,
468  RPL_WATCHCLEAR = 608,
469  RPL_ISOPER = 610,
470  RPL_ISLOCOP = 611,
471  RPL_ISNOTOPER = 612,
472  RPL_ENDOFISOPER = 613,
473  RPL_DCCSTATUS = 617,
474  RPL_DCCLIST = 618,
475  RPL_ENDOFDCCLIST = 619,
476  RPL_WHOWASHOST = 619,
477  RPL_DCCINFO = 620,
478  RPL_ENDOFO = 626,
479  RPL_SETTINGS = 630,
480  RPL_ENDOFSETTINGS = 631,
481  RPL_DUMPING = 640,
482  RPL_DUMPRPL = 641,
483  RPL_EODUMP = 642,
484  RPL_TRACEROUTE_HOP = 660,
485  RPL_TRACEROUTE_START = 661,
486  RPL_MODECHANGEWARN = 662,
487  RPL_CHANREDIR = 663,
488  RPL_SERVMODEIS = 664,
489  RPL_OTHERUMODEIS = 665,
490  RPL_ENDOF_GENERIC = 666,
491  RPL_WHOWASDETAILS = 670,
492  RPL_WHOISSECURE = 671,
493  RPL_UNKNOWNMODES = 672,
494  RPL_CANNOTSETMODES = 673,
495  RPL_LUSERSTAFF = 678,
496  RPL_TIMEONSERVERIS = 679,
497  RPL_NETWORKS = 682,
498  RPL_YOURLANGUAGEIS = 687,
499  RPL_LANGUAGE = 688,
500  RPL_WHOISSTAFF = 689,
501  RPL_WHOISLANGUAGE = 690,
502  RPL_HELPSTART = 704,
503  RPL_HELPTXT = 705,
504  RPL_ENDOFHELP = 706,
505  RPL_ETRACEFULL = 708,
506  RPL_ETRACE = 709,
507  RPL_KNOCK = 710,
508  RPL_KNOCKDLVR = 711,
509  ERR_TOOMANYKNOCK = 712,
510  ERR_CHANOPEN = 713,
511  ERR_KNOCKONCHAN = 714,
512  ERR_KNOCKDISABLED = 715,
513  RPL_TARGUMODEG = 716,
514  RPL_TARGNOTIFY = 717,
515  RPL_UMODEGMSG = 718,
516  RPL_ENDOFOMOTD = 722,
517  ERR_NOPRIVS = 723,
518  RPL_TESTMARK = 724,
519  RPL_TESTLINE = 725,
520  RPL_NOTESTLINE = 726,
521  RPL_MONONLINE = 730,
522  RPL_MONOFFLINE = 731,
523  RPL_MONLIST = 732,
524  RPL_ENDOFMONLIST = 733,
525  ERR_MONLISTFULL = 734,
526  RPL_XINFO = 771,
527  RPL_XINFOSTART = 773,
528  RPL_XINFOEND = 774,
529  ERR_CANNOTDOCOMMAND = 972,
530  ERR_CANNOTCHANGEUMODE = 973,
531  ERR_CANNOTCHANGECHANMODE = 974,
532  ERR_CANNOTCHANGESERVERMODE = 975,
533  ERR_CANNOTSENDTONICK = 976,
534  ERR_UNKNOWNSERVERMODE = 977,
535  ERR_SERVERMODELOCK = 979,
536  ERR_BADCHARENCODING = 980,
537  ERR_TOOMANYLANGUAGES = 981,
538  ERR_NOLANGUAGE = 982,
539  ERR_TEXTTOOSHORT = 983,
540  ERR_NUMERIC_ERR = 999
541  };
542 };
543 
544 #ifndef QT_NO_DEBUG_STREAM
545 IRC_CORE_EXPORT QDebug operator<<(QDebug debug, Irc::Code code);
546 IRC_CORE_EXPORT QDebug operator<<(QDebug debug, Irc::DataRole role);
547 IRC_CORE_EXPORT QDebug operator<<(QDebug debug, Irc::Color color);
548 IRC_CORE_EXPORT QDebug operator<<(QDebug debug, Irc::SortMethod method);
549 #endif // QT_NO_DEBUG_STREAM
550 
551 IRC_END_NAMESPACE
552 
553 Q_DECLARE_METATYPE(IRC_PREPEND_NAMESPACE(Irc*))
554 Q_DECLARE_METATYPE(IRC_PREPEND_NAMESPACE(Irc::Code))
555 Q_DECLARE_METATYPE(IRC_PREPEND_NAMESPACE(Irc::DataRole))
556 Q_DECLARE_METATYPE(IRC_PREPEND_NAMESPACE(Irc::Color))
557 Q_DECLARE_METATYPE(IRC_PREPEND_NAMESPACE(Irc::SortMethod))
558 
559 #endif // IRC_H
Code
Definition: irc.h:95
Buffer/user name (QString)
Definition: irc.h:82
User mode (QString)
Definition: irc.h:84
Sort by name (Irc::NameRole)
Definition: irc.h:90
Channel/user prefix (QString)
Definition: irc.h:83
SortMethod
Definition: irc.h:88
DataRole
Definition: irc.h:78
Sort by hand by calling sort()
Definition: irc.h:89
IRC_CORE_EXPORT void registerMetaTypes()
Definition: irccore.cpp:51
Buffer object (IrcBuffer*)
Definition: irc.h:80
Color
Definition: irc.h:59
Sort by title (Irc::TitleRole)
Definition: irc.h:91
Channel object (IrcChannel*)
Definition: irc.h:81
Miscellaneous identifiers used throughout the library.
Definition: irc.h:39