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

#include "settings.h"

#include <kstaticdeleter.h>

using namespace DNSSD;

Configuration *Configuration::mSelf = 0;
static KStaticDeleter<Configuration> staticConfigurationDeleter;

Configuration *Configuration::self()
{
  if ( !mSelf ) {
    staticConfigurationDeleter.setObject( mSelf, new Configuration() );
    mSelf->readConfig();
  }

  return mSelf;
}

Configuration::Configuration(  )
  : KConfigSkeleton( QString::fromLatin1( "kdnssdrc" ) )
{
  mSelf = this;
  setCurrentGroup( QString::fromLatin1( "browsing" ) );

  KConfigSkeleton::ItemStringList  *itemDomainList;
  itemDomainList = new KConfigSkeleton::ItemStringList( currentGroup(), QString::fromLatin1( "DomainList" ), mDomainList );
  addItem( itemDomainList, QString::fromLatin1( "DomainList" ) );
  KConfigSkeleton::ItemBool  *itemBrowseLocal;
  itemBrowseLocal = new KConfigSkeleton::ItemBool( currentGroup(), QString::fromLatin1( "BrowseLocal" ), mBrowseLocal, true );
  addItem( itemBrowseLocal, QString::fromLatin1( "BrowseLocal" ) );
  KConfigSkeleton::ItemBool  *itemRecursive;
  itemRecursive = new KConfigSkeleton::ItemBool( currentGroup(), QString::fromLatin1( "Recursive" ), mRecursive, false );
  addItem( itemRecursive, QString::fromLatin1( "Recursive" ) );

  setCurrentGroup( QString::fromLatin1( "publishing" ) );

  QValueList<KConfigSkeleton::ItemEnum::Choice> valuesPublishType;
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QString::fromLatin1( "LAN" );
    valuesPublishType.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice choice;
    choice.name = QString::fromLatin1( "WAN" );
    valuesPublishType.append( choice );
  }
  KConfigSkeleton::ItemEnum  *itemPublishType;
  itemPublishType = new KConfigSkeleton::ItemEnum( currentGroup(), QString::fromLatin1( "PublishType" ), mPublishType, valuesPublishType, EnumPublishType::LAN );
  addItem( itemPublishType, QString::fromLatin1( "PublishType" ) );
  KConfigSkeleton::ItemString  *itemPublishDomain;
  itemPublishDomain = new KConfigSkeleton::ItemString( currentGroup(), QString::fromLatin1( "PublishDomain" ), mPublishDomain );
  addItem( itemPublishDomain, QString::fromLatin1( "PublishDomain" ) );
}

Configuration::~Configuration()
{
  if ( mSelf == this )
    staticConfigurationDeleter.setObject( mSelf, 0, false );
}

