[OpenDocString] kdeconnect-kde (cpp)
devicelink.cpp
DeviceLink::DeviceLink(const QString &deviceId, LinkProvider *parent)
    : QObject(parent)
    , m_deviceId(deviceId)
    , m_linkProvider(parent)
    , m_pairStatus(NotPaired)
{
    Q_ASSERT(!deviceId.isEmpty());

    setProperty("deviceId", deviceId);
}
This constructs a device link object from an id and a link provider. It takes the device id and link provider pointer and sets the device id property to its internal value.
void DeviceLink::setPairStatus(DeviceLink::PairStatus status)
{
    if (m_pairStatus != status) {
        m_pairStatus = status;
        Q_EMIT pairStatusChanged(status);
    }
}
Sets the pair status on the device link object. If the status has changed, it will emit a signal called pairStatusChanged with the status.