// This file is generated by kconfig_compiler_kf5 from mailtransport.kcfg.
// All changes you do to this file will be lost.
#ifndef MAILTRANSPORT_TRANSPORTBASE_H
#define MAILTRANSPORT_TRANSPORTBASE_H

#include <mailtransport_export.h>
#include <KLocalizedString>

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

namespace MailTransport {

class MAILTRANSPORT_EXPORT TransportBase : public KConfigSkeleton
{
  public:
    class EnumEncryption
    {
      public:
      enum type { None, SSL, TLS, COUNT };
    };
    class EnumAuthenticationType
    {
      public:
      enum type { LOGIN, PLAIN, CRAM_MD5, DIGEST_MD5, GSSAPI, NTLM, APOP, CLEAR, ANONYMOUS, XOAUTH2, COUNT };
    };

    TransportBase( const QString & transportId );
    ~TransportBase() override;

    /**
      Set Unique identifier
    */
    void setId( int v )
    {
      if (!isIdImmutable())
        mId = v;
    }

    /**
      Get Unique identifier
    */
    int id() const
    {
      return mId;
    }

    /**
      Is Unique identifier Immutable
    */
    bool isIdImmutable() const
    {
      return isImmutable( QStringLiteral( "id" ) );
    }

    /**
      Get Item object corresponding to id()
    */
    ItemInt *idItem()
    {
      return mIdItem;
    }

    /**
      Set User-visible transport name
    */
    void setName( const QString & v )
    {
      if (!isNameImmutable())
        mName = v;
    }

    /**
      Get User-visible transport name
    */
    QString name() const
    {
      return mName;
    }

    /**
      Is User-visible transport name Immutable
    */
    bool isNameImmutable() const
    {
      return isImmutable( QStringLiteral( "name" ) );
    }

    /**
      Get Item object corresponding to name()
    */
    ItemString *nameItem()
    {
      return mNameItem;
    }

    /**
      Set identifier
    */
    void setIdentifier( const QString & v )
    {
      if (!isIdentifierImmutable())
        mIdentifier = v;
    }

    /**
      Get identifier
    */
    QString identifier() const
    {
      return mIdentifier;
    }

    /**
      Is identifier Immutable
    */
    bool isIdentifierImmutable() const
    {
      return isImmutable( QStringLiteral( "identifier" ) );
    }

    /**
      Get Item object corresponding to identifier()
    */
    ItemString *identifierItem()
    {
      return mIdentifierItem;
    }

    /**
      Set Host name of the server
    */
    void setHost( const QString & v )
    {
      if (!isHostImmutable())
        mHost = v;
    }

    /**
      Get Host name of the server
    */
    QString host() const
    {
      return mHost;
    }

    /**
      Is Host name of the server Immutable
    */
    bool isHostImmutable() const
    {
      return isImmutable( QStringLiteral( "host" ) );
    }

    /**
      Get Item object corresponding to host()
    */
    ItemString *hostItem()
    {
      return mHostItem;
    }

    /**
      Set Port number of the server
    */
    void setPort( uint v )
    {
      if (!isPortImmutable())
        mPort = v;
    }

    /**
      Get Port number of the server
    */
    uint port() const
    {
      return mPort;
    }

    /**
      Is Port number of the server Immutable
    */
    bool isPortImmutable() const
    {
      return isImmutable( QStringLiteral( "port" ) );
    }

    /**
      Get Item object corresponding to port()
    */
    ItemUInt *portItem()
    {
      return mPortItem;
    }

    /**
      Set User name needed for login
    */
    void setUserName( const QString & v )
    {
      if (!isUserNameImmutable())
        mUserName = v;
    }

    /**
      Get User name needed for login
    */
    QString userName() const
    {
      return mUserName;
    }

    /**
      Is User name needed for login Immutable
    */
    bool isUserNameImmutable() const
    {
      return isImmutable( QStringLiteral( "userName" ) );
    }

    /**
      Get Item object corresponding to userName()
    */
    ItemString *userNameItem()
    {
      return mUserNameItem;
    }

    /**
      Set Command to execute before sending a mail
    */
    void setPrecommand( const QString & v )
    {
      if (!isPrecommandImmutable())
        mPrecommand = v;
    }

