// This file is generated by kconfig_compiler_kf6 from libkcddb5.kcfg.
// All changes you do to this file will be lost.

#include "configbase.h"

class ConfigBasePrivate
{
  public:

    // Lookup
    QString hostname;
    int port;
    bool musicBrainzLookupEnabled;
    bool freedbLookupEnabled;
    bool cacheLookupEnabled;
    int freedbLookupTransport;
    QStringList cacheLocations;

    // Submit
    QString emailAddress;
    QString httpSubmitServer;
    int httpSubmitPort;

    // items
    KConfigSkeleton::ItemString *itemHostname;
    KConfigSkeleton::ItemInt *itemPort;
    KConfigSkeleton::ItemBool *itemMusicBrainzLookupEnabled;
    KConfigSkeleton::ItemBool *itemFreedbLookupEnabled;
    KConfigSkeleton::ItemBool *itemCacheLookupEnabled;
    KConfigSkeleton::ItemEnum *itemFreedbLookupTransport;
    KConfigSkeleton::ItemPathList *itemCacheLocations;
    KConfigSkeleton::ItemString *itemEmailAddress;
    KConfigSkeleton::ItemString *itemHttpSubmitServer;
    KConfigSkeleton::ItemInt *itemHttpSubmitPort;
};

ConfigBase::ConfigBase( )
  : KConfigSkeleton( QStringLiteral( "kcmcddbrc" ) )
{
  d = new ConfigBasePrivate;
  setCurrentGroup( QStringLiteral( "Lookup" ) );

  d->itemHostname = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "hostname" ), d->hostname, QStringLiteral( "gnudb.gnudb.org" ) );
  addItem( d->itemHostname, QStringLiteral( "hostname" ) );
  d->itemPort = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "port" ), d->port, 80 );
  addItem( d->itemPort, QStringLiteral( "port" ) );
  d->itemMusicBrainzLookupEnabled = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "MusicBrainzLookupEnabled" ), d->musicBrainzLookupEnabled, true );
  addItem( d->itemMusicBrainzLookupEnabled, QStringLiteral( "MusicBrainzLookupEnabled" ) );
  d->itemFreedbLookupEnabled = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "FreedbLookupEnabled" ), d->freedbLookupEnabled, true );
  addItem( d->itemFreedbLookupEnabled, QStringLiteral( "FreedbLookupEnabled" ) );
  d->itemCacheLookupEnabled = new KConfigSkeleton::ItemBool( currentGroup(), QStringLiteral( "CacheLookupEnabled" ), d->cacheLookupEnabled, true );
  addItem( d->itemCacheLookupEnabled, QStringLiteral( "CacheLookupEnabled" ) );
  QList<KConfigSkeleton::ItemEnum::Choice> valuesFreedbLookupTransport;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("CDDBP");
    valuesFreedbLookupTransport.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QStringLiteral("HTTP");
    valuesFreedbLookupTransport.append( choice );
  }
  d->itemFreedbLookupTransport = new KConfigSkeleton::ItemEnum( currentGroup(), QStringLiteral( "FreedbLookupTransport" ), d->freedbLookupTransport, valuesFreedbLookupTransport, EnumFreedbLookupTransport::HTTP );
  addItem( d->itemFreedbLookupTransport, QStringLiteral( "FreedbLookupTransport" ) );
  d->itemCacheLocations = new KConfigSkeleton::ItemPathList( currentGroup(), QStringLiteral( "cacheLocations" ), d->cacheLocations, QStringList(QDir::homePath()+QLatin1String("/.cddb/")) );
  addItem( d->itemCacheLocations, QStringLiteral( "cacheLocations" ) );

  setCurrentGroup( QStringLiteral( "Submit" ) );

  d->itemEmailAddress = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "emailAddress" ), d->emailAddress );
  addItem( d->itemEmailAddress, QStringLiteral( "emailAddress" ) );
  d->itemHttpSubmitServer = new KConfigSkeleton::ItemString( currentGroup(), QStringLiteral( "httpSubmitServer" ), d->httpSubmitServer, QStringLiteral( "gnudb.gnudb.org" ) );
  addItem( d->itemHttpSubmitServer, QStringLiteral( "httpSubmitServer" ) );
  d->itemHttpSubmitPort = new KConfigSkeleton::ItemInt( currentGroup(), QStringLiteral( "httpSubmitPort" ), d->httpSubmitPort, 80 );
  addItem( d->itemHttpSubmitPort, QStringLiteral( "httpSubmitPort" ) );
}

