nextcloud-desktop/src/mirall/owncloudsetupwizard.h

77 lines
2.2 KiB
C
Raw Normal View History

2011-09-30 19:42:28 +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 OWNCLOUDSETUPWIZARD_H
#define OWNCLOUDSETUPWIZARD_H
#include <QObject>
#include <QWidget>
#include <QProcess>
#include <QNetworkReply>
#include <QPointer>
2012-03-26 17:19:40 +04:00
#include "mirall/theme.h"
namespace Mirall {
class OwncloudWizard;
class OwncloudSetupWizard : public QObject
{
Q_OBJECT
public:
/** Run the wizard */
static void runWizard(QObject *obj, const char* amember, QWidget *parent = 0 );
signals:
2012-04-12 13:37:48 +04:00
// overall dialog close signal.
void ownCloudWizardDone( int );
private slots:
void slotDetermineAuthType(const QString&);
void slotOwnCloudFoundAuth(const QString&, const QString&, const QString&, const QString&);
void slotAuthCheckReplyFinished();
void slotNoOwnCloudFoundAuth(QNetworkReply*);
2012-12-04 20:27:59 +04:00
void slotConnectToOCUrl(const QString&);
void slotConnectionCheck(const QString&, QNetworkReply*);
void slotCreateLocalAndRemoteFolders(const QString&, const QString&);
void slotAuthCheckReply(const QString&, QNetworkReply*);
void slotCreateRemoteFolderFinished(QNetworkReply::NetworkError);
void slotAssistantFinished( int );
void slotClearPendingRequests();
private:
explicit OwncloudSetupWizard(QObject *parent = 0 );
~OwncloudSetupWizard();
void startWizard();
2012-04-12 13:37:48 +04:00
void testOwnCloudConnect();
void checkRemoteFolder(const QString& remoteFolder);
bool createRemoteFolder();
void finalizeSetup( bool );
OwncloudWizard* _ocWizard;
QPointer<QNetworkReply> _mkdirRequestReply;
QPointer<QNetworkReply> _checkInstallationRequest;
2013-04-28 00:24:32 +04:00
QPointer<QNetworkReply> _checkRemoteFolderRequest;
QString _configHandle;
QString _remoteFolder;
};
}
#endif // OWNCLOUDSETUPWIZARD_H