[Pkg-owncloud-commits] [owncloud-client] 51/159: Remove unused HttpConfigFile.
Sandro Knauß
hefee-guest at moszumanska.debian.org
Fri May 1 13:05:21 UTC 2015
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit ba0c3256faec633fbb81a665fad88061b254e951
Author: Christian Kamm <kamm at incasoftware.de>
Date: Fri Mar 27 13:19:17 2015 +0100
Remove unused HttpConfigFile.
---
src/libsync/CMakeLists.txt | 1 -
src/libsync/creds/http/httpconfigfile.cpp | 81 -------------------------------
src/libsync/creds/http/httpconfigfile.h | 44 -----------------
3 files changed, 126 deletions(-)
diff --git a/src/libsync/CMakeLists.txt b/src/libsync/CMakeLists.txt
index 28e4c3c..e926f1b 100644
--- a/src/libsync/CMakeLists.txt
+++ b/src/libsync/CMakeLists.txt
@@ -64,7 +64,6 @@ set(libsync_SRCS
creds/dummycredentials.cpp
creds/abstractcredentials.cpp
creds/credentialsfactory.cpp
- creds/http/httpconfigfile.cpp
creds/credentialscommon.cpp
../3rdparty/qjson/json.cpp
../3rdparty/certificates/p12topem.cpp
diff --git a/src/libsync/creds/http/httpconfigfile.cpp b/src/libsync/creds/http/httpconfigfile.cpp
deleted file mode 100644
index 4066b3a..0000000
--- a/src/libsync/creds/http/httpconfigfile.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (C) by Krzesimir Nowak <krzesimir at endocode.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; version 2 of the License.
- *
- * 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.
- */
-
-#include "creds/http/httpconfigfile.h"
-
-namespace OCC
-{
-
-namespace
-{
-
-const char userC[] = "user";
-const char passwdC[] = "passwd";
-const char oldPasswdC[] = "password";
-
-} // ns
-
-QString HttpConfigFile::user() const
-{
- return retrieveData(QString(), QLatin1String(userC)).toString();
-}
-
-void HttpConfigFile::setUser(const QString& user)
-{
- storeData(QString(), QLatin1String(userC), QVariant(user));
-}
-
-QString HttpConfigFile::password() const
-{
- const QVariant passwd(retrieveData(QString(), QLatin1String(passwdC)));
-
- if (passwd.isValid()) {
- return QString::fromUtf8(QByteArray::fromBase64(passwd.toByteArray()));
- }
-
- return QString();
-}
-
-void HttpConfigFile::setPassword(const QString& password)
-{
- QByteArray pwdba = password.toUtf8();
- storeData( QString(), QLatin1String(passwdC), QVariant(pwdba.toBase64()) );
- removeOldPassword();
-}
-
-bool HttpConfigFile::passwordExists() const
-{
- return dataExists(QString(), QLatin1String(passwdC));
-}
-
-void HttpConfigFile::removePassword()
-{
- removeOldPassword();
- removeData(QString(), QLatin1String(passwdC));
-}
-
-void HttpConfigFile::fixupOldPassword()
-{
- const QString old(QString::fromLatin1(oldPasswdC));
-
- if (dataExists(QString(), old)) {
- setPassword(retrieveData(QString(), old).toString());
- }
-}
-
-void HttpConfigFile::removeOldPassword()
-{
- removeData(QString(), QLatin1String(oldPasswdC));
-}
-
-} // namespace OCC
diff --git a/src/libsync/creds/http/httpconfigfile.h b/src/libsync/creds/http/httpconfigfile.h
deleted file mode 100644
index 7d2773f..0000000
--- a/src/libsync/creds/http/httpconfigfile.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) by Krzesimir Nowak <krzesimir at endocode.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; version 2 of the License.
- *
- * 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 MIRALL_CREDS_HTTP_CONFIG_FILE_H
-#define MIRALL_CREDS_HTTP_CONFIG_FILE_H
-
-#include "configfile.h"
-
-namespace OCC
-{
-
-class HttpConfigFile : public ConfigFile
-{
-public:
- QString user() const;
- void setUser(const QString& user);
-
- QString password() const;
- void setPassword(const QString& password);
- bool passwordExists() const;
- void removePassword();
- void fixupOldPassword();
- QString certificatePath() const;
- void setCertificatePath(const QString& cPath);
- QString certificatePasswd() const;
- void setCertificatePasswd(const QString& cPasswd);
-
-private:
- void removeOldPassword();
-};
-
-} // namespace OCC
-
-#endif
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list