gloox  1.0.10
gloox.h
1 /*
2  Copyright (c) 2005-2013 by Jakob Schroeter <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 XMPP_STREAM_VERSION_MAJOR;
611 
613  GLOOX_API extern const std::string XMPP_STREAM_VERSION_MINOR;
614 
616  GLOOX_API extern const std::string GLOOX_VERSION;
617 
619  GLOOX_API extern const std::string GLOOX_CAPS_NODE;
620 
622  GLOOX_API extern const std::string XMLNS;
623 
625  GLOOX_API extern const std::string TYPE;
626 
628  GLOOX_API extern const std::string EmptyString;
629 
634  {
639  };
640 
646  {
671  };
672 
677  {
709  };
710 
715  {
721  };
722 
727  {
741  // SaslMechanism below must be adjusted accordingly.
742  };
743 
747  // must be adjusted with changes to StreamFeature enum above
749  {
754  SaslMechPlain = 8192,
758  SaslMechGssapi = 65536,
759  SaslMechNTLM = 131072,
760  SaslMechAll = 262143
761  };
762 
767  {
843  };
844 
849  {
857  };
858 
864  {
865 
945  };
946 
950 // enum Presence
951 // {
952 // PresenceUnknown, /**< Unknown status. */
953 // PresenceAvailable, /**< The entity or resource is online and available. */
954 // PresenceChat, /**< The entity or resource is actively interested in chatting. */
955 // PresenceAway, /**< The entity or resource is temporarily away. */
956 // PresenceDnd, /**< The entity or resource is busy (dnd = "Do Not Disturb"). */
957 // PresenceXa, /**< The entity or resource is away for an extended period (xa =
958 // * "eXtended Away"). */
959 // PresenceUnavailable /**< The entity or resource is offline. */
960 // };
961 
966  {
967  CertOk = 0,
976  };
977 
981  struct CertInfo
982  {
983  int status;
984  bool chain;
985  std::string issuer;
986  std::string server;
987  int date_from;
989  int date_to;
991  std::string protocol;
992  std::string cipher;
993  std::string mac;
994  std::string compression;
995  };
996 
1001  {
1037  };
1038 
1042  enum LogArea
1043  {
1044  LogAreaClassParser = 0x000001,
1046  LogAreaClassClient = 0x000004,
1049  LogAreaClassDns = 0x000020,
1059  LogAreaAllClasses = 0x01FFFF,
1060  LogAreaXmlIncoming = 0x020000,
1061  LogAreaXmlOutgoing = 0x040000,
1062  LogAreaUser = 0x800000,
1063  LogAreaAll = 0xFFFFFF
1064  };
1065 
1070  {
1074  };
1075 
1080  {
1089  };
1090 
1095  {
1103  };
1104 
1109  {
1114  };
1115 
1120  {
1126  };
1127 
1132  {
1135  };
1136 
1141  {
1148  };
1149 
1154  {
1160  };
1161 
1166  {
1170  FlagHidden = 1<< 4,
1172  FlagModerated = 1<< 6,
1174  FlagOpen = 1<< 8,
1175  FlagPersistent = 1<< 9,
1176  FlagPublic = 1<<10,
1178  FlagTemporary = 1<<12,
1180  FlagUnsecured = 1<<14,
1182  // keep in sync with MUCUserFlag below
1183  };
1184 
1188  // keep in sync with MUCRoomFlag above
1190  {
1191  UserSelf = 1<<16,
1193  UserKicked = 1<<18,
1194  UserBanned = 1<<19,
1200  UserNewRoom = 1<<23,
1208  };
1209 
1214  {
1236  };
1237 
1241  typedef std::list<std::string> StringList;
1242 
1246  typedef std::list<std::string*> StringPList;
1247 
1251  typedef std::map<std::string, std::string> StringMap;
1252 
1256  typedef std::multimap<std::string, std::string> StringMultiMap;
1257 
1262  typedef std::list<const StanzaExtension*> StanzaExtensionList;
1263 }
1264 
1265 extern "C"
1266 {
1267  GLOOX_API const char* gloox_version();
1268 }
1269 
1270 #endif // GLOOX_H__