Missing license file
This commit is contained in:
parent
11b86359fd
commit
78597637e7
1 changed files with 29 additions and 8 deletions
|
@ -1,5 +1,32 @@
|
|||
/**
|
||||
* Copyright 2013 Albert Vaca <albertvaka@gmail.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) version 3 or any later version
|
||||
* accepted by the membership of KDE e.V. (or its successor approved
|
||||
* by the membership of KDE e.V.), which shall act as a proxy
|
||||
* defined in Section 14 of version 3 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "device.h"
|
||||
|
||||
#ifdef interface // MSVC language extension, QDBusConnection uses this as a variable name
|
||||
#undef interface
|
||||
#endif
|
||||
|
||||
#include <QDBusConnection>
|
||||
#include <QFile>
|
||||
|
||||
#include <KSharedConfig>
|
||||
#include <KConfigGroup>
|
||||
#include <KStandardDirs>
|
||||
|
@ -15,12 +42,6 @@
|
|||
#include "backends/linkprovider.h"
|
||||
#include "networkpackage.h"
|
||||
|
||||
#ifdef interface // MSVC language extension, QDBusConnection uses this as a variable name
|
||||
#undef interface
|
||||
#endif
|
||||
#include <QDBusConnection>
|
||||
#include <QFile>
|
||||
|
||||
Device::Device(QObject* parent, const QString& id)
|
||||
: QObject(parent)
|
||||
, m_deviceId(id)
|
||||
|
@ -36,7 +57,7 @@ Device::Device(QObject* parent, const QString& id)
|
|||
const QString& key = data.readEntry<QString>("publicKey", QString());
|
||||
m_publicKey = QCA::RSAPublicKey::fromPEM(key);
|
||||
|
||||
//TODO: It is redundant to have our own private key in every instance of Device, move this to a signleton somewhere (Daemon?)
|
||||
//TODO: It is redundant to have our own private key in every instance of Device, move this to a singleton somewhere (Daemon?)
|
||||
const QString privateKeyPath = KStandardDirs::locateLocal("appdata", "key.pem", true, KComponentData("kdeconnect", "kdeconnect"));
|
||||
QFile privKey(privateKeyPath);
|
||||
privKey.open(QIODevice::ReadOnly);
|
||||
|
@ -54,7 +75,7 @@ Device::Device(QObject* parent, const NetworkPackage& identityPackage, DeviceLin
|
|||
, m_pairStatus(Device::NotPaired)
|
||||
, m_protocolVersion(identityPackage.get<int>("protocolVersion"))
|
||||
{
|
||||
//TODO: It is redundant to have our own private key in every instance of Device, move this to a signleton somewhere (Daemon?)
|
||||
//TODO: It is redundant to have our own private key in every instance of Device, move this to a singleton somewhere (Daemon?)
|
||||
const QString privateKeyPath = KStandardDirs::locateLocal("appdata", "key.pem", true, KComponentData("kdeconnect", "kdeconnect"));
|
||||
QFile privKey(privateKeyPath);
|
||||
privKey.open(QIODevice::ReadOnly);
|
||||
|
|
Loading…
Reference in a new issue