gloox  1.1-svn
gloox.h
1 /*
2  Copyright (c) 2005-2009 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_ERROR;
572 
574  GLOOX_API extern const std::string XMLNS_JINGLE_RTP;
575 
577  GLOOX_API extern const std::string XMLNS_JINGLE_ICE_UDP;
578 
580  GLOOX_API extern const std::string XMLNS_JINGLE_RAW_UDP;
581 
583  GLOOX_API extern const std::string XMLNS_JINGLE_DTMF;
584 
586  GLOOX_API extern const std::string XMLNS_JINGLE_FILE_TRANSFER;
587 
589  GLOOX_API extern const std::string XMLNS_JINGLE_XML_STREAMS;
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_RAP;
599 
601  GLOOX_API extern const std::string XMLNS_BOB;
602 
604  GLOOX_API extern const std::string XMLNS_X_CONFERENCE;
605 
606 
608  GLOOX_API extern const std::string XMPP_STREAM_VERSION_MAJOR;
609 
611  GLOOX_API extern const std::string XMPP_STREAM_VERSION_MINOR;
612 
614  GLOOX_API extern const std::string GLOOX_VERSION;
615 
617  GLOOX_API extern const std::string GLOOX_CAPS_NODE;
618 
620  GLOOX_API extern const std::string XMLNS;
621 
623  GLOOX_API extern const std::string TYPE;
624 
626  GLOOX_API extern const std::string EmptyString;
627 
632  {
637  };
638 
644  {
655  };
656 
661  {
696  };
697 
702  {
708  };
709 
714  {
727  // SASLMechanism below must be adjusted accordingly.
728  };
729 
733  // must be adjusted with changes to StreamFeature enum above
735  {
742  SaslMechGssapi = 4096,
743  SaslMechNTLM = 8192,
744  SaslMechAll = 65535
745  };
746 
751  {
827  };
828 
833  {
841  };
842 
848  {
849 
929  };
930 
934 // enum Presence
935 // {
936 // PresenceUnknown, /**< Unknown status. */
937 // PresenceAvailable, /**< The entity or resource is online and available. */
938 // PresenceChat, /**< The entity or resource is actively interested in chatting. */
939 // PresenceAway, /**< The entity or resource is temporarily away. */
940 // PresenceDnd, /**< The entity or resource is busy (dnd = "Do Not Disturb"). */
941 // PresenceXa, /**< The entity or resource is away for an extended period (xa =
942 // * "eXtended Away"). */
943 // PresenceUnavailable /**< The entity or resource is offline. */
944 // };
945 
950  {
951  CertOk = 0,
960  };
961 
965  struct CertInfo
966  {
967  int status;
968  bool chain;
969  std::string issuer;
970  std::string server;
971  int date_from;
973  int date_to;
975  std::string protocol;
976  std::string cipher;
977  std::string mac;
978  std::string compression;
979  };
980 
985  {
1021  };
1022 
1026  enum LogArea
1027  {
1028  LogAreaClassParser = 0x000001,
1030  LogAreaClassClient = 0x000004,
1033  LogAreaClassDns = 0x000020,
1042  LogAreaAllClasses = 0x01FFFF,
1043  LogAreaXmlIncoming = 0x020000,
1044  LogAreaXmlOutgoing = 0x040000,
1045  LogAreaUser = 0x800000,
1046  LogAreaAll = 0xFFFFFF
1047  };
1048 
1053  {
1057  };
1058 
1063  {
1072  };
1073 
1078  {
1086  };
1087 
1092  {
1097  };
1098 
1103  {
1109  };
1110 
1115  {
1118  };
1119 
1124  {
1131  };
1132 
1137  {
1143  };
1144 
1149  {
1153  FlagHidden = 1<< 4,
1155  FlagModerated = 1<< 6,
1157  FlagOpen = 1<< 8,
1158  FlagPersistent = 1<< 9,
1159  FlagPublic = 1<<10,
1161  FlagTemporary = 1<<12,
1163  FlagUnsecured = 1<<14,
1165  // keep in sync with MUCUserFlag below
1166  };
1167 
1171  // keep in sync with MUCRoomFlag above
1173  {
1174  UserSelf = 1<<16,
1176  UserKicked = 1<<18,
1177  UserBanned = 1<<19,
1183  UserNewRoom = 1<<23,
1191  };
1192 
1197  {
1219  };
1220 
1224  typedef std::list<std::string> StringList;
1225 
1229  typedef std::list<std::string*> StringPList;
1230 
1234  typedef std::map<std::string, std::string> StringMap;
1235 
1239  typedef std::multimap<std::string, std::string> StringMultiMap;
1240 
1245  typedef std::list<const StanzaExtension*> StanzaExtensionList;
1246 
1247 }
1248 
1249 extern "C"
1250 {
1251  GLOOX_API const char* gloox_version();
1252 }
1253 
1254 #endif // GLOOX_H__