void ConfigBase::setHostname( const QString & v )
{
    if (!ConfigBase::isHostnameImmutable())
      d->hostname = v;
}

QString ConfigBase::hostname() const
{
  return d->hostname;
}

bool  ConfigBase::isHostnameImmutable() const
{
    return isImmutable( QStringLiteral( "hostname" ) );
}


void ConfigBase::setPort( int v )
{
    if (!ConfigBase::isPortImmutable())
      d->port = v;
}

int ConfigBase::port() const
{
  return d->port;
}

bool  ConfigBase::isPortImmutable() const
{
    return isImmutable( QStringLiteral( "port" ) );
}


void ConfigBase::setMusicBrainzLookupEnabled( bool v )
{
    if (!ConfigBase::isMusicBrainzLookupEnabledImmutable())
      d->musicBrainzLookupEnabled = v;
}

bool ConfigBase::musicBrainzLookupEnabled() const
{
  return d->musicBrainzLookupEnabled;
}

bool  ConfigBase::isMusicBrainzLookupEnabledImmutable() const
{
    return isImmutable( QStringLiteral( "MusicBrainzLookupEnabled" ) );
}


void ConfigBase::setFreedbLookupEnabled( bool v )
{
    if (!ConfigBase::isFreedbLookupEnabledImmutable())
      d->freedbLookupEnabled = v;
}

bool ConfigBase::freedbLookupEnabled() const
{
  return d->freedbLookupEnabled;
}

bool  ConfigBase::isFreedbLookupEnabledImmutable() const
{
    return isImmutable( QStringLiteral( "FreedbLookupEnabled" ) );
}


void ConfigBase::setCacheLookupEnabled( bool v )
{
    if (!ConfigBase::isCacheLookupEnabledImmutable())
      d->cacheLookupEnabled = v;
}

bool ConfigBase::cacheLookupEnabled() const
{
  return d->cacheLookupEnabled;
}

bool  ConfigBase::isCacheLookupEnabledImmutable() const
{
    return isImmutable( QStringLiteral( "CacheLookupEnabled" ) );
}


void ConfigBase::setFreedbLookupTransport( int v )
{
    if (!ConfigBase::isFreedbLookupTransportImmutable())
      d->freedbLookupTransport = v;
}

int ConfigBase::freedbLookupTransport() const
{
  return d->freedbLookupTransport;
}

bool  ConfigBase::isFreedbLookupTransportImmutable() const
{
    return isImmutable( QStringLiteral( "FreedbLookupTransport" ) );
}


void ConfigBase::setCacheLocations( const QStringList & v )
{
    if (!ConfigBase::isCacheLocationsImmutable())
      d->cacheLocations = v;
}

QStringList ConfigBase::cacheLocations() const
{
  return d->cacheLocations;
}

bool  ConfigBase::isCacheLocationsImmutable() const
{
    return isImmutable( QStringLiteral( "cacheLocations" ) );
}


void ConfigBase::setEmailAddress( const QString & v )
{
    if (!ConfigBase::isEmailAddressImmutable())
      d->emailAddress = v;
}

QString ConfigBase::emailAddress() const
{
  return d->emailAddress;
}

bool  ConfigBase::isEmailAddressImmutable() const
{
    return isImmutable( QStringLiteral( "emailAddress" ) );
}


void ConfigBase::setHttpSubmitServer( const QString & v )
{
    if (!ConfigBase::isHttpSubmitServerImmutable())
      d->httpSubmitServer = v;
}

QString ConfigBase::httpSubmitServer() const
{
  return d->httpSubmitServer;
}

bool  ConfigBase::isHttpSubmitServerImmutable() const
{
    return isImmutable( QStringLiteral( "httpSubmitServer" ) );
}


void ConfigBase::setHttpSubmitPort( int v )
{
    if (!ConfigBase::isHttpSubmitPortImmutable())
      d->httpSubmitPort = v;
}

int ConfigBase::httpSubmitPort() const
{
  return d->httpSubmitPort;
}

bool  ConfigBase::isHttpSubmitPortImmutable() const
{
    return isImmutable( QStringLiteral( "httpSubmitPort" ) );
}


ConfigBase::~ConfigBase()
{
  delete d;
}

