gloox
1.0.1
Main Page
Related Pages
Namespaces
Classes
Files
File List
src
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
613
enum
ConnectionState
614
{
615
StateDisconnected
,
616
StateConnecting
,
617
StateConnected
619
};
620
625
enum
StreamEvent
626
{
627
StreamEventConnecting
,
628
StreamEventEncryption
,
629
StreamEventCompression
,
630
StreamEventAuthentication
,
631
StreamEventSessionInit
,
632
StreamEventResourceBinding
,
633
StreamEventSessionCreation
,
635
StreamEventRoster
,
636
StreamEventFinished
637
};
638
642
enum
ConnectionError
643
{
644
ConnNoError
,
645
ConnStreamError
,
647
ConnStreamVersionError
,
648
ConnStreamClosed
,
649
ConnProxyAuthRequired
,
651
ConnProxyAuthFailed
,
653
ConnProxyNoSupportedAuth
,
655
ConnIoError
,
656
ConnParseError
,
657
ConnConnectionRefused
,
659
ConnDnsError
,
661
ConnOutOfMemory
,
662
ConnNoSupportedAuth
,
664
ConnTlsFailed
,
666
ConnTlsNotAvailable
,
669
ConnCompressionFailed
,
671
ConnAuthenticationFailed
,
673
ConnUserDisconnected
,
674
ConnNotConnected
675
};
676
680
enum
TLSPolicy
681
{
682
TLSDisabled
,
683
TLSOptional
,
684
TLSRequired
687
};
688
692
enum
StreamFeature
693
{
694
StreamFeatureBind
= 1,
695
StreamFeatureUnbind
= 2,
696
StreamFeatureSession
= 4,
697
StreamFeatureStartTls
= 8,
698
StreamFeatureIqRegister
= 16,
700
StreamFeatureIqAuth
= 32,
702
StreamFeatureCompressZlib
= 64,
704
StreamFeatureCompressDclz
= 128
706
// SASLMechanism below must be adjusted accordingly.
707
};
708
712
// must be adjusted with changes to StreamFeature enum above
713
enum
SaslMechanism
714
{
715
SaslMechNone
= 0,
716
SaslMechDigestMd5
= 256,
717
SaslMechPlain
= 512,
718
SaslMechAnonymous
= 1024,
720
SaslMechExternal
= 2048,
721
SaslMechGssapi
= 4096,
722
SaslMechNTLM
= 8192,
723
SaslMechAll
= 65535
724
};
725
729
enum
StreamError
730
{
731
StreamErrorBadFormat
,
737
StreamErrorBadNamespacePrefix
,
740
StreamErrorConflict
,
743
StreamErrorConnectionTimeout
,
745
StreamErrorHostGone
,
748
StreamErrorHostUnknown
,
751
StreamErrorImproperAddressing
,
753
StreamErrorInternalServerError
,
756
StreamErrorInvalidFrom
,
760
StreamErrorInvalidId
,
762
StreamErrorInvalidNamespace
,
766
StreamErrorInvalidXml
,
768
StreamErrorNotAuthorized
,
772
StreamErrorPolicyViolation
,
775
StreamErrorRemoteConnectionFailed
,
777
StreamErrorResourceConstraint
,
779
StreamErrorRestrictedXml
,
782
StreamErrorSeeOtherHost
,
787
StreamErrorSystemShutdown
,
789
StreamErrorUndefinedCondition
,
792
StreamErrorUnsupportedEncoding
,
795
StreamErrorUnsupportedStanzaType
,
797
StreamErrorUnsupportedVersion
,
801
StreamErrorXmlNotWellFormed
,
803
StreamErrorUndefined
806
};
807
811
enum
StanzaErrorType
812
{
813
StanzaErrorTypeAuth
,
814
StanzaErrorTypeCancel
,
815
StanzaErrorTypeContinue
,
816
StanzaErrorTypeModify
,
818
StanzaErrorTypeWait
,
819
StanzaErrorTypeUndefined
820
};
821
826
enum
StanzaError
827
{
828
829
StanzaErrorBadRequest
,
833
StanzaErrorConflict
,
836
StanzaErrorFeatureNotImplemented
,
839
StanzaErrorForbidden
,
841
StanzaErrorGone
,
845
StanzaErrorInternalServerError
,
848
StanzaErrorItemNotFound
,
850
StanzaErrorJidMalformed
,
855
StanzaErrorNotAcceptable
,
859
StanzaErrorNotAllowed
,
861
StanzaErrorNotAuthorized
,
864
StanzaErrorNotModified
,
866
StanzaErrorPaymentRequired
,
869
StanzaErrorRecipientUnavailable
,
874
StanzaErrorRedirect
,
879
StanzaErrorRegistrationRequired
,
882
StanzaErrorRemoteServerNotFound
,
885
StanzaErrorRemoteServerTimeout
,
889
StanzaErrorResourceConstraint
,
891
StanzaErrorServiceUnavailable
,
893
StanzaErrorSubscribtionRequired
,
896
StanzaErrorUndefinedCondition
,
900
StanzaErrorUnexpectedRequest
,
903
StanzaErrorUnknownSender
,
907
StanzaErrorUndefined
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
928
enum
CertStatus
929
{
930
CertOk
= 0,
931
CertInvalid
= 1,
932
CertSignerUnknown
= 2,
933
CertRevoked
= 4,
934
CertExpired
= 8,
935
CertNotActive
= 16,
936
CertWrongPeer
= 32,
938
CertSignerNotCa
= 64
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
963
enum
AuthenticationError
964
{
965
AuthErrorUndefined
,
966
SaslAborted
,
969
SaslIncorrectEncoding
,
974
SaslInvalidAuthzid
,
979
SaslInvalidMechanism
,
982
SaslMalformedRequest
,
986
SaslMechanismTooWeak
,
990
SaslNotAuthorized
,
994
SaslTemporaryAuthFailure
,
997
NonSaslConflict
,
998
NonSaslNotAcceptable
,
999
NonSaslNotAuthorized
1000
};
1001
1005
enum
LogArea
1006
{
1007
LogAreaClassParser
= 0x000001,
1008
LogAreaClassConnectionTCPBase
= 0x000002,
1009
LogAreaClassClient
= 0x000004,
1010
LogAreaClassClientbase
= 0x000008,
1011
LogAreaClassComponent
= 0x000010,
1012
LogAreaClassDns
= 0x000020,
1013
LogAreaClassConnectionHTTPProxy
= 0x000040,
1014
LogAreaClassConnectionSOCKS5Proxy
= 0x000080,
1015
LogAreaClassConnectionTCPClient
= 0x000100,
1016
LogAreaClassConnectionTCPServer
= 0x000200,
1017
LogAreaClassS5BManager
= 0x000400,
1018
LogAreaClassSOCKS5Bytestream
= 0x000800,
1019
LogAreaClassConnectionBOSH
= 0x001000,
1020
LogAreaClassConnectionTLS
= 0x002000,
1021
LogAreaLinkLocalManager
= 0x004000,
1022
LogAreaAllClasses
= 0x01FFFF,
1023
LogAreaXmlIncoming
= 0x020000,
1024
LogAreaXmlOutgoing
= 0x040000,
1025
LogAreaUser
= 0x800000,
1026
LogAreaAll
= 0xFFFFFF
1027
};
1028
1032
enum
LogLevel
1033
{
1034
LogLevelDebug
,
1035
LogLevelWarning
,
1036
LogLevelError
1037
};
1038
1042
enum
MessageEventType
1043
{
1044
MessageEventOffline
= 1,
1046
MessageEventDelivered
= 2,
1048
MessageEventDisplayed
= 4,
1049
MessageEventComposing
= 8,
1050
MessageEventInvalid
= 16,
1051
MessageEventCancel
= 32
1052
};
1053
1057
enum
ChatStateType
1058
{
1059
ChatStateActive
= 1,
1060
ChatStateComposing
= 2,
1061
ChatStatePaused
= 4,
1062
ChatStateInactive
= 8,
1063
ChatStateGone
= 16,
1065
ChatStateInvalid
= 32
1066
};
1067
1071
enum
ResourceBindError
1072
{
1073
RbErrorUnknownError
,
1074
RbErrorBadRequest
,
1075
RbErrorNotAllowed
,
1076
RbErrorConflict
1077
};
1078
1082
enum
SessionCreateError
1083
{
1084
ScErrorUnknownError
,
1085
ScErrorInternalServerError
,
1086
ScErrorForbidden
,
1087
ScErrorConflict
1089
};
1090
1094
enum
MessageSessionFilter
1095
{
1096
FilterMessageEvents
= 1,
1097
FilterChatStates
= 2
1098
};
1099
1103
enum
MUCRoomAffiliation
1104
{
1105
AffiliationNone
,
1106
AffiliationOutcast
,
1107
AffiliationMember
,
1108
AffiliationOwner
,
1109
AffiliationAdmin
,
1110
AffiliationInvalid
1111
};
1112
1116
enum
MUCRoomRole
1117
{
1118
RoleNone
,
1119
RoleVisitor
,
1120
RoleParticipant
,
1121
RoleModerator
,
1122
RoleInvalid
1123
};
1124
1128
enum
MUCRoomFlag
1129
{
1130
FlagPasswordProtected
= 1<< 1,
1131
FlagPublicLogging
= 1<< 2,
1132
FlagPublicLoggingOff
= 1<< 3,
1133
FlagHidden
= 1<< 4,
1134
FlagMembersOnly
= 1<< 5,
1135
FlagModerated
= 1<< 6,
1136
FlagNonAnonymous
= 1<< 7,
1137
FlagOpen
= 1<< 8,
1138
FlagPersistent
= 1<< 9,
1139
FlagPublic
= 1<<10,
1140
FlagSemiAnonymous
= 1<<11,
1141
FlagTemporary
= 1<<12,
1142
FlagUnmoderated
= 1<<13,
1143
FlagUnsecured
= 1<<14,
1144
FlagFullyAnonymous
= 1<<15
1145
// keep in sync with MUCUserFlag below
1146
};
1147
1151
// keep in sync with MUCRoomFlag above
1152
enum
MUCUserFlag
1153
{
1154
UserSelf
= 1<<16,
1155
UserNickChanged
= 1<<17,
1156
UserKicked
= 1<<18,
1157
UserBanned
= 1<<19,
1158
UserAffiliationChanged
= 1<<20,
1160
UserRoomDestroyed
= 1<<21,
1161
UserNickAssigned
= 1<<22,
1163
UserNewRoom
= 1<<23,
1164
UserMembershipRequired
= 1<<24,
1167
UserRoomShutdown
= 1<<25,
1169
UserAffiliationChangedWNR
= 1<<26
1171
};
1172
1176
enum
SubscriptionType
1177
{
1178
S10nNone
,
1180
S10nNoneOut
,
1183
S10nNoneIn
,
1188
S10nNoneOutIn
,
1192
S10nTo
,
1193
S10nToIn
,
1195
S10nFrom
,
1196
S10nFromOut
,
1198
S10nBoth
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
1221
class
StanzaExtension
;
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__
Generated on Sun Jun 30 2013 14:37:36 for gloox by
1.8.1.2