// This file is generated by kconfig_compiler_kf6 from krdpserversettings.kcfg.
// All changes you do to this file will be lost.
#ifndef KRDPSERVERSETTINGS_H
#define KRDPSERVERSETTINGS_H

#include <qglobal.h>
#include <kconfigskeleton.h>
#include <QCoreApplication>
#include <QDebug>

class KRDPServerSettings : public KConfigSkeleton
{
  Q_OBJECT
  public:

    KRDPServerSettings( QObject *parent = nullptr );
    ~KRDPServerSettings() override;

    /**
      Set The port the server listens on
    */
    void setListenPort( int v )
    {
      if (v != mListenPort && !isListenPortImmutable()) {
        mListenPort = v;
        Q_EMIT ListenPortChanged();
      }
    }

    Q_PROPERTY(int listenPort READ listenPort WRITE setListenPort NOTIFY ListenPortChanged)
    Q_PROPERTY(bool isListenPortImmutable READ isListenPortImmutable CONSTANT)
    Q_PROPERTY(int defaultListenPortValue READ defaultListenPortValue CONSTANT)
    /**
      Get The port the server listens on
    */
    int listenPort() const
    {
      return mListenPort;
    }

    /**
      Is The port the server listens on Immutable
    */
    bool isListenPortImmutable() const
    {
      return isImmutable( QStringLiteral( "ListenPort" ) );
    }

    /**
      Get The port the server listens on default value
    */
    int defaultListenPortValue() const
    {
        return defaultListenPortValue_helper();
    }

    /**
      Set Are certificates autogenerated during server start
    */
    void setAutogenerateCertificates( bool v )
    {
      if (v != mAutogenerateCertificates && !isAutogenerateCertificatesImmutable()) {
        mAutogenerateCertificates = v;
        Q_EMIT AutogenerateCertificatesChanged();
      }
    }

    Q_PROPERTY(bool autogenerateCertificates READ autogenerateCertificates WRITE setAutogenerateCertificates NOTIFY AutogenerateCertificatesChanged)
    Q_PROPERTY(bool isAutogenerateCertificatesImmutable READ isAutogenerateCertificatesImmutable CONSTANT)
    Q_PROPERTY(bool defaultAutogenerateCertificatesValue READ defaultAutogenerateCertificatesValue CONSTANT)
    /**
      Get Are certificates autogenerated during server start
    */
    bool autogenerateCertificates() const
    {
      return mAutogenerateCertificates;
    }

    /**
      Is Are certificates autogenerated during server start Immutable
    */
    bool isAutogenerateCertificatesImmutable() const
    {
      return isImmutable( QStringLiteral( "AutogenerateCertificates" ) );
    }

    /**
      Get Are certificates autogenerated during server start default value
    */
    bool defaultAutogenerateCertificatesValue() const
    {
        return defaultAutogenerateCertificatesValue_helper();
    }

    /**
      Set The certificate to use for TLS connections
    */
    void setCertificate( const QString & v )
    {
      if (v != mCertificate && !isCertificateImmutable()) {
        mCertificate = v;
        Q_EMIT CertificateChanged();
      }
    }

    Q_PROPERTY(QString certificate READ certificate WRITE setCertificate NOTIFY CertificateChanged)
    Q_PROPERTY(bool isCertificateImmutable READ isCertificateImmutable CONSTANT)
    /**
      Get The certificate to use for TLS connections
    */
    QString certificate() const
    {
      return mCertificate;
    }

    /**
      Is The certificate to use for TLS connections Immutable
    */
    bool isCertificateImmutable() const
    {
      return isImmutable( QStringLiteral( "Certificate" ) );
    }

    /**
      Set The key that matches the TLS certificate
    */
    void setCertificateKey( const QString & v )
    {
      if (v != mCertificateKey && !isCertificateKeyImmutable()) {
        mCertificateKey = v;
        Q_EMIT CertificateKeyChanged();
      }
    }

    Q_PROPERTY(QString certificateKey READ certificateKey WRITE setCertificateKey NOTIFY CertificateKeyChanged)
    Q_PROPERTY(bool isCertificateKeyImmutable READ isCertificateKeyImmutable CONSTANT)
    /**
      Get The key that matches the TLS certificate
    */
    QString certificateKey() const
    {
      return mCertificateKey;
    }

    /**
      Is The key that matches the TLS certificate Immutable
    */
    bool isCertificateKeyImmutable() const
    {
      return isImmutable( QStringLiteral( "CertificateKey" ) );
    }

    /**
      Set The quality of the video stream
    */
    void setQuality( int v )
    {
      if (v != mQuality && !isQualityImmutable()) {
        mQuality = v;
        Q_EMIT QualityChanged();
      }
    }

    Q_PROPERTY(int quality READ quality WRITE setQuality NOTIFY QualityChanged)
    Q_PROPERTY(bool isQualityImmutable READ isQualityImmutable CONSTANT)
    Q_PROPERTY(int defaultQualityValue READ defaultQualityValue CONSTANT)
    /**
      Get The quality of the video stream
    */
    int quality() const
    {
      return mQuality;
    }

