// This file is generated by kconfig_compiler_kf5 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 Q_DECL_EXPORT MetalinkSettings : public KConfigSkeleton
{
  public:

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

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

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

      if (!self()->isImmutable( QStringLiteral( "SimultanousFiles" ) ))
        self()->mSimultanousFiles = v;
    }

    /**
      Get SimultanousFiles
    */
    static
    int simultanousFiles()
    {
      return self()->mSimultanousFiles;
    }

    /**
      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()->isImmutable( QStringLiteral( "MirrorsPerFile" ) ))
        self()->mMirrorsPerFile = v;
    }

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

    /**
      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()->isImmutable( QStringLiteral( "ConnectionsPerUrl" ) ))
        self()->mConnectionsPerUrl = v;
    }

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

  protected:
    MetalinkSettings();
    friend class MetalinkSettingsHelper;


    // Files
    int mSimultanousFiles;
    int mMirrorsPerFile;
    int mConnectionsPerUrl;

  private:
};

#endif

