gloox  1.0.16
gloox.h
1 /*
2  Copyright (c) 2005-2015 by Jakob Schröter <js@camaya.net>
3  This file is part of the gloox library. http://camaya.net/gloox
4 
5  This software is distributed under a license. The full license
6  agreement can be found in the file LICENSE in this distribution.
7  This software may not be copied, modified, sold or distributed
8  other than expressed in the named license agreement.
9 
10  This software is distributed without any warranty.
11 */
12 
352 #ifndef GLOOX_H__
353 #define GLOOX_H__
354 
355 #include "macros.h"
356 
357 #include <string>
358 #include <list>
359 #include <map>
360 
367 namespace gloox
368 {
370  GLOOX_API extern const std::string XMLNS_CLIENT;
371 
373  GLOOX_API extern const std::string XMLNS_COMPONENT_ACCEPT;
374 
376  GLOOX_API extern const std::string XMLNS_COMPONENT_CONNECT;
377 
379  GLOOX_API extern const std::string XMLNS_DISCO_INFO;
380 
382  GLOOX_API extern const std::string XMLNS_DISCO_ITEMS;
383 
385  GLOOX_API extern const std::string XMLNS_DISCO_PUBLISH;
386 
388  GLOOX_API extern const std::string XMLNS_ADHOC_COMMANDS;
389 
391  GLOOX_API extern const std::string XMLNS_COMPRESSION;
392 
394  GLOOX_API extern const std::string XMLNS_OFFLINE;
395 
397  GLOOX_API extern const std::string XMLNS_CHAT_STATES;
398 
400  GLOOX_API extern const std::string XMLNS_AMP;
401 
403  GLOOX_API extern const std::string XMLNS_IBB;
404 
406  GLOOX_API extern const std::string XMLNS_FEATURE_NEG;
407 
409  GLOOX_API extern const std::string XMLNS_CHATNEG;
410 
412  GLOOX_API extern const std::string XMLNS_XHTML_IM;
413 
415  GLOOX_API extern const std::string XMLNS_DELAY;
416 
418  GLOOX_API extern const std::string XMLNS_ROSTER;
419 
421  GLOOX_API extern const std::string XMLNS_VERSION;
422 
424  GLOOX_API extern const std::string XMLNS_REGISTER;
425 
427  GLOOX_API extern const std::string XMLNS_PRIVACY;
428 
430  GLOOX_API extern const std::string XMLNS_AUTH;
431 
433  GLOOX_API extern const std::string XMLNS_PRIVATE_XML;
434 
436  GLOOX_API extern const std::string XMLNS_LAST;
437 
439  GLOOX_API extern const std::string XMLNS_SEARCH;
440 
442  GLOOX_API extern const std::string XMLNS_IQ_OOB;
443 
445  GLOOX_API extern const std::string XMLNS_X_DATA;
446 
448  GLOOX_API extern const std::string XMLNS_X_EVENT;
449 
451  GLOOX_API extern const std::string XMLNS_X_OOB;
452 
454  GLOOX_API extern const std::string XMLNS_X_DELAY;
455 
457  GLOOX_API extern const std::string XMLNS_X_GPGSIGNED;
458 
460  GLOOX_API extern const std::string XMLNS_X_GPGENCRYPTED;
461 
463  GLOOX_API extern const std::string XMLNS_VCARD_TEMP;
464 
466  GLOOX_API extern const std::string XMLNS_X_VCARD_UPDATE;
467 
469  GLOOX_API extern const std::string XMLNS_BOOKMARKS;
470 
472  GLOOX_API extern const std::string XMLNS_ANNOTATIONS;
473 
475  GLOOX_API extern const std::string XMLNS_ROSTER_DELIMITER;
476 
478  GLOOX_API extern const std::string XMLNS_XMPP_PING;
479 
481  GLOOX_API extern const std::string XMLNS_SI;
482 
484  GLOOX_API extern const std::string XMLNS_SI_FT;
485 
487  GLOOX_API extern const std::string XMLNS_BYTESTREAMS;
488 
490  GLOOX_API extern const std::string XMLNS_MUC;
491 
493  GLOOX_API extern const std::string XMLNS_MUC_USER;
494 
496  GLOOX_API extern const std::string XMLNS_MUC_ADMIN;
497 
499  GLOOX_API extern const std::string XMLNS_MUC_UNIQUE;
500 
502  GLOOX_API extern const std::string XMLNS_MUC_OWNER;
503 
505  GLOOX_API extern const std::string XMLNS_MUC_ROOMINFO;
506 
508  GLOOX_API extern const std::string XMLNS_MUC_ROOMS;
509 
511  GLOOX_API extern const std::string XMLNS_MUC_REQUEST;
512 
514  GLOOX_API extern const std::string XMLNS_PUBSUB;
515 
517  GLOOX_API extern const std::string XMLNS_PUBSUB_ERRORS;
518 
520  GLOOX_API extern const std::string XMLNS_PUBSUB_EVENT;
521 
523  GLOOX_API extern const std::string XMLNS_PUBSUB_OWNER;
524 
526  GLOOX_API extern const std::string XMLNS_CAPS;
527 
529  GLOOX_API extern const std::string XMLNS_FT_FASTMODE;
530 
532  GLOOX_API extern const std::string XMLNS_STREAM;
533 
535  GLOOX_API extern const std::string XMLNS_XMPP_STREAM;
536 
538  GLOOX_API extern const std::string XMLNS_XMPP_STANZAS;
539 
541  GLOOX_API extern const std::string XMLNS_STREAM_TLS;
542 
544  GLOOX_API extern const std::string XMLNS_STREAM_SASL;
545 
547  GLOOX_API extern const std::string XMLNS_STREAM_BIND;
548 
550  GLOOX_API extern const std::string XMLNS_STREAM_SESSION;
551 
553  GLOOX_API extern const std::string XMLNS_STREAM_IQAUTH;
554 
556  GLOOX_API extern const std::string XMLNS_STREAM_IQREGISTER;
557 
559  GLOOX_API extern const std::string XMLNS_STREAM_COMPRESS;
560 
562  GLOOX_API extern const std::string XMLNS_HTTPBIND;
563 
565  GLOOX_API extern const std::string XMLNS_XMPP_BOSH;
566 
568  GLOOX_API extern const std::string XMLNS_RECEIPTS;
569 
571  GLOOX_API extern const std::string XMLNS_NICKNAME;
572 
574  GLOOX_API extern const std::string XMLNS_JABBER_RPC;
575 
577  GLOOX_API extern const std::string XMLNS_JINGLE;
578 
580  GLOOX_API extern const std::string XMLNS_JINGLE_ERRORS;
581 
583  GLOOX_API extern const std::string XMLNS_JINGLE_ICE_UDP;
584 
586  GLOOX_API extern const std::string XMLNS_JINGLE_FILE_TRANSFER;
587 
589  GLOOX_API extern const std::string XMLNS_JINGLE_FILE_TRANSFER_MULTI;
590 
592  GLOOX_API extern const std::string XMLNS_SHIM;
593 
595  GLOOX_API extern const std::string XMLNS_ATTENTION;
596 
598  GLOOX_API extern const std::string XMLNS_STREAM_MANAGEMENT;
599 
601  GLOOX_API extern const std::string XMLNS_STANZA_FORWARDING;
602 
604  GLOOX_API extern const std::string XMLNS_MESSAGE_CARBONS;
605 
607  GLOOX_API extern const std::string XMLNS_HASHES;
608 
610  GLOOX_API extern const std::string XMLNS_IODATA;
611 
613  GLOOX_API extern const std::string XMPP_STREAM_VERSION_MAJOR;
614 
616  GLOOX_API extern const std::string XMPP_STREAM_VERSION_MINOR;
617 
619  GLOOX_API extern const std::string GLOOX_VERSION;
620 
622  GLOOX_API extern const std::string GLOOX_CAPS_NODE;
623 
625  GLOOX_API extern const std::string XMLNS;
626 
628  GLOOX_API extern const std::string TYPE;
629 
631  GLOOX_API extern const std::string EmptyString;
632 
637  {
642  };
643 
649  {
674  };
675 
680  {
712  };
713 
718  {
724  };
725 
730  {
744  // SaslMechanism below must be adjusted accordingly.
745  };
746 
750  // must be adjusted with changes to StreamFeature enum above
752  {
757  SaslMechPlain = 8192,
761  SaslMechGssapi = 65536,
762  SaslMechNTLM = 131072,
763  SaslMechAll = 262143
764  };
765 
770  {
846  };
847 
852  {
860  };
861 
867  {
868 
948  };
949 
953 // enum Presence
954 // {
955 // PresenceUnknown, /**< Unknown status. */
956 // PresenceAvailable, /**< The entity or resource is online and available. */
957 // PresenceChat, /**< The entity or resource is actively interested in chatting. */
958 // PresenceAway, /**< The entity or resource is temporarily away. */
959 // PresenceDnd, /**< The entity or resource is busy (dnd = "Do Not Disturb"). */
960 // PresenceXa, /**< The entity or resource is away for an extended period (xa =
961 // * "eXtended Away"). */
962 // PresenceUnavailable /**< The entity or resource is offline. */
963 // };
964 
969  {
970  CertOk = 0,
979  };
980 
984  struct CertInfo
985  {
986  int status;
987  bool chain;
988  std::string issuer;
989  std::string server;
990  int date_from;
992  int date_to;
994  std::string protocol;
995  std::string cipher;
996  std::string mac;
997  std::string compression;
998  };
999 
1004  {
1040  };
1041 
1045  enum LogArea
1046  {
1047  LogAreaClassParser = 0x000001,
1049  LogAreaClassClient = 0x000004,
1052  LogAreaClassDns = 0x000020,
1062  LogAreaAllClasses = 0x01FFFF,
1063  LogAreaXmlIncoming = 0x020000,
1064  LogAreaXmlOutgoing = 0x040000,
1065  LogAreaUser = 0x800000,
1066  LogAreaAll = 0xFFFFFF
1067  };
1068 
1073  {
1077  };
1078 
1083  {
1092  };
1093 
1098  {
1106  };
1107 
1112  {
1117  };
1118 
1123  {
1129  };
1130 
1135  {
1138  };
1139 
1144  {
1151  };
1152 
1157  {
1163  };
1164 
1169  {
1173  FlagHidden = 1<< 4,
1175  FlagModerated = 1<< 6,
1177  FlagOpen = 1<< 8,
1178  FlagPersistent = 1<< 9,
1179  FlagPublic = 1<<10,
1181  FlagTemporary = 1<<12,
1183  FlagUnsecured = 1<<14,
1185  // keep in sync with MUCUserFlag below
1186  };
1187 
1191  // keep in sync with MUCRoomFlag above
1193  {
1194  UserSelf = 1<<16,
1196  UserKicked = 1<<18,
1197  UserBanned = 1<<19,
1203  UserNewRoom = 1<<23,
1211  };
1212 
1217  {
1239  };
1240 
1244  typedef std::list<std::string> StringList;
1245 
1249  typedef std::list<std::string*> StringPList;
1250 
1254  typedef std::map<std::string, std::string> StringMap;
1255 
1259  typedef std::multimap<std::string, std::string> StringMultiMap;
1260 
1265  typedef std::list<const StanzaExtension*> StanzaExtensionList;
1266 }
1267 
1268 extern "C"
1269 {
1270  GLOOX_API const char* gloox_version();
1271 }
1272 
1273 #endif // GLOOX_H__
const std::string XMLNS_MUC_REQUEST
Definition: gloox.cpp:75
const std::string XMLNS_COMPRESSION
Definition: gloox.cpp:27
MUCRoomFlag
Definition: gloox.h:1168
std::list< const StanzaExtension * > StanzaExtensionList
Definition: gloox.h:1261
const std::string XMLNS_HASHES
Definition: gloox.cpp:113
const std::string XMLNS_RECEIPTS
Definition: gloox.cpp:98
const std::string XMLNS_STREAM_TLS
Definition: gloox.cpp:87
const std::string XMLNS_STREAM_MANAGEMENT
Definition: gloox.cpp:109
const std::string XMLNS_STREAM_IQAUTH
Definition: gloox.cpp:92
const std::string XMLNS_AUTH
Definition: gloox.cpp:43
const std::string XMLNS
Definition: gloox.cpp:121
const std::string XMLNS_SI_FT
Definition: gloox.cpp:65
std::list< std::string > StringList
Definition: gloox.h:1244
const std::string XMLNS_STREAM_SASL
Definition: gloox.cpp:89
const std::string XMLNS_XMPP_PING
Definition: gloox.cpp:62
std::multimap< std::string, std::string > StringMultiMap
Definition: gloox.h:1259
MessageSessionFilter
Definition: gloox.h:1134
const std::string XMLNS_XMPP_STANZAS
Definition: gloox.cpp:86
bool chain
Definition: gloox.h:987
const std::string XMLNS_PUBSUB_ERRORS
Definition: gloox.cpp:78
const std::string XMLNS_ROSTER
Definition: gloox.cpp:38
const std::string XMLNS_JINGLE_ICE_UDP
Definition: gloox.cpp:103
LogArea
Definition: gloox.h:1045
const std::string XMPP_STREAM_VERSION_MAJOR
Definition: gloox.cpp:116
const std::string GLOOX_CAPS_NODE
Definition: gloox.cpp:119
const std::string XMLNS_FT_FASTMODE
Definition: gloox.cpp:83
SubscriptionType
Definition: gloox.h:1216
const std::string XMLNS_CAPS
Definition: gloox.cpp:81
SaslMechanism
Definition: gloox.h:751
std::string cipher
Definition: gloox.h:995
const std::string XMLNS_CLIENT
Definition: gloox.cpp:19
const std::string XMLNS_XMPP_BOSH
Definition: gloox.cpp:97
const std::string XMLNS_IQ_OOB
Definition: gloox.cpp:48
LogLevel
Definition: gloox.h:1072
const std::string XMLNS_LAST
Definition: gloox.cpp:45
ConnectionError
Definition: gloox.h:679
ResourceBindError
Definition: gloox.h:1111
const std::string TYPE
Definition: gloox.cpp:122
const std::string XMLNS_IBB
Definition: gloox.cpp:32
const std::string XMLNS_PUBSUB_OWNER
Definition: gloox.cpp:80
const std::string XMLNS_ATTENTION
Definition: gloox.cpp:108
const std::string XMLNS_PUBSUB_EVENT
Definition: gloox.cpp:79
const std::string XMLNS_NICKNAME
Definition: gloox.cpp:99
const std::string XMLNS_SEARCH
Definition: gloox.cpp:47
const std::string XMLNS_DISCO_PUBLISH
Definition: gloox.cpp:25
std::string issuer
Definition: gloox.h:988
std::string server
Definition: gloox.h:989
const std::string XMLNS_X_GPGENCRYPTED
Definition: gloox.cpp:55
const std::string XMLNS_DISCO_INFO
Definition: gloox.cpp:23
std::string mac
Definition: gloox.h:996
const std::string XMLNS_COMPONENT_ACCEPT
Definition: gloox.cpp:20
const std::string XMPP_STREAM_VERSION_MINOR
Definition: gloox.cpp:117
const std::string XMLNS_AMP
Definition: gloox.cpp:31
const std::string XMLNS_X_DATA
Definition: gloox.cpp:49
const std::string XMLNS_STREAM_SESSION
Definition: gloox.cpp:91
const std::string XMLNS_HTTPBIND
Definition: gloox.cpp:96
const std::string XMLNS_DISCO_ITEMS
Definition: gloox.cpp:24
const std::string XMLNS_MUC_ADMIN
Definition: gloox.cpp:69
StanzaError
Definition: gloox.h:866
const std::string XMLNS_MUC_USER
Definition: gloox.cpp:68
const std::string XMLNS_BOOKMARKS
Definition: gloox.cpp:59
The namespace for the gloox library.
Definition: adhoc.cpp:27
const std::string XMLNS_X_GPGSIGNED
Definition: gloox.cpp:54
This class abstracts a stanza extension, which is usually an element in a specific namespace...
const std::string XMLNS_ADHOC_COMMANDS
Definition: gloox.cpp:26
int date_from
Definition: gloox.h:990
const std::string XMLNS_PRIVATE_XML
Definition: gloox.cpp:44
const std::string XMLNS_IODATA
Definition: gloox.cpp:114
const std::string XMLNS_SI
Definition: gloox.cpp:63
MUCUserFlag
Definition: gloox.h:1192
std::map< std::string, std::string > StringMap
Definition: gloox.h:1254
const std::string XMLNS_STREAM_COMPRESS
Definition: gloox.cpp:95
const std::string XMLNS_XMPP_STREAM
Definition: gloox.cpp:85
const std::string XMLNS_MUC_ROOMINFO
Definition: gloox.cpp:73
StreamEvent
Definition: gloox.h:648
const std::string XMLNS_PUBSUB
Definition: gloox.cpp:77
const std::string XMLNS_STREAM
Definition: gloox.cpp:84
const std::string GLOOX_VERSION
Definition: gloox.cpp:118
std::string protocol
Definition: gloox.h:994
StreamFeature
Definition: gloox.h:729
const std::string XMLNS_COMPONENT_CONNECT
Definition: gloox.cpp:21
const std::string XMLNS_MUC_UNIQUE
Definition: gloox.cpp:71
const std::string XMLNS_JINGLE_FILE_TRANSFER_MULTI
Definition: gloox.cpp:105
std::list< std::string * > StringPList
Definition: gloox.h:1249
const std::string XMLNS_X_DELAY
Definition: gloox.cpp:53
const std::string XMLNS_X_VCARD_UPDATE
Definition: gloox.cpp:57
const std::string XMLNS_JINGLE_FILE_TRANSFER
Definition: gloox.cpp:104
const std::string XMLNS_JINGLE_ERRORS
Definition: gloox.cpp:102
const std::string XMLNS_BYTESTREAMS
Definition: gloox.cpp:66
ConnectionState
Definition: gloox.h:636
const std::string XMLNS_VERSION
Definition: gloox.cpp:39
ChatStateType
Definition: gloox.h:1097
StanzaErrorType
Definition: gloox.h:851
TLSPolicy
Definition: gloox.h:717
const std::string XMLNS_FEATURE_NEG
Definition: gloox.cpp:33
const std::string XMLNS_VCARD_TEMP
Definition: gloox.cpp:56
const std::string XMLNS_XHTML_IM
Definition: gloox.cpp:36
const std::string XMLNS_STANZA_FORWARDING
Definition: gloox.cpp:110
const std::string XMLNS_MUC_ROOMS
Definition: gloox.cpp:74
StreamError
Definition: gloox.h:769
const std::string XMLNS_PRIVACY
Definition: gloox.cpp:42
const std::string XMLNS_CHATNEG
Definition: gloox.cpp:35
const std::string XMLNS_X_EVENT
Definition: gloox.cpp:50
const std::string XMLNS_MUC_OWNER
Definition: gloox.cpp:72
const std::string XMLNS_MESSAGE_CARBONS
Definition: gloox.cpp:111
const std::string XMLNS_ANNOTATIONS
Definition: gloox.cpp:60
MessageEventType
Definition: gloox.h:1082
CertStatus
Definition: gloox.h:968
const std::string XMLNS_REGISTER
Definition: gloox.cpp:41
AuthenticationError
Definition: gloox.h:1003
const std::string XMLNS_ROSTER_DELIMITER
Definition: gloox.cpp:61
const std::string XMLNS_STREAM_IQREGISTER
Definition: gloox.cpp:93
GLOOX_API const std::string XMLNS_JABBER_RPC
const std::string XMLNS_CHAT_STATES
Definition: gloox.cpp:30
SessionCreateError
Definition: gloox.h:1122
const std::string XMLNS_JINGLE
Definition: gloox.cpp:101
const std::string XMLNS_STREAM_BIND
Definition: gloox.cpp:90
const std::string EmptyString
Definition: gloox.cpp:123
const std::string XMLNS_DELAY
Definition: gloox.cpp:37
const std::string XMLNS_X_OOB
Definition: gloox.cpp:51
MUCRoomAffiliation
Definition: gloox.h:1143
const std::string XMLNS_OFFLINE
Definition: gloox.cpp:29
std::string compression
Definition: gloox.h:997
const std::string XMLNS_MUC
Definition: gloox.cpp:67
MUCRoomRole
Definition: gloox.h:1156
const std::string XMLNS_SHIM
Definition: gloox.cpp:107