gloox
0.9.9.12
Main Page
Related Pages
Namespaces
Classes
Files
File List
src
gloox.h
1
/*
2
Copyright (c) 2005-2008 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
329
#ifndef GLOOX_H__
330
#define GLOOX_H__
331
332
#include "macros.h"
333
334
#include <string>
335
#include <list>
336
#include <map>
337
344
namespace
gloox
345
{
347
GLOOX_API
extern
const
std::string
XMLNS_CLIENT
;
348
350
GLOOX_API
extern
const
std::string
XMLNS_COMPONENT_ACCEPT
;
351
353
GLOOX_API
extern
const
std::string
XMLNS_COMPONENT_CONNECT
;
354
356
GLOOX_API
extern
const
std::string
XMLNS_DISCO_INFO
;
357
359
GLOOX_API
extern
const
std::string
XMLNS_DISCO_ITEMS
;
360
362
GLOOX_API
extern
const
std::string
XMLNS_ADHOC_COMMANDS
;
363
365
GLOOX_API
extern
const
std::string
XMLNS_COMPRESSION
;
366
368
GLOOX_API
extern
const
std::string
XMLNS_OFFLINE
;
369
371
GLOOX_API
extern
const
std::string
XMLNS_CHAT_STATES
;
372
374
GLOOX_API
extern
const
std::string
XMLNS_AMP
;
375
377
GLOOX_API
extern
const
std::string
XMLNS_IBB
;
378
380
GLOOX_API
extern
const
std::string
XMLNS_FEATURE_NEG
;
381
383
GLOOX_API
extern
const
std::string
XMLNS_CHATNEG
;
384
386
GLOOX_API
extern
const
std::string
XMLNS_XHTML_IM
;
387
389
GLOOX_API
extern
const
std::string
XMLNS_DELAY
;
390
392
GLOOX_API
extern
const
std::string
XMLNS_ROSTER
;
393
395
GLOOX_API
extern
const
std::string
XMLNS_VERSION
;
396
398
GLOOX_API
extern
const
std::string
XMLNS_REGISTER
;
399
401
GLOOX_API
extern
const
std::string
XMLNS_PRIVACY
;
402
404
GLOOX_API
extern
const
std::string
XMLNS_AUTH
;
405
407
GLOOX_API
extern
const
std::string
XMLNS_PRIVATE_XML
;
408
410
GLOOX_API
extern
const
std::string
XMLNS_LAST
;
411
413
GLOOX_API
extern
const
std::string
XMLNS_SEARCH
;
414
416
GLOOX_API
extern
const
std::string
XMLNS_IQ_OOB
;
417
419
GLOOX_API
extern
const
std::string
XMLNS_X_DATA
;
420
422
GLOOX_API
extern
const
std::string
XMLNS_X_EVENT
;
423
425
GLOOX_API
extern
const
std::string
XMLNS_X_OOB
;
426
428
GLOOX_API
extern
const
std::string
XMLNS_X_DELAY
;
429
431
GLOOX_API
extern
const
std::string
XMLNS_X_GPGSIGNED
;
432
434
GLOOX_API
extern
const
std::string
XMLNS_X_GPGENCRYPTED
;
435
437
GLOOX_API
extern
const
std::string
XMLNS_VCARD_TEMP
;
438
440
GLOOX_API
extern
const
std::string
XMLNS_X_VCARD_UPDATE
;
441
443
GLOOX_API
extern
const
std::string
XMLNS_BOOKMARKS
;
444
446
GLOOX_API
extern
const
std::string
XMLNS_ANNOTATIONS
;
447
449
GLOOX_API
extern
const
std::string
XMLNS_ROSTER_DELIMITER
;
450
452
GLOOX_API
extern
const
std::string
XMLNS_XMPP_PING
;
453
455
GLOOX_API
extern
const
std::string
XMLNS_SI
;
456
458
GLOOX_API
extern
const
std::string
XMLNS_SI_FT
;
459
461
GLOOX_API
extern
const
std::string
XMLNS_BYTESTREAMS
;
462
464
GLOOX_API
extern
const
std::string
XMLNS_MUC
;
465
467
GLOOX_API
extern
const
std::string
XMLNS_MUC_USER
;
468
470
GLOOX_API
extern
const
std::string
XMLNS_MUC_ADMIN
;
471
473
GLOOX_API
extern
const
std::string
XMLNS_MUC_UNIQUE
;
474
476
GLOOX_API
extern
const
std::string
XMLNS_MUC_OWNER
;
477
479
GLOOX_API
extern
const
std::string
XMLNS_MUC_ROOMINFO
;
480
482
GLOOX_API
extern
const
std::string
XMLNS_MUC_ROOMS
;
483
485
GLOOX_API
extern
const
std::string
XMLNS_MUC_REQUEST
;
486
488
GLOOX_API
extern
const
std::string
XMLNS_XMPP_STREAM
;
489
491
GLOOX_API
extern
const
std::string
XMLNS_XMPP_STANZAS
;
492
494
GLOOX_API
extern
const
std::string
XMLNS_STREAM_TLS
;
495
497
GLOOX_API
extern
const
std::string
XMLNS_STREAM_SASL
;
498
500
GLOOX_API
extern
const
std::string
XMLNS_STREAM_BIND
;
501
503
GLOOX_API
extern
const
std::string
XMLNS_STREAM_SESSION
;
504
506
GLOOX_API
extern
const
std::string
XMLNS_STREAM_IQAUTH
;
507
509
GLOOX_API
extern
const
std::string
XMLNS_STREAM_IQREGISTER
;
510
512
GLOOX_API
extern
const
std::string
XMLNS_STREAM_COMPRESS
;
513
515
GLOOX_API
extern
const
std::string
XMPP_STREAM_VERSION_MAJOR
;
516
518
GLOOX_API
extern
const
std::string
XMPP_STREAM_VERSION_MINOR
;
519
521
GLOOX_API
extern
const
std::string
GLOOX_VERSION
;
522
526
enum
ConnectionState
527
{
528
StateDisconnected
,
529
StateConnecting
,
530
StateConnected
532
};
533
538
enum
StreamEvent
539
{
540
StreamEventConnecting
,
541
StreamEventEncryption
,
542
StreamEventCompression
,
543
StreamEventAuthentication
,
544
StreamEventSessionInit
,
545
StreamEventResourceBinding
,
546
StreamEventSessionCreation
,
548
StreamEventRoster
,
549
StreamEventFinished
550
};
551
555
enum
ConnectionError
556
{
557
ConnNoError
,
558
ConnStreamError
,
560
ConnStreamVersionError
,
561
ConnStreamClosed
,
562
ConnProxyAuthRequired
,
564
ConnProxyAuthFailed
,
566
ConnProxyNoSupportedAuth
,
568
ConnIoError
,
569
ConnParseError
,
570
ConnConnectionRefused
,
572
ConnDnsError
,
574
ConnOutOfMemory
,
575
ConnNoSupportedAuth
,
577
ConnTlsFailed
,
579
ConnTlsNotAvailable
,
582
ConnCompressionFailed
,
584
ConnAuthenticationFailed
,
586
ConnUserDisconnected
,
587
ConnNotConnected
588
};
589
593
enum
TLSPolicy
594
{
595
TLSDisabled
,
596
TLSOptional
,
597
TLSRequired
600
};
601
605
enum
StreamFeature
606
{
607
StreamFeatureBind
= 1,
608
StreamFeatureSession
= 2,
609
StreamFeatureStartTls
= 8,
610
StreamFeatureIqRegister
= 16,
612
StreamFeatureIqAuth
= 32,
614
StreamFeatureCompressZlib
= 64,
616
StreamFeatureCompressDclz
= 128
618
// SASLMechanism below must be adjusted accordingly.
619
};
620
624
// must be adjusted with changes to StreamFeature enum above
625
enum
SaslMechanism
626
{
627
SaslMechNone
= 0,
628
SaslMechDigestMd5
= 256,
629
SaslMechPlain
= 512,
630
SaslMechAnonymous
= 1024,
632
SaslMechExternal
= 2048,
633
SaslMechGssapi
= 4096,
634
SaslMechAll
= 65535
635
};
636
640
enum
StreamError
641
{
642
StreamErrorUndefined
,
645
StreamErrorBadFormat
,
651
StreamErrorBadNamespacePrefix
,
654
StreamErrorConflict
,
657
StreamErrorConnectionTimeout
,
659
StreamErrorHostGone
,
662
StreamErrorHostUnknown
,
665
StreamErrorImproperAddressing
,
667
StreamErrorInternalServerError
,
670
StreamErrorInvalidFrom
,
674
StreamErrorInvalidId
,
676
StreamErrorInvalidNamespace
,
680
StreamErrorInvalidXml
,
682
StreamErrorNotAuthorized
,
686
StreamErrorPolicyViolation
,
689
StreamErrorRemoteConnectionFailed
,
691
StreamErrorResourceConstraint
,
693
StreamErrorRestrictedXml
,
696
StreamErrorSeeOtherHost
,
701
StreamErrorSystemShutdown
,
703
StreamErrorUndefinedCondition
,
706
StreamErrorUnsupportedEncoding
,
709
StreamErrorUnsupportedStanzaType
,
711
StreamErrorUnsupportedVersion
,
715
StreamErrorXmlNotWellFormed
717
};
718
722
enum
StanzaType
723
{
724
StanzaUndefined
,
725
StanzaIq
,
726
StanzaMessage
,
727
StanzaS10n
,
728
StanzaPresence
729
};
730
734
enum
StanzaSubType
735
{
736
StanzaSubUndefined
= 0,
737
StanzaIqGet
= 1,
738
StanzaIqSet
= 2,
742
StanzaIqResult
= 4,
743
StanzaIqError
= 8,
748
StanzaPresenceUnavailable
= 16,
752
StanzaPresenceAvailable
= 32,
756
StanzaPresenceProbe
= 64,
760
StanzaPresenceError
= 128,
764
StanzaS10nSubscribe
= 256,
768
StanzaS10nSubscribed
= 512,
772
StanzaS10nUnsubscribe
= 1024,
776
StanzaS10nUnsubscribed
= 2048,
780
StanzaMessageChat
= 4096,
786
StanzaMessageError
= 8192,
792
StanzaMessageGroupchat
= 16384,
799
StanzaMessageHeadline
= 32768,
808
StanzaMessageNormal
= 65536
815
};
816
820
enum
StanzaErrorType
821
{
822
StanzaErrorTypeUndefined
,
823
StanzaErrorTypeCancel
,
824
StanzaErrorTypeContinue
,
825
StanzaErrorTypeModify
,
826
StanzaErrorTypeAuth
,
827
StanzaErrorTypeWait
828
};
829
834
enum
StanzaError
835
{
836
StanzaErrorUndefined
= 0,
837
StanzaErrorBadRequest
,
841
StanzaErrorConflict
,
844
StanzaErrorFeatureNotImplemented
,
847
StanzaErrorForbidden
,
849
StanzaErrorGone
,
853
StanzaErrorInternalServerError
,
856
StanzaErrorItemNotFound
,
858
StanzaErrorJidMalformed
,
863
StanzaErrorNotAcceptable
,
867
StanzaErrorNotAllowed
,
869
StanzaErrorNotAuthorized
,
872
StanzaErrorPaymentRequired
,
875
StanzaErrorRecipientUnavailable
,
880
StanzaErrorRedirect
,
885
StanzaErrorRegistrationRequired
,
888
StanzaErrorRemoteServerNotFound
,
891
StanzaErrorRemoteServerTimeout
,
895
StanzaErrorResourceConstraint
,
897
StanzaErrorServiceUnavailable
,
899
StanzaErrorSubscribtionRequired
,
902
StanzaErrorUndefinedCondition
,
906
StanzaErrorUnexpectedRequest
909
};
910
914
enum
Presence
915
{
916
PresenceUnknown
,
917
PresenceAvailable
,
918
PresenceChat
,
919
PresenceAway
,
920
PresenceDnd
,
921
PresenceXa
,
923
PresenceUnavailable
924
};
925
929
enum
CertStatus
930
{
931
CertOk
= 0,
932
CertInvalid
= 1,
933
CertSignerUnknown
= 2,
934
CertRevoked
= 4,
935
CertExpired
= 8,
936
CertNotActive
= 16,
937
CertWrongPeer
= 32,
939
CertSignerNotCa
= 64
940
};
941
945
struct
CertInfo
946
{
947
int
status
;
948
bool
chain
;
949
std::string
issuer
;
950
std::string
server
;
951
int
date_from
;
953
int
date_to
;
955
std::string
protocol
;
956
std::string
cipher
;
957
std::string
mac
;
958
std::string
compression
;
959
};
960
964
enum
AuthenticationError
965
{
966
AuthErrorUndefined
,
967
SaslAborted
,
970
SaslIncorrectEncoding
,
975
SaslInvalidAuthzid
,
980
SaslInvalidMechanism
,
983
SaslMechanismTooWeak
,
987
SaslNotAuthorized
,
991
SaslTemporaryAuthFailure
,
994
NonSaslConflict
,
995
NonSaslNotAcceptable
,
996
NonSaslNotAuthorized
997
};
998
1002
enum
LogArea
1003
{
1004
LogAreaClassParser
= 0x00001,
1005
LogAreaClassConnectionTCPBase
= 0x00002,
1006
LogAreaClassClient
= 0x00004,
1007
LogAreaClassClientbase
= 0x00008,
1008
LogAreaClassComponent
= 0x00010,
1009
LogAreaClassDns
= 0x00020,
1010
LogAreaClassConnectionHTTPProxy
= 0x00040,
1011
LogAreaClassConnectionSOCKS5Proxy
= 0x00080,
1012
LogAreaClassConnectionTCPClient
= 0x00100,
1013
LogAreaClassConnectionTCPServer
= 0x00200,
1014
LogAreaClassS5BManager
= 0x00400,
1015
LogAreaAllClasses
= 0x01FFF,
1016
LogAreaXmlIncoming
= 0x02000,
1017
LogAreaXmlOutgoing
= 0x04000,
1018
LogAreaUser
= 0x80000,
1019
LogAreaAll
= 0xFFFFF
1020
};
1021
1025
enum
LogLevel
1026
{
1027
LogLevelDebug
,
1028
LogLevelWarning
,
1029
LogLevelError
1030
};
1031
1035
enum
MessageEventType
1036
{
1037
MessageEventCancel
= 0,
1038
MessageEventOffline
= 1,
1040
MessageEventDelivered
= 2,
1042
MessageEventDisplayed
= 4,
1043
MessageEventComposing
= 8
1044
};
1045
1049
enum
ChatStateType
1050
{
1051
ChatStateActive
= 1,
1052
ChatStateComposing
= 2,
1053
ChatStatePaused
= 4,
1054
ChatStateInactive
= 8,
1055
ChatStateGone
= 16
1057
};
1058
1062
enum
ResourceBindError
1063
{
1064
RbErrorUnknownError
,
1065
RbErrorBadRequest
,
1066
RbErrorNotAllowed
,
1067
RbErrorConflict
1068
};
1069
1073
enum
SessionCreateError
1074
{
1075
ScErrorUnknownError
,
1076
ScErrorInternalServerError
,
1077
ScErrorForbidden
,
1078
ScErrorConflict
1080
};
1081
1085
enum
MessageSessionFilter
1086
{
1087
FilterMessageEvents
= 1,
1088
FilterChatStates
= 2
1089
};
1090
1094
enum
MUCRoomAffiliation
1095
{
1096
AffiliationNone
,
1097
AffiliationOutcast
,
1098
AffiliationMember
,
1099
AffiliationOwner
,
1100
AffiliationAdmin
1101
};
1102
1106
enum
MUCRoomRole
1107
{
1108
RoleNone
,
1109
RoleVisitor
,
1110
RoleParticipant
,
1111
RoleModerator
1112
};
1113
1117
enum
MUCRoomFlag
1118
{
1119
FlagPasswordProtected
= 1,
1120
FlagPublicLogging
= 2,
1121
FlagHidden
= 4,
1122
FlagMembersOnly
= 8,
1123
FlagModerated
= 16,
1124
FlagNonAnonymous
= 32,
1125
FlagOpen
= 64,
1126
FlagPersistent
= 128,
1127
FlagPublic
= 256,
1128
FlagSemiAnonymous
= 512,
1129
FlagTemporary
= 1024,
1130
FlagUnmoderated
= 2048,
1131
FlagUnsecured
= 4096,
1132
FlagFullyAnonymous
= 8192
1133
};
1134
1138
enum
MUCUserFlag
1139
{
1140
UserSelf
= 1,
1141
UserNickChanged
= 2,
1142
UserKicked
= 4,
1143
UserBanned
= 8,
1144
UserAffiliationChanged
= 16,
1145
UserRoomDestroyed
= 32
1146
};
1147
1151
typedef
std::list<std::string>
StringList
;
1152
1156
typedef
std::map<std::string, std::string>
StringMap
;
1157
1158
}
1159
1160
extern
"C"
1161
{
1162
GLOOX_API
const
char
* gloox_version();
1163
}
1164
1165
#endif // GLOOX_H__
Generated on Thu Jun 27 2013 13:05:48 for gloox by
1.8.1.2