    /**
      Get Command to execute before sending a mail
    */
    QString precommand() const
    {
      return mPrecommand;
    }

    /**
      Is Command to execute before sending a mail Immutable
    */
    bool isPrecommandImmutable() const
    {
      return isImmutable( QStringLiteral( "precommand" ) );
    }

    /**
      Get Item object corresponding to precommand()
    */
    ItemString *precommandItem()
    {
      return mPrecommandItem;
    }

    /**
      Set Options added to mailtransport method
    */
    void setOptions( const QString & v )
    {
      if (!isOptionsImmutable())
        mOptions = v;
    }

    /**
      Get Options added to mailtransport method
    */
    QString options() const
    {
      return mOptions;
    }

    /**
      Is Options added to mailtransport method Immutable
    */
    bool isOptionsImmutable() const
    {
      return isImmutable( QStringLiteral( "options" ) );
    }

    /**
      Get Item object corresponding to options()
    */
    ItemString *optionsItem()
    {
      return mOptionsItem;
    }

    /**
      Set Server requires authentication
    */
    void setRequiresAuthentication( bool v )
    {
      if (!isRequiresAuthenticationImmutable())
        mRequiresAuthentication = v;
    }

    /**
      Get Server requires authentication
    */
    bool requiresAuthentication() const
    {
      return mRequiresAuthentication;
    }

    /**
      Is Server requires authentication Immutable
    */
    bool isRequiresAuthenticationImmutable() const
    {
      return isImmutable( QStringLiteral( "requiresAuthentication" ) );
    }

    /**
      Get Item object corresponding to requiresAuthentication()
    */
    ItemBool *requiresAuthenticationItem()
    {
      return mRequiresAuthenticationItem;
    }

    /**
      Set Store password
    */
    void setStorePassword( bool v )
    {
      if (!isStorePasswordImmutable())
        mStorePassword = v;
    }

    /**
      Get Store password
    */
    bool storePassword() const
    {
      return mStorePassword;
    }

    /**
      Is Store password Immutable
    */
    bool isStorePasswordImmutable() const
    {
      return isImmutable( QStringLiteral( "storePassword" ) );
    }

    /**
      Get Item object corresponding to storePassword()
    */
    ItemBool *storePasswordItem()
    {
      return mStorePasswordItem;
    }

    /**
      Set Encryption method used for communication
    */
    void setEncryption( int v )
    {
      if (!isEncryptionImmutable())
        mEncryption = v;
    }

    /**
      Get Encryption method used for communication
    */
    int encryption() const
    {
      return mEncryption;
    }

    /**
      Is Encryption method used for communication Immutable
    */
    bool isEncryptionImmutable() const
    {
      return isImmutable( QStringLiteral( "encryption" ) );
    }

    /**
      Get Item object corresponding to encryption()
    */
    ItemEnum *encryptionItem()
    {
      return mEncryptionItem;
    }

    /**
      Set Authentication method
    */
    void setAuthenticationType( int v )
    {
      if (!isAuthenticationTypeImmutable())
        mAuthenticationType = v;
    }

    /**
      Get Authentication method
    */
    int authenticationType() const
    {
      return mAuthenticationType;
    }

    /**
      Is Authentication method Immutable
    */
    bool isAuthenticationTypeImmutable() const
    {
      return isImmutable( QStringLiteral( "authenticationType" ) );
    }

    /**
      Get Item object corresponding to authenticationType()
    */
    ItemEnum *authenticationTypeItem()
    {
      return mAuthenticationTypeItem;
    }

    /**
      Set specifyHostname
    */
    void setSpecifyHostname( bool v )
    {
      if (!isSpecifyHostnameImmutable())
        mSpecifyHostname = v;
    }

    /**
      Get specifyHostname
    */
    bool specifyHostname() const
    {
      return mSpecifyHostname;
    }

    /**
      Is specifyHostname Immutable
    */
    bool isSpecifyHostnameImmutable() const
    {
      return isImmutable( QStringLiteral( "specifyHostname" ) );
    }

    /**
      Get Item object corresponding to specifyHostname()
    */
    ItemBool *specifyHostnameItem()
    {
      return mSpecifyHostnameItem;
    }

