gloox  1.0.13
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__