QXmpp  Version:0.4.92
 All Classes Functions Enumerations Enumerator Properties Groups
QXmppConfiguration.h
1 /*
2  * Copyright (C) 2008-2011 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 
76  {
77  SASLPlain = 0,
81  };
82 
85  {
86  ZlibCompression = 0
87  };
88 
92  QXmppConfiguration& operator=(const QXmppConfiguration &other);
93 
94  QString host() const;
95  void setHost(const QString&);
96 
97  QString domain() const;
98  void setDomain(const QString&);
99 
100  int port() const;
101  void setPort(int);
102 
103  QString user() const;
104  void setUser(const QString&);
105 
106  QString password() const;
107  void setPassword(const QString&);
108 
109  QString resource() const;
110  void setResource(const QString&);
111 
112  QString jid() const;
113  void setJid(const QString &jid);
114 
115  QString jidBare() const;
116 
117  QString facebookAccessToken() const;
118  void setFacebookAccessToken(const QString&);
119 
120  QString facebookAppId() const;
121  void setFacebookAppId(const QString&);
122 
123  bool autoAcceptSubscriptions() const;
124  void setAutoAcceptSubscriptions(bool);
125 
126  bool autoReconnectionEnabled() const;
127  void setAutoReconnectionEnabled(bool);
128 
129  bool useSASLAuthentication() const;
130  void setUseSASLAuthentication(bool);
131 
132  bool ignoreSslErrors() const;
133  void setIgnoreSslErrors(bool);
134 
135  QXmppConfiguration::StreamSecurityMode streamSecurityMode() const;
136  void setStreamSecurityMode(QXmppConfiguration::StreamSecurityMode mode);
137 
138  QXmppConfiguration::NonSASLAuthMechanism nonSASLAuthMechanism() const;
139  void setNonSASLAuthMechanism(QXmppConfiguration::NonSASLAuthMechanism);
140 
141  QXmppConfiguration::SASLAuthMechanism sASLAuthMechanism() const;
142  void setSASLAuthMechanism(QXmppConfiguration::SASLAuthMechanism);
143 
144  QNetworkProxy networkProxy() const;
145  void setNetworkProxy(const QNetworkProxy& proxy);
146 
147  int keepAliveInterval() const;
148  void setKeepAliveInterval(int secs);
149 
150  int keepAliveTimeout() const;
151  void setKeepAliveTimeout(int secs);
152 
153  QList<QSslCertificate> caCertificates() const;
154  void setCaCertificates(const QList<QSslCertificate> &);
155 
156 private:
157  QSharedDataPointer<QXmppConfigurationPrivate> d;
158 };
159 
160 #endif // QXMPPCONFIGURATION_H