bool DeviceLockInterface::setCode(const QString &oldCode, const QString &newCode)
{
    bool return_value = runPlugin(QStringList() << "--set-code" << oldCode << newCode);
    if (return_value) {
        m_cacheRefreshNeeded = true;
        emit isSetChanged();
    }
    return return_value;
}
bool DeviceLockInterface::clearCode(const QString &currentCode)
{
    bool return_value = runPlugin(QStringList() << "--clear-code" << currentCode);
    if (return_value) {
        m_cacheRefreshNeeded = true;
        emit isSetChanged();
    }
    return return_value;
}
void DeviceLockInterface::refresh()
{
    bool wasCodeSet = m_codeSet;
    m_codeSet = runPlugin(QStringList() << "--is-set" << "lockcode");
    m_cacheRefreshNeeded = false;

    if (wasCodeSet != m_codeSet) {
        emit isSetChanged();
    }
}