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

#include "transportbase.h"

#include <klocale.h>

using namespace MailTransport;

TransportBase::TransportBase(  const QString & transportId )
  : KConfigSkeleton( QLatin1String( "mailtransports" ) )
  , mParamtransportId(transportId)
{
  setCurrentGroup( QString( QLatin1String( "Transport %1" ) ).arg( mParamtransportId ) );

  mIdItem = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "id" ), mId, 0 );
  mIdItem->setLabel( i18n("Unique identifier") );
  addItem( mIdItem, QLatin1String( "id" ) );
  mNameItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "name" ), mName, i18n("Unnamed") );
  mNameItem->setLabel( i18n("User-visible transport name") );
  mNameItem->setWhatsThis( i18n("The name that will be used when referring to this server.") );
  addItem( mNameItem, QLatin1String( "name" ) );
  QList<KConfigSkeleton::ItemEnum::Choice2> valuestype;
  {
    KConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("SMTP");
    choice.label = i18n("SMTP Server");
    valuestype.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("Sendmail");
    choice.label = i18n("Local sendmail");
    valuestype.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("Akonadi");
    choice.label = i18n("Akonadi Resource");
    valuestype.append( choice );
  }
  mTypeItem = new KConfigSkeleton::ItemEnum( currentGroup(), QLatin1String( "type" ), mType, valuestype, EnumType::SMTP );
  mTypeItem->setLabel( i18n("Transport type") );
  addItem( mTypeItem, QLatin1String( "type" ) );
  mHostItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "host" ), mHost );
  mHostItem->setLabel( i18n("Host name of the server") );
  mHostItem->setWhatsThis( i18n("The domain name or numerical address of the SMTP server.") );
  addItem( mHostItem, QLatin1String( "host" ) );
  mPortItem = new KConfigSkeleton::ItemUInt( currentGroup(), QLatin1String( "port" ), mPort, 25 );
  mPortItem->setLabel( i18n("Port number of the server") );
  mPortItem->setWhatsThis( i18n("The port number that the SMTP server is listening on. The default port is 25.") );
  addItem( mPortItem, QLatin1String( "port" ) );
  mUserNameItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "user" ), mUserName );
  mUserNameItem->setLabel( i18n("User name needed for login") );
  mUserNameItem->setWhatsThis( i18n("The user name to send to the server for authorization.") );
  addItem( mUserNameItem, QLatin1String( "userName" ) );
  mPrecommandItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "precommand" ), mPrecommand );
  mPrecommandItem->setLabel( i18n("Command to execute before sending a mail") );
  mPrecommandItem->setWhatsThis( i18n("A command to run locally, prior to sending email. This can be used to set up SSH tunnels, for example. Leave it empty if no command should be run.") );
  addItem( mPrecommandItem, QLatin1String( "precommand" ) );
  mRequiresAuthenticationItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "auth" ), mRequiresAuthentication, false );
  mRequiresAuthenticationItem->setLabel( i18n("Server requires authentication") );
  mRequiresAuthenticationItem->setWhatsThis( i18n("Check this option if your SMTP server requires authentication before accepting mail. This is known as 'Authenticated SMTP' or simply ASMTP.") );
  addItem( mRequiresAuthenticationItem, QLatin1String( "requiresAuthentication" ) );
  mStorePasswordItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "storepass" ), mStorePassword, false );
  mStorePasswordItem->setLabel( i18n("Store password") );
  mStorePasswordItem->setWhatsThis( i18n("Check this option to have your password stored.\n"
"If KWallet is available the password will be stored there, which is considered safe.\n"
"However, if KWallet is not available, the password will be stored in the configuration file. The password is stored in an obfuscated format, but should not be considered secure from decryption efforts if access to the configuration file is obtained.") );
  addItem( mStorePasswordItem, QLatin1String( "storePassword" ) );
  QList<KConfigSkeleton::ItemEnum::Choice2> valuesencryption;
  {
    KConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("None");
    choice.label = i18n("No encryption");
    valuesencryption.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("SSL");
    choice.label = i18n("SSL encryption");
    valuesencryption.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("TLS");
    choice.label = i18n("TLS encryption");
    valuesencryption.append( choice );
  }
  mEncryptionItem = new KConfigSkeleton::ItemEnum( currentGroup(), QLatin1String( "encryption" ), mEncryption, valuesencryption );
  mEncryptionItem->setLabel( i18n("Encryption method used for communication") );
  addItem( mEncryptionItem, QLatin1String( "encryption" ) );
  QList<KConfigSkeleton::ItemEnum::Choice2> valuesauthenticationType;
  {
    KConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("LOGIN");
    valuesauthenticationType.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("PLAIN");
    valuesauthenticationType.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("CRAM_MD5");
    valuesauthenticationType.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("DIGEST_MD5");
    valuesauthenticationType.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("GSSAPI");
    valuesauthenticationType.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("NTLM");
    valuesauthenticationType.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("APOP");
    valuesauthenticationType.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("CLEAR");
    valuesauthenticationType.append( choice );
  }
  {
    KConfigSkeleton::ItemEnum::Choice2 choice;
    choice.name = QLatin1String("ANONYMOUS");
    valuesauthenticationType.append( choice );
  }
  mAuthenticationTypeItem = new KConfigSkeleton::ItemEnum( currentGroup(), QLatin1String( "authtype" ), mAuthenticationType, valuesauthenticationType, EnumAuthenticationType::PLAIN );
  mAuthenticationTypeItem->setLabel( i18n("Authentication method") );
  addItem( mAuthenticationTypeItem, QLatin1String( "authenticationType" ) );
  mSpecifyHostnameItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "specifyHostname" ), mSpecifyHostname, false );
  mSpecifyHostnameItem->setLabel( i18n("specifyHostname") );
  mSpecifyHostnameItem->setWhatsThis( i18n("Check this option to use a custom hostname when identifying to the mail server. This is useful when your system's hostname may not be set correctly or to mask your system's true hostname.") );
  addItem( mSpecifyHostnameItem, QLatin1String( "specifyHostname" ) );
  mLocalHostnameItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "localHostname" ), mLocalHostname );
  mLocalHostnameItem->setLabel( i18n("localHostname") );
  mLocalHostnameItem->setWhatsThis( i18n("Enter the hostname that should be used when identifying to the server.") );
  addItem( mLocalHostnameItem, QLatin1String( "localHostname" ) );
  mSpecifySenderOverwriteAddressItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "specifySenderOverwriteAddress" ), mSpecifySenderOverwriteAddress, false );
  mSpecifySenderOverwriteAddressItem->setLabel( i18n("specifySenderOverwriteAddress") );
  mSpecifySenderOverwriteAddressItem->setWhatsThis( i18n("Check this option to use a custom sender address when identifying to the mail server. If not checked, the address from the identity is used.") );
  addItem( mSpecifySenderOverwriteAddressItem, QLatin1String( "specifySenderOverwriteAddress" ) );
  mSenderOverwriteAddressItem = new KConfigSkeleton::ItemString( currentGroup(), QLatin1String( "senderOverwriteAddress" ), mSenderOverwriteAddress );
  mSenderOverwriteAddressItem->setLabel( i18n("senderOverwriteAddress") );
  mSenderOverwriteAddressItem->setWhatsThis( i18n("Enter the address that should be used to overwrite the default sender address.") );
  addItem( mSenderOverwriteAddressItem, QLatin1String( "senderOverwriteAddress" ) );
}

TransportBase::~TransportBase()
{
}

