2013-06-06 04:57:06 +01:00
|
|
|
/**
|
2020-08-17 10:48:10 +01:00
|
|
|
* SPDX-FileCopyrightText: 2013 Albert Vaca <albertvaka@gmail.com>
|
2013-06-06 04:57:06 +01:00
|
|
|
*
|
2020-08-17 10:48:10 +01:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
2013-06-06 04:57:06 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "devicelink.h"
|
2015-03-02 04:16:07 +00:00
|
|
|
#include "kdeconnectconfig.h"
|
2013-09-09 17:35:56 +01:00
|
|
|
#include "linkprovider.h"
|
2013-06-06 04:57:06 +01:00
|
|
|
|
2022-09-10 22:23:52 +01:00
|
|
|
DeviceLink::DeviceLink(const QString &deviceId, LinkProvider *parent)
|
2013-07-03 02:52:44 +01:00
|
|
|
: QObject(parent)
|
2017-09-03 20:39:44 +01:00
|
|
|
, m_deviceId(deviceId)
|
|
|
|
, m_linkProvider(parent)
|
|
|
|
, m_pairStatus(NotPaired)
|
2013-06-18 02:05:32 +01:00
|
|
|
{
|
2014-04-15 19:14:22 +01:00
|
|
|
Q_ASSERT(!deviceId.isEmpty());
|
|
|
|
|
|
|
|
setProperty("deviceId", deviceId);
|
2013-09-09 17:35:56 +01:00
|
|
|
}
|
|
|
|
|
2015-12-01 18:45:14 +00:00
|
|
|
void DeviceLink::setPairStatus(DeviceLink::PairStatus status)
|
|
|
|
{
|
2017-09-03 20:39:44 +01:00
|
|
|
if (m_pairStatus != status) {
|
|
|
|
m_pairStatus = status;
|
2015-12-01 18:45:14 +00:00
|
|
|
Q_EMIT pairStatusChanged(status);
|
|
|
|
}
|
|
|
|
}
|