gloox  1.0.1
gloox.h
1 /*
2  Copyright (c) 2005-2012 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 
346 #ifndef GLOOX_H__
347 #define GLOOX_H__
348 
349 #include "macros.h"
350 
351 #include <string>
352 #include <list>
353 #include <map>
354 
361 namespace gloox
362 {
364  GLOOX_API extern const std::string XMLNS_CLIENT;
365 
367  GLOOX_API extern const std::string XMLNS_COMPONENT_ACCEPT;
368 
370  GLOOX_API extern const std::string XMLNS_COMPONENT_CONNECT;
371 
373  GLOOX_API extern const std::string XMLNS_DISCO_INFO;
374 
376  GLOOX_API extern const std::string XMLNS_DISCO_ITEMS;
377 
379  GLOOX_API extern const std::string XMLNS_DISCO_PUBLISH;
380 
382  GLOOX_API extern const std::string XMLNS_ADHOC_COMMANDS;
383 
385  GLOOX_API extern const std::string XMLNS_COMPRESSION;
386 
388  GLOOX_API extern const std::string XMLNS_OFFLINE;
389 
391  GLOOX_API extern const std::string XMLNS_CHAT_STATES;
392 
394  GLOOX_API extern const std::string XMLNS_AMP;
395 
397  GLOOX_API extern const std::string XMLNS_IBB;
398 
400  GLOOX_API extern const std::string XMLNS_FEATURE_NEG;
401 
403  GLOOX_API extern const std::string XMLNS_CHATNEG;
404 
406  GLOOX_API extern const std::string XMLNS_XHTML_IM;
407 
409  GLOOX_API extern const std::string XMLNS_DELAY;
410 
412  GLOOX_API extern const std::string XMLNS_ROSTER;
413 
415  GLOOX_API extern const std::string XMLNS_VERSION;
416 
418  GLOOX_API extern const std::string XMLNS_REGISTER;
419 
421  GLOOX_API extern const std::string XMLNS_PRIVACY;
422 
424  GLOOX_API extern const std::string XMLNS_AUTH;
425 
427  GLOOX_API extern const std::string XMLNS_PRIVATE_XML;
428 
430  GLOOX_API extern const std::string XMLNS_LAST;
431 
433  GLOOX_API extern const std::string XMLNS_SEARCH;
434 
436  GLOOX_API extern const std::string XMLNS_IQ_OOB;
437 
439  GLOOX_API extern const std::string XMLNS_X_DATA;
440 
442  GLOOX_API extern const std::string XMLNS_X_EVENT;
443 
445  GLOOX_API extern const std::string XMLNS_X_OOB;
446 
448  GLOOX_API extern const std::string XMLNS_X_DELAY;
449 
451  GLOOX_API extern const std::string XMLNS_X_GPGSIGNED;
452 
454  GLOOX_API extern const std::string XMLNS_X_GPGENCRYPTED;
455 
457  GLOOX_API extern const std::string XMLNS_VCARD_TEMP;
458 
460  GLOOX_API extern const std::string XMLNS_X_VCARD_UPDATE;
461 
463  GLOOX_API extern const std::string XMLNS_BOOKMARKS;
464 
466  GLOOX_API extern const std::string XMLNS_ANNOTATIONS;
467 
469  GLOOX_API extern const std::string XMLNS_ROSTER_DELIMITER;
470 
472  GLOOX_API extern const std::string XMLNS_XMPP_PING;
473 
475  GLOOX_API extern const std::string XMLNS_SI;
476 
478  GLOOX_API extern const std::string XMLNS_SI_FT;
479 
481  GLOOX_API extern const std::string XMLNS_BYTESTREAMS;
482 
484  GLOOX_API extern const std::string XMLNS_MUC;
485 
487  GLOOX_API extern const std::string XMLNS_MUC_USER;
488 
490  GLOOX_API extern const std::string XMLNS_MUC_ADMIN;
491 
493  GLOOX_API extern const std::string XMLNS_MUC_UNIQUE;
494 
496  GLOOX_API extern const std::string XMLNS_MUC_OWNER;
497 
499  GLOOX_API extern const std::string XMLNS_MUC_ROOMINFO;
500 
502  GLOOX_API extern const std::string XMLNS_MUC_ROOMS;
503 
505  GLOOX_API extern const std::string XMLNS_MUC_REQUEST;
506 
508  GLOOX_API extern const std::string XMLNS_PUBSUB;
509 
511  GLOOX_API extern const std::string XMLNS_PUBSUB_ERRORS;
512 
514  GLOOX_API extern const std::string XMLNS_PUBSUB_EVENT;
515 
517  GLOOX_API extern const std::string XMLNS_PUBSUB_OWNER;
518 
520  GLOOX_API extern const std::string XMLNS_CAPS;
521 
523  GLOOX_API extern const std::string XMLNS_FT_FASTMODE;
524 
526  GLOOX_API extern const std::string XMLNS_STREAM;
527 
529  GLOOX_API extern const std::string XMLNS_XMPP_STREAM;
530 
532  GLOOX_API extern const std::string XMLNS_XMPP_STANZAS;
533 
535  GLOOX_API extern const std::string XMLNS_STREAM_TLS;
536 
538  GLOOX_API extern const std::string XMLNS_STREAM_SASL;
539 
541  GLOOX_API extern const std::string XMLNS_STREAM_BIND;
542 
544  GLOOX_API extern const std::string XMLNS_STREAM_SESSION;
545 
547  GLOOX_API extern const std::string XMLNS_STREAM_IQAUTH;
548 
550  GLOOX_API extern const std::string XMLNS_STREAM_IQREGISTER;
551 
553  GLOOX_API extern const std::string XMLNS_STREAM_COMPRESS;
554 
556  GLOOX_API extern const std::string XMLNS_HTTPBIND;
557 
559  GLOOX_API extern const std::string XMLNS_XMPP_BOSH;
560 
562  GLOOX_API extern const std::string XMLNS_RECEIPTS;
563 
565  GLOOX_API extern const std::string XMLNS_NICKNAME;
566 
568  GLOOX_API extern const std::string XMLNS_JINGLE;
569 
571  GLOOX_API extern const std::string XMLNS_JINGLE_AUDIO_RTP;
572 
574  GLOOX_API extern const std::string XMLNS_JINGLE_ICE_UDP;
575 
577  GLOOX_API extern const std::string XMLNS_JINGLE_RAW_UDP;
578 
580  GLOOX_API extern const std::string XMLNS_JINGLE_VIDEO_RTP;
581 
583  GLOOX_API extern const std::string XMLNS_SHIM;
584 
586  GLOOX_API extern const std::string XMLNS_ATTENTION;
587 
588 
590  GLOOX_API extern const std::string XMPP_STREAM_VERSION_MAJOR;
591 
593  GLOOX_API extern const std::string XMPP_STREAM_VERSION_MINOR;
594 
596  GLOOX_API extern const std::string GLOOX_VERSION;
597 
599  GLOOX_API extern const std::string GLOOX_CAPS_NODE;
600 
602  GLOOX_API extern const std::string XMLNS;
603 
605  GLOOX_API extern const std::string TYPE;
606 
608  GLOOX_API extern const std::string EmptyString;
609 
614  {
619  };
620 
626  {
637  };
638 
643  {
675  };
676 
681  {
687  };
688 
693  {
706  // SASLMechanism below must be adjusted accordingly.
707  };
708 
712  // must be adjusted with changes to StreamFeature enum above
714  {
721  SaslMechGssapi = 4096,
722  SaslMechNTLM = 8192,
723  SaslMechAll = 65535
724  };
725 
730  {
806  };
807 
812  {
820  };
821 
827  {
828 
908  };
909 
913 // enum Presence
914 // {
915 // PresenceUnknown, /**< Unknown status. */
916 // PresenceAvailable, /**< The entity or resource is online and available. */
917 // PresenceChat, /**< The entity or resource is actively interested in chatting. */
918 // PresenceAway, /**< The entity or resource is temporarily away. */
919 // PresenceDnd, /**< The entity or resource is busy (dnd = "Do Not Disturb"). */
920 // PresenceXa, /**< The entity or resource is away for an extended period (xa =
921 // * "eXtended Away"). */
922 // PresenceUnavailable /**< The entity or resource is offline. */
923 // };
924 
929  {
930  CertOk = 0,
939  };
940 
944  struct CertInfo
945  {
946  int status;
947  bool chain;
948  std::string issuer;
949  std::string server;
950  int date_from;
952  int date_to;
954  std::string protocol;
955  std::string cipher;
956  std::string mac;
957  std::string compression;
958  };
959 
964  {
1000  };
1001 
1005  enum LogArea
1006  {
1007  LogAreaClassParser = 0x000001,
1009  LogAreaClassClient = 0x000004,
1012  LogAreaClassDns = 0x000020,
1022  LogAreaAllClasses = 0x01FFFF,
1023  LogAreaXmlIncoming = 0x020000,
1024  LogAreaXmlOutgoing = 0x040000,
1025  LogAreaUser = 0x800000,
1026  LogAreaAll = 0xFFFFFF
1027  };
1028 
1033  {
1037  };
1038 
1043  {
1052  };
1053 
1058  {
1066  };
1067 
1072  {
1077  };
1078 
1083  {
1089  };
1090 
1095  {
1098  };
1099 
1104  {
1111  };
1112 
1117  {
1123  };
1124 
1129  {
1133  FlagHidden = 1<< 4,
1135  FlagModerated = 1<< 6,
1137  FlagOpen = 1<< 8,
1138  FlagPersistent = 1<< 9,
1139  FlagPublic = 1<<10,
1141  FlagTemporary = 1<<12,
1143  FlagUnsecured = 1<<14,
1145  // keep in sync with MUCUserFlag below
1146  };
1147 
1151  // keep in sync with MUCRoomFlag above
1153  {
1154  UserSelf = 1<<16,
1156  UserKicked = 1<<18,
1157  UserBanned = 1<<19,
1163  UserNewRoom = 1<<23,
1171  };
1172 
1177  {
1199  };
1200 
1204  typedef std::list<std::string> StringList;
1205 
1209  typedef std::list<std::string*> StringPList;
1210 
1214  typedef std::map<std::string, std::string> StringMap;
1215 
1219  typedef std::multimap<std::string, std::string> StringMultiMap;
1220 
1225  typedef std::list<const StanzaExtension*> StanzaExtensionList;
1226 }
1227 
1228 extern "C"
1229 {
1230  GLOOX_API const char* gloox_version();
1231 }
1232 
1233 #endif // GLOOX_H__