fix compilation with TOKEN_AUTH_ONLY

This commit is contained in:
Olivier Goffart 2016-02-05 15:30:29 +01:00
parent b0acc475b0
commit 54a278edb9
5 changed files with 15 additions and 8 deletions

View file

@ -67,11 +67,16 @@ set(libsync_SRCS
creds/dummycredentials.cpp
creds/abstractcredentials.cpp
creds/credentialscommon.cpp
creds/httpcredentials.cpp
../3rdparty/qjson/json.cpp
../3rdparty/certificates/p12topem.cpp
)
if(TOKEN_AUTH_ONLY)
set (libsync_SRCS ${libsync_SRCS} creds/tokencredentials.cpp)
else()
set (libsync_SRCS ${libsync_SRCS} creds/httpcredentials.cpp)
endif()
# These headers are installed for libowncloudsync to be used by 3rd party apps
set(owncloudsync_HEADERS
account.h

View file

@ -24,10 +24,6 @@
#include "accessmanager.h"
#include "utility.h"
#include <QInputDialog>
#include <QMutexLocker>
#include <QApplication>
namespace OCC
{

View file

@ -17,7 +17,6 @@
#include <QDebug>
#include <QNetworkReply>
#include <QSettings>
#include <QInputDialog>
#include <keychain.h>

View file

@ -121,11 +121,17 @@ bool TokenCredentials::ready() const
return _ready;
}
void TokenCredentials::fetch()
void TokenCredentials::fetchFromKeychain()
{
Q_EMIT fetched();
}
void TokenCredentials::askFromUser()
{
emit asked();
}
bool TokenCredentials::stillValid(QNetworkReply *reply)
{
return ((reply->error() != QNetworkReply::AuthenticationRequiredError)

View file

@ -44,7 +44,8 @@ public:
QString authType() const Q_DECL_OVERRIDE;
QNetworkAccessManager* getQNAM() const Q_DECL_OVERRIDE;
bool ready() const Q_DECL_OVERRIDE;
void fetch() Q_DECL_OVERRIDE;
void askFromUser() Q_DECL_OVERRIDE;
void fetchFromKeychain() Q_DECL_OVERRIDE;
bool stillValid(QNetworkReply *reply) Q_DECL_OVERRIDE;
void persist() Q_DECL_OVERRIDE;
QString user() const Q_DECL_OVERRIDE;