gloox
1.0.13
Main Page
Related Pages
Namespaces
Classes
Files
File List
src
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
636
enum
ConnectionState
637
{
638
StateDisconnected
,
639
StateConnecting
,
640
StateConnected
642
};
643
648
enum
StreamEvent
649
{
650
StreamEventConnecting
,
651
StreamEventEncryption
,
652
StreamEventCompression
,
653
StreamEventAuthentication
,
654
StreamEventSessionInit
,
655
StreamEventResourceBinding
,
656
StreamEventSMEnable
,
658
StreamEventSMResume
,
661
StreamEventSMResumed
,
664
StreamEventSMEnableFailed
,
667
StreamEventSMResumeFailed
,
670
StreamEventSessionCreation
,
672
StreamEventRoster
,
673
StreamEventFinished
674
};
675
679
enum
ConnectionError
680
{
681
ConnNoError
,
682
ConnStreamError
,
684
ConnStreamVersionError
,
685
ConnStreamClosed
,
686
ConnProxyAuthRequired
,
688
ConnProxyAuthFailed
,
690
ConnProxyNoSupportedAuth
,
692
ConnIoError
,
693
ConnParseError
,
694
ConnConnectionRefused
,
696
ConnDnsError
,
698
ConnOutOfMemory
,
699
ConnNoSupportedAuth
,
701
ConnTlsFailed
,
703
ConnTlsNotAvailable
,
706
ConnCompressionFailed
,
708
ConnAuthenticationFailed
,
710
ConnUserDisconnected
,
711
ConnNotConnected
712
};
713
717
enum
TLSPolicy
718
{
719
TLSDisabled
,
720
TLSOptional
,
721
TLSRequired
724
};
725
729
enum
StreamFeature
730
{
731
StreamFeatureBind
= 1,
732
StreamFeatureUnbind
= 2,
733
StreamFeatureSession
= 4,
734
StreamFeatureStartTls
= 8,
735
StreamFeatureIqRegister
= 16,
737
StreamFeatureIqAuth
= 32,
739
StreamFeatureCompressZlib
= 64,
741
StreamFeatureCompressDclz
= 128,
743
StreamFeatureStreamManagement
= 256
744
// SaslMechanism below must be adjusted accordingly.
745
};
746
750
// must be adjusted with changes to StreamFeature enum above
751
enum
SaslMechanism
752
{
753
SaslMechNone
= 0,
754
SaslMechScramSha1
= 2048,
755
SaslMechScramSha1Plus
= 1024,
756
SaslMechDigestMd5
= 4096,
757
SaslMechPlain
= 8192,
758
SaslMechAnonymous
= 16384,
760
SaslMechExternal
= 32768,
761
SaslMechGssapi
= 65536,
762
SaslMechNTLM
= 131072,
763
SaslMechAll
= 262143
764
};
765
769
enum
StreamError
770
{
771
StreamErrorBadFormat
,
777
StreamErrorBadNamespacePrefix
,
780
StreamErrorConflict
,
783
StreamErrorConnectionTimeout
,
785
StreamErrorHostGone
,
788
StreamErrorHostUnknown
,
791
StreamErrorImproperAddressing
,
793
StreamErrorInternalServerError
,
796
StreamErrorInvalidFrom
,
800
StreamErrorInvalidId
,
802
StreamErrorInvalidNamespace
,
806
StreamErrorInvalidXml
,
808
StreamErrorNotAuthorized
,
812
StreamErrorPolicyViolation
,
815
StreamErrorRemoteConnectionFailed
,
817
StreamErrorResourceConstraint
,
819
StreamErrorRestrictedXml
,
822
StreamErrorSeeOtherHost
,
827
StreamErrorSystemShutdown
,
829
StreamErrorUndefinedCondition
,
832
StreamErrorUnsupportedEncoding
,
835
StreamErrorUnsupportedStanzaType
,
837
StreamErrorUnsupportedVersion
,
841
StreamErrorXmlNotWellFormed
,
843
StreamErrorUndefined
846
};
847
851
enum
StanzaErrorType
852
{
853
StanzaErrorTypeAuth
,
854
StanzaErrorTypeCancel
,
855
StanzaErrorTypeContinue
,
856
StanzaErrorTypeModify
,
858
StanzaErrorTypeWait
,
859
StanzaErrorTypeUndefined
860
};
861
866
enum
StanzaError
867
{
868
869
StanzaErrorBadRequest
,
873
StanzaErrorConflict
,
876
StanzaErrorFeatureNotImplemented
,
879
StanzaErrorForbidden
,
881
StanzaErrorGone
,
885
StanzaErrorInternalServerError
,
888
StanzaErrorItemNotFound
,
890
StanzaErrorJidMalformed
,
895
StanzaErrorNotAcceptable
,
899
StanzaErrorNotAllowed
,
901
StanzaErrorNotAuthorized
,
904
StanzaErrorNotModified
,
906
StanzaErrorPaymentRequired
,
909
StanzaErrorRecipientUnavailable
,
914
StanzaErrorRedirect
,
919
StanzaErrorRegistrationRequired
,
922
StanzaErrorRemoteServerNotFound
,
925
StanzaErrorRemoteServerTimeout
,
929
StanzaErrorResourceConstraint
,
931
StanzaErrorServiceUnavailable
,
933
StanzaErrorSubscribtionRequired
,
936
StanzaErrorUndefinedCondition
,
940
StanzaErrorUnexpectedRequest
,
943
StanzaErrorUnknownSender
,
947
StanzaErrorUndefined
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
968
enum
CertStatus
969
{
970
CertOk
= 0,
971
CertInvalid
= 1,
972
CertSignerUnknown
= 2,
973
CertRevoked
= 4,
974
CertExpired
= 8,
975
CertNotActive
= 16,
976
CertWrongPeer
= 32,
978
CertSignerNotCa
= 64
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
1003
enum
AuthenticationError
1004
{
1005
AuthErrorUndefined
,
1006
SaslAborted
,
1009
SaslIncorrectEncoding
,
1014
SaslInvalidAuthzid
,
1019
SaslInvalidMechanism
,
1022
SaslMalformedRequest
,
1026
SaslMechanismTooWeak
,
1030
SaslNotAuthorized
,
1034
SaslTemporaryAuthFailure
,
1037
NonSaslConflict
,
1038
NonSaslNotAcceptable
,
1039
NonSaslNotAuthorized
1040
};
1041
1045
enum
LogArea
1046
{
1047
LogAreaClassParser
= 0x000001,
1048
LogAreaClassConnectionTCPBase
= 0x000002,
1049
LogAreaClassClient
= 0x000004,
1050
LogAreaClassClientbase
= 0x000008,
1051
LogAreaClassComponent
= 0x000010,
1052
LogAreaClassDns
= 0x000020,
1053
LogAreaClassConnectionHTTPProxy
= 0x000040,
1054
LogAreaClassConnectionSOCKS5Proxy
= 0x000080,
1055
LogAreaClassConnectionTCPClient
= 0x000100,
1056
LogAreaClassConnectionTCPServer
= 0x000200,
1057
LogAreaClassS5BManager
= 0x000400,
1058
LogAreaClassSOCKS5Bytestream
= 0x000800,
1059
LogAreaClassConnectionBOSH
= 0x001000,
1060
LogAreaClassConnectionTLS
= 0x002000,
1061
LogAreaLinkLocalManager
= 0x004000,
1062
LogAreaAllClasses
= 0x01FFFF,
1063
LogAreaXmlIncoming
= 0x020000,
1064
LogAreaXmlOutgoing
= 0x040000,
1065
LogAreaUser
= 0x800000,
1066
LogAreaAll
= 0xFFFFFF
1067
};
1068
1072
enum
LogLevel
1073
{
1074
LogLevelDebug
,
1075
LogLevelWarning
,
1076
LogLevelError
1077
};
1078
1082
enum
MessageEventType
1083
{
1084
MessageEventOffline
= 1,
1086
MessageEventDelivered
= 2,
1088
MessageEventDisplayed
= 4,
1089
MessageEventComposing
= 8,
1090
MessageEventInvalid
= 16,
1091
MessageEventCancel
= 32
1092
};
1093
1097
enum
ChatStateType
1098
{
1099
ChatStateActive
= 1,
1100
ChatStateComposing
= 2,
1101
ChatStatePaused
= 4,
1102
ChatStateInactive
= 8,
1103
ChatStateGone
= 16,
1105
ChatStateInvalid
= 32
1106
};
1107
1111
enum
ResourceBindError
1112
{
1113
RbErrorUnknownError
,
1114
RbErrorBadRequest
,
1115
RbErrorNotAllowed
,
1116
RbErrorConflict
1117
};
1118
1122
enum
SessionCreateError
1123
{
1124
ScErrorUnknownError
,
1125
ScErrorInternalServerError
,
1126
ScErrorForbidden
,
1127
ScErrorConflict
1129
};
1130
1134
enum
MessageSessionFilter
1135
{
1136
FilterMessageEvents
= 1,
1137
FilterChatStates
= 2
1138
};
1139
1143
enum
MUCRoomAffiliation
1144
{
1145
AffiliationNone
,
1146
AffiliationOutcast
,
1147
AffiliationMember
,
1148
AffiliationOwner
,
1149
AffiliationAdmin
,
1150
AffiliationInvalid
1151
};
1152
1156
enum
MUCRoomRole
1157
{
1158
RoleNone
,
1159
RoleVisitor
,
1160
RoleParticipant
,
1161
RoleModerator
,
1162
RoleInvalid
1163
};
1164
1168
enum
MUCRoomFlag
1169
{
1170
FlagPasswordProtected
= 1<< 1,
1171
FlagPublicLogging
= 1<< 2,
1172
FlagPublicLoggingOff
= 1<< 3,
1173
FlagHidden
= 1<< 4,
1174
FlagMembersOnly
= 1<< 5,
1175
FlagModerated
= 1<< 6,
1176
FlagNonAnonymous
= 1<< 7,
1177
FlagOpen
= 1<< 8,
1178
FlagPersistent
= 1<< 9,
1179
FlagPublic
= 1<<10,
1180
FlagSemiAnonymous
= 1<<11,
1181
FlagTemporary
= 1<<12,
1182
FlagUnmoderated
= 1<<13,
1183
FlagUnsecured
= 1<<14,
1184
FlagFullyAnonymous
= 1<<15
1185
// keep in sync with MUCUserFlag below
1186
};
1187
1191
// keep in sync with MUCRoomFlag above
1192
enum
MUCUserFlag
1193
{
1194
UserSelf
= 1<<16,
1195
UserNickChanged
= 1<<17,
1196
UserKicked
= 1<<18,
1197
UserBanned
= 1<<19,
1198
UserAffiliationChanged
= 1<<20,
1200
UserRoomDestroyed
= 1<<21,
1201
UserNickAssigned
= 1<<22,
1203
UserNewRoom
= 1<<23,
1204
UserMembershipRequired
= 1<<24,
1207
UserRoomShutdown
= 1<<25,
1209
UserAffiliationChangedWNR
= 1<<26
1211
};
1212
1216
enum
SubscriptionType
1217
{
1218
S10nNone
,
1220
S10nNoneOut
,
1223
S10nNoneIn
,
1228
S10nNoneOutIn
,
1232
S10nTo
,
1233
S10nToIn
,
1235
S10nFrom
,
1236
S10nFromOut
,
1238
S10nBoth
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
1261
class
StanzaExtension
;
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__
Generated on Sun Feb 1 2015 21:55:48 for gloox by
1.8.1.2