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

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

class MetalinkSettings : public KConfigSkeleton
{
  public:

    static MetalinkSettings *self();
    ~MetalinkSettings() override;

    /**
      Set SimultaneousFiles
    */
    static
    void setSimultaneousFiles( int v )
    {
      if (v < 1)
      {
        qDebug() << "setSimultaneousFiles: value " << v << " is less than the minimum value of 1";
        v = 1;
      }

      if (v > 10)
      {
        qDebug() << "setSimultaneousFiles: value " << v << " is greater than the maximum value of 10";
        v = 10;
      }

      if (!self()->isSimultaneousFilesImmutable())
        self()->mSimultaneousFiles = v;
    }

    /**
      Get SimultaneousFiles
    */
    static
    int simultaneousFiles()
    {
      return self()->mSimultaneousFiles;
    }

    /**
      Is SimultaneousFiles Immutable
    */
    static
    bool isSimultaneousFilesImmutable()
    {
      return self()->isImmutable( QStringLiteral( "SimultaneousFiles" ) );
    }

    /**
      Set MirrorsPerFile
    */
    static
    void setMirrorsPerFile( int v )
    {
      if (v < 1)
      {
        qDebug() << "setMirrorsPerFile: value " << v << " is less than the minimum value of 1";
        v = 1;
      }

      if (v > 10)
      {
        qDebug() << "setMirrorsPerFile: value " << v << " is greater than the maximum value of 10";
        v = 10;
      }

      if (!self()->isMirrorsPerFileImmutable())
        self()->mMirrorsPerFile = v;
    }

    /**
      Get MirrorsPerFile
    */
    static
    int mirrorsPerFile()
    {
      return self()->mMirrorsPerFile;
    }

    /**
      Is MirrorsPerFile Immutable
    */
    static
    bool isMirrorsPerFileImmutable()
    {
      return self()->isImmutable( QStringLiteral( "MirrorsPerFile" ) );
    }

    /**
      Set ConnectionsPerUrl
    */
    static
    void setConnectionsPerUrl( int v )
    {
      if (v < 1)
      {
        qDebug() << "setConnectionsPerUrl: value " << v << " is less than the minimum value of 1";
        v = 1;
      }

      if (v > 10)
      {
        qDebug() << "setConnectionsPerUrl: value " << v << " is greater than the maximum value of 10";
        v = 10;
      }

      if (!self()->isConnectionsPerUrlImmutable())
        self()->mConnectionsPerUrl = v;
    }

    /**
      Get ConnectionsPerUrl
    */
    static
    int connectionsPerUrl()
    {
      return self()->mConnectionsPerUrl;
    }

    /**
      Is ConnectionsPerUrl Immutable
    */
    static
    bool isConnectionsPerUrlImmutable()
    {
      return self()->isImmutable( QStringLiteral( "ConnectionsPerUrl" ) );
    }

  protected:
    MetalinkSettings();
    friend class MetalinkSettingsHelper;


    // Files
    int mSimultaneousFiles;
    int mMirrorsPerFile;
    int mConnectionsPerUrl;
};

#endif

