gloox  1.0
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 
345 #ifndef GLOOX_H__
346 #define GLOOX_H__
347 
348 #include "macros.h"
349 
350 #include <string>
351 #include <list>
352 #include <map>
353 
360 namespace gloox
361 {
363  GLOOX_API extern const std::string XMLNS_CLIENT;
364 
366  GLOOX_API extern const std::string XMLNS_COMPONENT_ACCEPT;
367 
369  GLOOX_API extern const std::string XMLNS_COMPONENT_CONNECT;
370 
372  GLOOX_API extern const std::string XMLNS_DISCO_INFO;
373 
375  GLOOX_API extern const std::string XMLNS_DISCO_ITEMS;
376 
378  GLOOX_API extern const std::string XMLNS_DISCO_PUBLISH;
379 
381  GLOOX_API extern const std::string XMLNS_ADHOC_COMMANDS;
382 
384  GLOOX_API extern const std::string XMLNS_COMPRESSION;
385 
387  GLOOX_API extern const std::string XMLNS_OFFLINE;
388 
390  GLOOX_API extern const std::string XMLNS_CHAT_STATES;
391 
393  GLOOX_API extern const std::string XMLNS_AMP;
394 
396  GLOOX_API extern const std::string XMLNS_IBB;
397 
399  GLOOX_API extern const std::string XMLNS_FEATURE_NEG;
400 
402  GLOOX_API extern const std::string XMLNS_CHATNEG;
403 
405  GLOOX_API extern const std::string XMLNS_XHTML_IM;
406 
408  GLOOX_API extern const std::string XMLNS_DELAY;
409 
411  GLOOX_API extern const std::string XMLNS_ROSTER;
412 
414  GLOOX_API extern const std::string XMLNS_VERSION;
415 
417  GLOOX_API extern const std::string XMLNS_REGISTER;
418 
420  GLOOX_API extern const std::string XMLNS_PRIVACY;
421 
423  GLOOX_API extern const std::string XMLNS_AUTH;
424 
426  GLOOX_API extern const std::string XMLNS_PRIVATE_XML;
427 
429  GLOOX_API extern const std::string XMLNS_LAST;
430 
432  GLOOX_API extern const std::string XMLNS_SEARCH;
433 
435  GLOOX_API extern const std::string XMLNS_IQ_OOB;
436 
438  GLOOX_API extern const std::string XMLNS_X_DATA;
439 
441  GLOOX_API extern const std::string XMLNS_X_EVENT;
442 
444  GLOOX_API extern const std::string XMLNS_X_OOB;
445 
447  GLOOX_API extern const std::string XMLNS_X_DELAY;
448 
450  GLOOX_API extern const std::string XMLNS_X_GPGSIGNED;
451 
453  GLOOX_API extern const std::string XMLNS_X_GPGENCRYPTED;
454 
456  GLOOX_API extern const std::string XMLNS_VCARD_TEMP;
457 
459  GLOOX_API extern const std::string XMLNS_X_VCARD_UPDATE;
460 
462  GLOOX_API extern const std::string XMLNS_BOOKMARKS;
463 
465  GLOOX_API extern const std::string XMLNS_ANNOTATIONS;
466 
468  GLOOX_API extern const std::string XMLNS_ROSTER_DELIMITER;
469 
471  GLOOX_API extern const std::string XMLNS_XMPP_PING;
472 
474  GLOOX_API extern const std::string XMLNS_SI;
475 
477  GLOOX_API extern const std::string XMLNS_SI_FT;
478 
480  GLOOX_API extern const std::string XMLNS_BYTESTREAMS;
481 
483  GLOOX_API extern const std::string XMLNS_MUC;
484 
486  GLOOX_API extern const std::string XMLNS_MUC_USER;
487 
489  GLOOX_API extern const std::string XMLNS_MUC_ADMIN;
490 
492  GLOOX_API extern const std::string XMLNS_MUC_UNIQUE;
493 
495  GLOOX_API extern const std::string XMLNS_MUC_OWNER;
496 
498  GLOOX_API extern const std::string XMLNS_MUC_ROOMINFO;
499 
501  GLOOX_API extern const std::string XMLNS_MUC_ROOMS;
502 
504  GLOOX_API extern const std::string XMLNS_MUC_REQUEST;
505 
507  GLOOX_API extern const std::string XMLNS_PUBSUB;
508 
510  GLOOX_API extern const std::string XMLNS_PUBSUB_ERRORS;
511 
513  GLOOX_API extern const std::string XMLNS_PUBSUB_EVENT;
514 
516  GLOOX_API extern const std::string XMLNS_PUBSUB_OWNER;
517 
519  GLOOX_API extern const std::string XMLNS_CAPS;
520 
522  GLOOX_API extern const std::string XMLNS_FT_FASTMODE;
523 
525  GLOOX_API extern const std::string XMLNS_STREAM;
526 
528  GLOOX_API extern const std::string XMLNS_XMPP_STREAM;
529 
531  GLOOX_API extern const std::string XMLNS_XMPP_STANZAS;
532 
534  GLOOX_API extern const std::string XMLNS_STREAM_TLS;
535 
537  GLOOX_API extern const std::string XMLNS_STREAM_SASL;
538 
540  GLOOX_API extern const std::string XMLNS_STREAM_BIND;
541 
543  GLOOX_API extern const std::string XMLNS_STREAM_SESSION;
544 
546  GLOOX_API extern const std::string XMLNS_STREAM_IQAUTH;
547 
549  GLOOX_API extern const std::string XMLNS_STREAM_IQREGISTER;
550 
552  GLOOX_API extern const std::string XMLNS_STREAM_COMPRESS;
553 
555  GLOOX_API extern const std::string XMLNS_HTTPBIND;
556 
558  GLOOX_API extern const std::string XMLNS_XMPP_BOSH;
559 
561  GLOOX_API extern const std::string XMLNS_RECEIPTS;
562 
564  GLOOX_API extern const std::string XMLNS_NICKNAME;
565 
567  GLOOX_API extern const std::string XMLNS_JINGLE;
568 
570  GLOOX_API extern const std::string XMLNS_JINGLE_AUDIO_RTP;
571 
573  GLOOX_API extern const std::string XMLNS_JINGLE_ICE_UDP;
574 
576  GLOOX_API extern const std::string XMLNS_JINGLE_RAW_UDP;
577 
579  GLOOX_API extern const std::string XMLNS_JINGLE_VIDEO_RTP;
580 
582  GLOOX_API extern const std::string XMLNS_SHIM;
583 
585  GLOOX_API extern const std::string XMLNS_ATTENTION;
586 
587 
589  GLOOX_API extern const std::string XMPP_STREAM_VERSION_MAJOR;
590 
592  GLOOX_API extern const std::string XMPP_STREAM_VERSION_MINOR;
593 
595  GLOOX_API extern const std::string GLOOX_VERSION;
596 
598  GLOOX_API extern const std::string GLOOX_CAPS_NODE;
599 
601  GLOOX_API extern const std::string XMLNS;
602 
604  GLOOX_API extern const std::string TYPE;
605 
607  GLOOX_API extern const std::string EmptyString;
608 
613  {
618  };
619 
625  {
636  };
637 
642  {
674  };
675 
680  {
686  };
687 
692  {
705  // SASLMechanism below must be adjusted accordingly.
706  };
707 
711  // must be adjusted with changes to StreamFeature enum above
713  {
720  SaslMechGssapi = 4096,
721  SaslMechNTLM = 8192,
722  SaslMechAll = 65535
723  };
724 
729  {
805  };
806 
811  {
819  };
820 
826  {
827 
907  };
908 
912 // enum Presence
913 // {
914 // PresenceUnknown, /**< Unknown status. */
915 // PresenceAvailable, /**< The entity or resource is online and available. */
916 // PresenceChat, /**< The entity or resource is actively interested in chatting. */
917 // PresenceAway, /**< The entity or resource is temporarily away. */
918 // PresenceDnd, /**< The entity or resource is busy (dnd = "Do Not Disturb"). */
919 // PresenceXa, /**< The entity or resource is away for an extended period (xa =
920 // * "eXtended Away"). */
921 // PresenceUnavailable /**< The entity or resource is offline. */
922 // };
923 
928  {
929  CertOk = 0,
938  };
939 
943  struct CertInfo
944  {
945  int status;
946  bool chain;
947  std::string issuer;
948  std::string server;
949  int date_from;
951  int date_to;
953  std::string protocol;
954  std::string cipher;
955  std::string mac;
956  std::string compression;
957  };
958 
963  {
999  };
1000 
1004  enum LogArea
1005  {
1006  LogAreaClassParser = 0x000001,
1008  LogAreaClassClient = 0x000004,
1011  LogAreaClassDns = 0x000020,
1020  LogAreaAllClasses = 0x01FFFF,
1021  LogAreaXmlIncoming = 0x020000,
1022  LogAreaXmlOutgoing = 0x040000,
1023  LogAreaUser = 0x800000,
1024  LogAreaAll = 0xFFFFFF
1025  };
1026 
1031  {
1035  };
1036 
1041  {
1050  };
1051 
1056  {
1064  };
1065 
1070  {
1075  };
1076 
1081  {
1087  };
1088 
1093  {
1096  };
1097 
1102  {
1109  };
1110 
1115  {
1121  };
1122 
1127  {
1131  FlagHidden = 1<< 4,
1133  FlagModerated = 1<< 6,
1135  FlagOpen = 1<< 8,
1136  FlagPersistent = 1<< 9,
1137  FlagPublic = 1<<10,
1139  FlagTemporary = 1<<12,
1141  FlagUnsecured = 1<<14,
1143  // keep in sync with MUCUserFlag below
1144  };
1145 
1149  // keep in sync with MUCRoomFlag above
1151  {
1152  UserSelf = 1<<16,
1154  UserKicked = 1<<18,
1155  UserBanned = 1<<19,
1161  UserNewRoom = 1<<23,
1169  };
1170 
1175  {
1197  };
1198 
1202  typedef std::list<std::string> StringList;
1203 
1207  typedef std::list<std::string*> StringPList;
1208 
1212  typedef std::map<std::string, std::string> StringMap;
1213 
1217  typedef std::multimap<std::string, std::string> StringMultiMap;
1218 
1223  typedef std::list<const StanzaExtension*> StanzaExtensionList;
1224 }
1225 
1226 extern "C"
1227 {
1228  GLOOX_API const char* gloox_version();
1229 }
1230 
1231 #endif // GLOOX_H__