    /**
      Set localHostname
    */
    void setLocalHostname( const QString & v )
    {
      if (!isLocalHostnameImmutable())
        mLocalHostname = v;
    }

    /**
      Get localHostname
    */
    QString localHostname() const
    {
      return mLocalHostname;
    }

    /**
      Is localHostname Immutable
    */
    bool isLocalHostnameImmutable() const
    {
      return isImmutable( QStringLiteral( "localHostname" ) );
    }

    /**
      Get Item object corresponding to localHostname()
    */
    ItemString *localHostnameItem()
    {
      return mLocalHostnameItem;
    }

    /**
      Set specifySenderOverwriteAddress
    */
    void setSpecifySenderOverwriteAddress( bool v )
    {
      if (!isSpecifySenderOverwriteAddressImmutable())
        mSpecifySenderOverwriteAddress = v;
    }

    /**
      Get specifySenderOverwriteAddress
    */
    bool specifySenderOverwriteAddress() const
    {
      return mSpecifySenderOverwriteAddress;
    }

    /**
      Is specifySenderOverwriteAddress Immutable
    */
    bool isSpecifySenderOverwriteAddressImmutable() const
    {
      return isImmutable( QStringLiteral( "specifySenderOverwriteAddress" ) );
    }

    /**
      Get Item object corresponding to specifySenderOverwriteAddress()
    */
    ItemBool *specifySenderOverwriteAddressItem()
    {
      return mSpecifySenderOverwriteAddressItem;
    }

    /**
      Set senderOverwriteAddress
    */
    void setSenderOverwriteAddress( const QString & v )
    {
      if (!isSenderOverwriteAddressImmutable())
        mSenderOverwriteAddress = v;
    }

    /**
      Get senderOverwriteAddress
    */
    QString senderOverwriteAddress() const
    {
      return mSenderOverwriteAddress;
    }

    /**
      Is senderOverwriteAddress Immutable
    */
    bool isSenderOverwriteAddressImmutable() const
    {
      return isImmutable( QStringLiteral( "senderOverwriteAddress" ) );
    }

    /**
      Get Item object corresponding to senderOverwriteAddress()
    */
    ItemString *senderOverwriteAddressItem()
    {
      return mSenderOverwriteAddressItem;
    }

    /**
      Set Connect using the system proxy settings
    */
    void setUseProxy( bool v )
    {
      if (!isUseProxyImmutable())
        mUseProxy = v;
    }

    /**
      Get Connect using the system proxy settings
    */
    bool useProxy() const
    {
      return mUseProxy;
    }

    /**
      Is Connect using the system proxy settings Immutable
    */
    bool isUseProxyImmutable() const
    {
      return isImmutable( QStringLiteral( "useProxy" ) );
    }

    /**
      Get Item object corresponding to useProxy()
    */
    ItemBool *useProxyItem()
    {
      return mUseProxyItem;
    }

  protected:
    QString mParamtransportId;

    // Transport $(transportId)
    int mId;
    QString mName;
    QString mIdentifier;
    QString mHost;
    uint mPort;
    QString mUserName;
    QString mPrecommand;
    QString mOptions;
    bool mRequiresAuthentication;
    bool mStorePassword;
    int mEncryption;
    int mAuthenticationType;
    bool mSpecifyHostname;
    QString mLocalHostname;
    bool mSpecifySenderOverwriteAddress;
    QString mSenderOverwriteAddress;
    bool mUseProxy;

  private:
    ItemInt *mIdItem;
    ItemString *mNameItem;
    ItemString *mIdentifierItem;
    ItemString *mHostItem;
    ItemUInt *mPortItem;
    ItemString *mUserNameItem;
    ItemString *mPrecommandItem;
    ItemString *mOptionsItem;
    ItemBool *mRequiresAuthenticationItem;
    ItemBool *mStorePasswordItem;
    ItemEnum *mEncryptionItem;
    ItemEnum *mAuthenticationTypeItem;
    ItemBool *mSpecifyHostnameItem;
    ItemString *mLocalHostnameItem;
    ItemBool *mSpecifySenderOverwriteAddressItem;
    ItemString *mSenderOverwriteAddressItem;
    ItemBool *mUseProxyItem;
};

}

#endif

