1 /*
2     SPDX-FileCopyrightText: 2015-2018 Krzysztof Nowicki <krissn@op.pl>
3 
4     SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #include "ewsclient.h"
8 
9 #include "auth/ewsabstractauth.h"
10 #include "ewsclient_debug.h"
11 
12 QHash<QString, QString> EwsClient::folderHash;
13 
EwsClient(QObject * parent)14 EwsClient::EwsClient(QObject *parent)
15     : QObject(parent)
16     , mEnableNTLMv2(true)
17 {
18 }
19 
~EwsClient()20 EwsClient::~EwsClient()
21 {
22 }
23 
setServerVersion(const EwsServerVersion & version)24 void EwsClient::setServerVersion(const EwsServerVersion &version)
25 {
26     if (mServerVersion.isValid() && mServerVersion != version) {
27         qCWarning(EWSCLI_LOG) << "Warning - server version changed." << mServerVersion << version;
28     }
29     mServerVersion = version;
30 }
31 
url() const32 QUrl EwsClient::url() const
33 {
34     return mUrl;
35 }
36 
setAuth(EwsAbstractAuth * auth)37 void EwsClient::setAuth(EwsAbstractAuth *auth)
38 {
39     mAuth = auth;
40 }
41 
auth() const42 EwsAbstractAuth *EwsClient::auth() const
43 {
44     return mAuth.data();
45 }
46