    /**
      Is The quality of the video stream Immutable
    */
    bool isQualityImmutable() const
    {
      return isImmutable( QStringLiteral( "Quality" ) );
    }

    /**
      Get The quality of the video stream default value
    */
    int defaultQualityValue() const
    {
        return defaultQualityValue_helper();
    }

    /**
      Set Users allowed to login, passwords are stored in KWallet
    */
    void setUsers( const QStringList & v )
    {
      if (v != mUsers && !isUsersImmutable()) {
        mUsers = v;
        Q_EMIT UsersChanged();
      }
    }

    Q_PROPERTY(QStringList users READ users WRITE setUsers NOTIFY UsersChanged)
    Q_PROPERTY(bool isUsersImmutable READ isUsersImmutable CONSTANT)
    /**
      Get Users allowed to login, passwords are stored in KWallet
    */
    QStringList users() const
    {
      return mUsers;
    }

    /**
      Is Users allowed to login, passwords are stored in KWallet Immutable
    */
    bool isUsersImmutable() const
    {
      return isImmutable( QStringLiteral( "Users" ) );
    }

    /**
      Set Whether the current user can log in via PAM
    */
    void setSystemUserEnabled( bool v )
    {
      if (v != mSystemUserEnabled && !isSystemUserEnabledImmutable()) {
        mSystemUserEnabled = v;
        Q_EMIT SystemUserEnabledChanged();
      }
    }

    Q_PROPERTY(bool systemUserEnabled READ systemUserEnabled WRITE setSystemUserEnabled NOTIFY SystemUserEnabledChanged)
    Q_PROPERTY(bool isSystemUserEnabledImmutable READ isSystemUserEnabledImmutable CONSTANT)
    Q_PROPERTY(bool defaultSystemUserEnabledValue READ defaultSystemUserEnabledValue CONSTANT)
    /**
      Get Whether the current user can log in via PAM
    */
    bool systemUserEnabled() const
    {
      return mSystemUserEnabled;
    }

    /**
      Is Whether the current user can log in via PAM Immutable
    */
    bool isSystemUserEnabledImmutable() const
    {
      return isImmutable( QStringLiteral( "SystemUserEnabled" ) );
    }

    /**
      Get Whether the current user can log in via PAM default value
    */
    bool defaultSystemUserEnabledValue() const
    {
        return defaultSystemUserEnabledValue_helper();
    }

    /**
      Set Autostart the server on login
    */
    void setAutostart( bool v )
    {
      if (v != mAutostart && !isAutostartImmutable()) {
        mAutostart = v;
        Q_EMIT AutostartChanged();
      }
    }

    Q_PROPERTY(bool autostart READ autostart WRITE setAutostart NOTIFY AutostartChanged)
    Q_PROPERTY(bool isAutostartImmutable READ isAutostartImmutable CONSTANT)
    Q_PROPERTY(bool defaultAutostartValue READ defaultAutostartValue CONSTANT)
    /**
      Get Autostart the server on login
    */
    bool autostart() const
    {
      return mAutostart;
    }

    /**
      Is Autostart the server on login Immutable
    */
    bool isAutostartImmutable() const
    {
      return isImmutable( QStringLiteral( "Autostart" ) );
    }

    /**
      Get Autostart the server on login default value
    */
    bool defaultAutostartValue() const
    {
        return defaultAutostartValue_helper();
    }


    enum {
      signalListenPortChanged = 1,
      signalAutogenerateCertificatesChanged = 2,
      signalCertificateChanged = 3,
      signalCertificateKeyChanged = 4,
      signalQualityChanged = 5,
      signalUsersChanged = 6,
      signalSystemUserEnabledChanged = 7,
      signalAutostartChanged = 8
    };

  Q_SIGNALS:
    void ListenPortChanged();

    void AutogenerateCertificatesChanged();

    void CertificateChanged();

    void CertificateKeyChanged();

    void QualityChanged();

    void UsersChanged();

    void SystemUserEnabledChanged();

    void AutostartChanged();

  private:
    void itemChanged(quint64 signalFlag);

  protected:

    // General
    int mListenPort;
    int defaultListenPortValue_helper() const;
    bool mAutogenerateCertificates;
    bool defaultAutogenerateCertificatesValue_helper() const;
    QString mCertificate;
    QString defaultCertificateValue_helper() const;
    QString mCertificateKey;
    QString defaultCertificateKeyValue_helper() const;
    int mQuality;
    int defaultQualityValue_helper() const;
    QStringList mUsers;
    QStringList defaultUsersValue_helper() const;
    bool mSystemUserEnabled;
    bool defaultSystemUserEnabledValue_helper() const;
    bool mAutostart;
    bool defaultAutostartValue_helper() const;
};

#endif

