2011-10-05 19:49:03 +04:00
|
|
|
/*
|
|
|
|
* Copyright (C) by Klaas Freitag <freitag@kde.org>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
* for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef OWNCLOUDINFO_H
|
|
|
|
#define OWNCLOUDINFO_H
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QNetworkReply>
|
|
|
|
|
|
|
|
namespace Mirall
|
|
|
|
{
|
|
|
|
|
|
|
|
class ownCloudInfo : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2012-02-17 18:54:39 +04:00
|
|
|
explicit ownCloudInfo( const QString& = QString(), QObject *parent = 0);
|
2011-10-05 19:49:03 +04:00
|
|
|
|
|
|
|
bool isConfigured();
|
|
|
|
|
|
|
|
void checkInstallation();
|
|
|
|
|
|
|
|
signals:
|
2012-02-17 18:54:39 +04:00
|
|
|
// result signal with url- and version string.
|
2011-10-05 19:49:03 +04:00
|
|
|
void ownCloudInfoFound( const QString&, const QString& );
|
2012-02-17 18:54:39 +04:00
|
|
|
void noOwncloudFound( QNetworkReply::NetworkError );
|
2011-10-05 19:49:03 +04:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
protected slots:
|
|
|
|
void slotReplyFinished( QNetworkReply* );
|
|
|
|
void slotReadyRead();
|
|
|
|
void slotError( QNetworkReply::NetworkError );
|
2011-10-06 18:55:28 +04:00
|
|
|
void slotAuthentication( QNetworkReply*, QAuthenticator *);
|
2011-10-05 19:49:03 +04:00
|
|
|
private:
|
|
|
|
QNetworkReply *_reply;
|
|
|
|
QByteArray _readBuffer;
|
2012-02-17 18:54:39 +04:00
|
|
|
QString _connection;
|
2011-10-05 19:49:03 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // OWNCLOUDINFO_H
|