QXmpp  Version:0.8.0
 All Classes Functions Variables Enumerations Enumerator Properties Groups
QXmppConfiguration.h
1 /*
2  * Copyright (C) 2008-2014 The QXmpp developers
3  *
4  * Author:
5  * Manjeet Dahiya
6  *
7  * Source:
8  * http://code.google.com/p/qxmpp
9  *
10  * This file is a part of QXmpp library.
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * Lesser General Public License for more details.
21  *
22  */
23 
24 
25 #ifndef QXMPPCONFIGURATION_H
26 #define QXMPPCONFIGURATION_H
27 
28 #include <QString>
29 #include <QSharedDataPointer>
30 
31 #include "QXmppGlobal.h"
32 
33 class QNetworkProxy;
34 class QSslCertificate;
35 class QXmppConfigurationPrivate;
36 
47 
48 class QXMPP_EXPORT QXmppConfiguration
49 {
50 public:
55  {
56  TLSEnabled = 0,
58  TLSRequired
59 
60  };
61 
66  {
67  NonSASLPlain = 0,
68  NonSASLDigest
69  };
70 
75 
79  QXmppConfiguration& operator=(const QXmppConfiguration &other);
80 
81  QString host() const;
82  void setHost(const QString&);
83 
84  QString domain() const;
85  void setDomain(const QString&);
86 
87  int port() const;
88  void setPort(int);
89 
90  QString user() const;
91  void setUser(const QString&);
92 
93  QString password() const;
94  void setPassword(const QString&);
95 
96  QString resource() const;
97  void setResource(const QString&);
98 
99  QString jid() const;
100  void setJid(const QString &jid);
101 
102  QString jidBare() const;
103 
104  QString facebookAccessToken() const;
105  void setFacebookAccessToken(const QString&);
106 
107  QString facebookAppId() const;
108  void setFacebookAppId(const QString&);
109 
110  QString googleAccessToken() const;
111  void setGoogleAccessToken(const QString &accessToken);
112 
113  QString windowsLiveAccessToken() const;
114  void setWindowsLiveAccessToken(const QString &accessToken);
115 
116  bool autoAcceptSubscriptions() const;
117  void setAutoAcceptSubscriptions(bool);
118 
119  bool autoReconnectionEnabled() const;
120  void setAutoReconnectionEnabled(bool);
121 
122  bool useSASLAuthentication() const;
123  void setUseSASLAuthentication(bool);
124 
125  bool useNonSASLAuthentication() const;
126  void setUseNonSASLAuthentication(bool);
127 
128  bool ignoreSslErrors() const;
129  void setIgnoreSslErrors(bool);
130 
131  QXmppConfiguration::StreamSecurityMode streamSecurityMode() const;
132  void setStreamSecurityMode(QXmppConfiguration::StreamSecurityMode mode);
133 
134  QXmppConfiguration::NonSASLAuthMechanism nonSASLAuthMechanism() const;
135  void setNonSASLAuthMechanism(QXmppConfiguration::NonSASLAuthMechanism);
136 
137  QString saslAuthMechanism() const;
138  void setSaslAuthMechanism(const QString &mechanism);
139 
140  QNetworkProxy networkProxy() const;
141  void setNetworkProxy(const QNetworkProxy& proxy);
142 
143  int keepAliveInterval() const;
144  void setKeepAliveInterval(int secs);
145 
146  int keepAliveTimeout() const;
147  void setKeepAliveTimeout(int secs);
148 
149  QList<QSslCertificate> caCertificates() const;
150  void setCaCertificates(const QList<QSslCertificate> &);
151 
152 private:
153  QSharedDataPointer<QXmppConfigurationPrivate> d;
154 };
155 
156 #endif // QXMPPCONFIGURATION_H