2012-02-17 14:11:18 +04:00
|
|
|
/*
|
|
|
|
* Copyright (C) by Klaas Freitag <freitag@owncloud.com>
|
|
|
|
*
|
|
|
|
* 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 MIRALLCONFIGFILE_H
|
|
|
|
#define MIRALLCONFIGFILE_H
|
|
|
|
|
|
|
|
namespace Mirall {
|
|
|
|
|
|
|
|
|
|
|
|
class MirallConfigFile
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
MirallConfigFile();
|
|
|
|
|
2012-03-28 13:26:51 +04:00
|
|
|
QString configPath() const;
|
2012-03-28 14:23:34 +04:00
|
|
|
QString configFile() const;
|
|
|
|
QString excludeFile() const;
|
|
|
|
|
2012-02-17 14:11:18 +04:00
|
|
|
bool exists();
|
2012-02-18 20:02:10 +04:00
|
|
|
|
2012-02-17 18:54:39 +04:00
|
|
|
bool connectionExists( const QString& = QString() );
|
2012-02-18 20:02:10 +04:00
|
|
|
QString defaultConnection() const;
|
2012-02-17 14:11:18 +04:00
|
|
|
|
|
|
|
void writeOwncloudConfig( const QString& connection,
|
|
|
|
const QString& url,
|
|
|
|
const QString& user,
|
|
|
|
const QString& passwd );
|
2012-02-18 20:02:10 +04:00
|
|
|
|
2012-02-17 18:54:39 +04:00
|
|
|
void removeConnection( const QString& connection = QString() );
|
2012-02-17 14:11:18 +04:00
|
|
|
|
2012-02-18 20:02:10 +04:00
|
|
|
QString ownCloudUrl( const QString& connection = QString(), bool webdav = false ) const;
|
2012-02-17 14:11:18 +04:00
|
|
|
|
|
|
|
QString ownCloudUser( const QString& connection = QString() ) const;
|
|
|
|
|
|
|
|
QString ownCloudPasswd( const QString& connection = QString() ) const;
|
2012-02-18 20:02:10 +04:00
|
|
|
|
|
|
|
QByteArray basicAuthHeader() const;
|
2012-02-17 14:11:18 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
#endif // MIRALLCONFIGFILE_H
|