aboutsummaryrefslogtreecommitdiff
path: root/source/QXmppConfiguration.h
diff options
context:
space:
mode:
authorManjeet Dahiya <manjeetdahiya@gmail.com>2009-10-21 08:33:09 +0000
committerManjeet Dahiya <manjeetdahiya@gmail.com>2009-10-21 08:33:09 +0000
commit2fe5cfecf1d3cf7877fcb609b603add501db8732 (patch)
treebd0108c8d6583df57f77401bd2218539060b7487 /source/QXmppConfiguration.h
parent5b4e1339866db3be97b00ee11cd19dfa0596efe1 (diff)
downloadqxmpp-2fe5cfecf1d3cf7877fcb609b603add501db8732.tar.gz
Fix for Issue 17: Authentication and stream security configuration options
Diffstat (limited to 'source/QXmppConfiguration.h')
-rw-r--r--source/QXmppConfiguration.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/source/QXmppConfiguration.h b/source/QXmppConfiguration.h
index fad1de79..03391a50 100644
--- a/source/QXmppConfiguration.h
+++ b/source/QXmppConfiguration.h
@@ -30,6 +30,35 @@
class QXmppConfiguration
{
public:
+ /// An enumeration for type of the Security Mode that is stream is encrypted or not.
+ /// The server may or may not have TLS feature. Server may force the encryption.
+ /// Depending upon all this user can specify following options.
+ enum StreamSecurityMode
+ {
+ TLSEnabled = 0, ///< Default, encryption is used if available
+ TLSDisabled, ///< No encryption is server allows
+ TLSRequired ///< Encryption is a must otherwise connection would not
+ ///< be established
+ };
+
+ /// An enumeration for various Non-SASL authentication mechanisms available.
+ /// The server may or may not allow QXmppConfiguration::Plain mechanism. So
+ /// specifying the mechanism is just a hint to the library.
+ enum NonSASLAuthMechanism
+ {
+ NonSASLPlain = 0,///< Plain
+ NonSASLDigest ///< Default,
+ };
+
+ /// An enumeration for various SASL authentication mechanisms available.
+ /// The server may or may not allow any particular mechanism. So depending
+ /// upon the availability of mechanisms on the server the library will choose
+ /// a mechanism.
+ enum SASLAuthMechanism
+ {
+ SASLPlain = 0 ///< Default
+ };
+
QXmppConfiguration();
~QXmppConfiguration();
@@ -59,6 +88,17 @@ public:
bool getUseSASLAuthentication() const;
void setUseSASLAuthentication(bool);
+ QXmppConfiguration::StreamSecurityMode getStreamSecurityMode() const;
+ void setStreamSecurityMode(QXmppConfiguration::StreamSecurityMode mode);
+
+ QXmppConfiguration::NonSASLAuthMechanism QXmppConfiguration::
+ getNonSASLAuthMechanism() const;
+ void setNonSASLAuthMechanism(QXmppConfiguration::NonSASLAuthMechanism);
+
+ QXmppConfiguration::SASLAuthMechanism QXmppConfiguration::
+ getSASLAuthMechanism() const;
+ void setSASLAuthMechanism(QXmppConfiguration::SASLAuthMechanism);
+
private:
QString m_host;
int m_port;
@@ -81,6 +121,10 @@ private:
///< to be used
///< defualt is true and use SASL
///< false would use NonSASL if available
+
+ StreamSecurityMode m_streamSecurityMode;
+ NonSASLAuthMechanism m_nonSASLAuthMechanism;
+ SASLAuthMechanism m_SASLAuthMechanism;
};
#endif // QXMPPCONFIGURATION_H