gloox
1.0.9
Main Page
Related Pages
Namespaces
Classes
Files
File List
src
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
633
enum
ConnectionState
634
{
635
StateDisconnected
,
636
StateConnecting
,
637
StateConnected
639
};
640
645
enum
StreamEvent
646
{
647
StreamEventConnecting
,
648
StreamEventEncryption
,
649
StreamEventCompression
,
650
StreamEventAuthentication
,
651
StreamEventSessionInit
,
652
StreamEventResourceBinding
,
653
StreamEventSMEnable
,
655
StreamEventSMResume
,
658
StreamEventSMResumed
,
661
StreamEventSMEnableFailed
,
664
StreamEventSMResumeFailed
,
667
StreamEventSessionCreation
,
669
StreamEventRoster
,
670
StreamEventFinished
671
};
672
676
enum
ConnectionError
677
{
678
ConnNoError
,
679
ConnStreamError
,
681
ConnStreamVersionError
,
682
ConnStreamClosed
,
683
ConnProxyAuthRequired
,
685
ConnProxyAuthFailed
,
687
ConnProxyNoSupportedAuth
,
689
ConnIoError
,
690
ConnParseError
,
691
ConnConnectionRefused
,
693
ConnDnsError
,
695
ConnOutOfMemory
,
696
ConnNoSupportedAuth
,
698
ConnTlsFailed
,
700
ConnTlsNotAvailable
,
703
ConnCompressionFailed
,
705
ConnAuthenticationFailed
,
707
ConnUserDisconnected
,
708
ConnNotConnected
709
};
710
714
enum
TLSPolicy
715
{
716
TLSDisabled
,
717
TLSOptional
,
718
TLSRequired
721
};
722
726
enum
StreamFeature
727
{
728
StreamFeatureBind
= 1,
729
StreamFeatureUnbind
= 2,
730
StreamFeatureSession
= 4,
731
StreamFeatureStartTls
= 8,
732
StreamFeatureIqRegister
= 16,
734
StreamFeatureIqAuth
= 32,
736
StreamFeatureCompressZlib
= 64,
738
StreamFeatureCompressDclz
= 128,
740
StreamFeatureStreamManagement
= 256
741
// SaslMechanism below must be adjusted accordingly.
742
};
743
747
// must be adjusted with changes to StreamFeature enum above
748
enum
SaslMechanism
749
{
750
SaslMechNone
= 0,
751
SaslMechScramSha1
= 2048,
752
SaslMechScramSha1Plus
= 1024,
753
SaslMechDigestMd5
= 4096,
754
SaslMechPlain
= 8192,
755
SaslMechAnonymous
= 16384,
757
SaslMechExternal
= 32768,
758
SaslMechGssapi
= 65536,
759
SaslMechNTLM
= 131072,
760
SaslMechAll
= 262143
761
};
762
766
enum
StreamError
767
{
768
StreamErrorBadFormat
,
774
StreamErrorBadNamespacePrefix
,
777
StreamErrorConflict
,
780
StreamErrorConnectionTimeout
,
782
StreamErrorHostGone
,
785
StreamErrorHostUnknown
,
788
StreamErrorImproperAddressing
,
790
StreamErrorInternalServerError
,
793
StreamErrorInvalidFrom
,
797
StreamErrorInvalidId
,
799
StreamErrorInvalidNamespace
,
803
StreamErrorInvalidXml
,
805
StreamErrorNotAuthorized
,
809
StreamErrorPolicyViolation
,
812
StreamErrorRemoteConnectionFailed
,
814
StreamErrorResourceConstraint
,
816
StreamErrorRestrictedXml
,
819
StreamErrorSeeOtherHost
,
824
StreamErrorSystemShutdown
,
826
StreamErrorUndefinedCondition
,
829
StreamErrorUnsupportedEncoding
,
832
StreamErrorUnsupportedStanzaType
,
834
StreamErrorUnsupportedVersion
,
838
StreamErrorXmlNotWellFormed
,
840
StreamErrorUndefined
843
};
844
848
enum
StanzaErrorType
849
{
850
StanzaErrorTypeAuth
,
851
StanzaErrorTypeCancel
,
852
StanzaErrorTypeContinue
,
853
StanzaErrorTypeModify
,
855
StanzaErrorTypeWait
,
856
StanzaErrorTypeUndefined
857
};
858
863
enum
StanzaError
864
{
865
866
StanzaErrorBadRequest
,
870
StanzaErrorConflict
,
873
StanzaErrorFeatureNotImplemented
,
876
StanzaErrorForbidden
,
878
StanzaErrorGone
,
882
StanzaErrorInternalServerError
,
885
StanzaErrorItemNotFound
,
887
StanzaErrorJidMalformed
,
892
StanzaErrorNotAcceptable
,
896
StanzaErrorNotAllowed
,
898
StanzaErrorNotAuthorized
,
901
StanzaErrorNotModified
,
903
StanzaErrorPaymentRequired
,
906
StanzaErrorRecipientUnavailable
,
911
StanzaErrorRedirect
,
916
StanzaErrorRegistrationRequired
,
919
StanzaErrorRemoteServerNotFound
,
922
StanzaErrorRemoteServerTimeout
,
926
StanzaErrorResourceConstraint
,
928
StanzaErrorServiceUnavailable
,
930
StanzaErrorSubscribtionRequired
,
933
StanzaErrorUndefinedCondition
,
937
StanzaErrorUnexpectedRequest
,
940
StanzaErrorUnknownSender
,
944
StanzaErrorUndefined
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
965
enum
CertStatus
966
{
967
CertOk
= 0,
968
CertInvalid
= 1,
969
CertSignerUnknown
= 2,
970
CertRevoked
= 4,
971
CertExpired
= 8,
972
CertNotActive
= 16,
973
CertWrongPeer
= 32,
975
CertSignerNotCa
= 64
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
1000
enum
AuthenticationError
1001
{
1002
AuthErrorUndefined
,
1003
SaslAborted
,
1006
SaslIncorrectEncoding
,
1011
SaslInvalidAuthzid
,
1016
SaslInvalidMechanism
,
1019
SaslMalformedRequest
,
1023
SaslMechanismTooWeak
,
1027
SaslNotAuthorized
,
1031
SaslTemporaryAuthFailure
,
1034
NonSaslConflict
,
1035
NonSaslNotAcceptable
,
1036
NonSaslNotAuthorized
1037
};
1038
1042
enum
LogArea
1043
{
1044
LogAreaClassParser
= 0x000001,
1045
LogAreaClassConnectionTCPBase
= 0x000002,
1046
LogAreaClassClient
= 0x000004,
1047
LogAreaClassClientbase
= 0x000008,
1048
LogAreaClassComponent
= 0x000010,
1049
LogAreaClassDns
= 0x000020,
1050
LogAreaClassConnectionHTTPProxy
= 0x000040,
1051
LogAreaClassConnectionSOCKS5Proxy
= 0x000080,
1052
LogAreaClassConnectionTCPClient
= 0x000100,
1053
LogAreaClassConnectionTCPServer
= 0x000200,
1054
LogAreaClassS5BManager
= 0x000400,
1055
LogAreaClassSOCKS5Bytestream
= 0x000800,
1056
LogAreaClassConnectionBOSH
= 0x001000,
1057
LogAreaClassConnectionTLS
= 0x002000,
1058
LogAreaLinkLocalManager
= 0x004000,
1059
LogAreaAllClasses
= 0x01FFFF,
1060
LogAreaXmlIncoming
= 0x020000,
1061
LogAreaXmlOutgoing
= 0x040000,
1062
LogAreaUser
= 0x800000,
1063
LogAreaAll
= 0xFFFFFF
1064
};
1065
1069
enum
LogLevel
1070
{
1071
LogLevelDebug
,
1072
LogLevelWarning
,
1073
LogLevelError
1074
};
1075
1079
enum
MessageEventType
1080
{
1081
MessageEventOffline
= 1,
1083
MessageEventDelivered
= 2,
1085
MessageEventDisplayed
= 4,
1086
MessageEventComposing
= 8,
1087
MessageEventInvalid
= 16,
1088
MessageEventCancel
= 32
1089
};
1090
1094
enum
ChatStateType
1095
{
1096
ChatStateActive
= 1,
1097
ChatStateComposing
= 2,
1098
ChatStatePaused
= 4,
1099
ChatStateInactive
= 8,
1100
ChatStateGone
= 16,
1102
ChatStateInvalid
= 32
1103
};
1104
1108
enum
ResourceBindError
1109
{
1110
RbErrorUnknownError
,
1111
RbErrorBadRequest
,
1112
RbErrorNotAllowed
,
1113
RbErrorConflict
1114
};
1115
1119
enum
SessionCreateError
1120
{
1121
ScErrorUnknownError
,
1122
ScErrorInternalServerError
,
1123
ScErrorForbidden
,
1124
ScErrorConflict
1126
};
1127
1131
enum
MessageSessionFilter
1132
{
1133
FilterMessageEvents
= 1,
1134
FilterChatStates
= 2
1135
};
1136
1140
enum
MUCRoomAffiliation
1141
{
1142
AffiliationNone
,
1143
AffiliationOutcast
,
1144
AffiliationMember
,
1145
AffiliationOwner
,
1146
AffiliationAdmin
,
1147
AffiliationInvalid
1148
};
1149
1153
enum
MUCRoomRole
1154
{
1155
RoleNone
,
1156
RoleVisitor
,
1157
RoleParticipant
,
1158
RoleModerator
,
1159
RoleInvalid
1160
};
1161
1165
enum
MUCRoomFlag
1166
{
1167
FlagPasswordProtected
= 1<< 1,
1168
FlagPublicLogging
= 1<< 2,
1169
FlagPublicLoggingOff
= 1<< 3,
1170
FlagHidden
= 1<< 4,
1171
FlagMembersOnly
= 1<< 5,
1172
FlagModerated
= 1<< 6,
1173
FlagNonAnonymous
= 1<< 7,
1174
FlagOpen
= 1<< 8,
1175
FlagPersistent
= 1<< 9,
1176
FlagPublic
= 1<<10,
1177
FlagSemiAnonymous
= 1<<11,
1178
FlagTemporary
= 1<<12,
1179
FlagUnmoderated
= 1<<13,
1180
FlagUnsecured
= 1<<14,
1181
FlagFullyAnonymous
= 1<<15
1182
// keep in sync with MUCUserFlag below
1183
};
1184
1188
// keep in sync with MUCRoomFlag above
1189
enum
MUCUserFlag
1190
{
1191
UserSelf
= 1<<16,
1192
UserNickChanged
= 1<<17,
1193
UserKicked
= 1<<18,
1194
UserBanned
= 1<<19,
1195
UserAffiliationChanged
= 1<<20,
1197
UserRoomDestroyed
= 1<<21,
1198
UserNickAssigned
= 1<<22,
1200
UserNewRoom
= 1<<23,
1201
UserMembershipRequired
= 1<<24,
1204
UserRoomShutdown
= 1<<25,
1206
UserAffiliationChangedWNR
= 1<<26
1208
};
1209
1213
enum
SubscriptionType
1214
{
1215
S10nNone
,
1217
S10nNoneOut
,
1220
S10nNoneIn
,
1225
S10nNoneOutIn
,
1229
S10nTo
,
1230
S10nToIn
,
1232
S10nFrom
,
1233
S10nFromOut
,
1235
S10nBoth
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
1258
class
StanzaExtension
;
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__
Generated on Tue Oct 15 2013 19:25:20 for gloox by
1.8.1.2