// This file is generated by kconfig_compiler_kf6 from smb4kmountsettings_linux.kcfg.
// All changes you do to this file will be lost.
#ifndef SMB4KMOUNTSETTINGS_H
#define SMB4KMOUNTSETTINGS_H

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

#include <KUser>
#include <QDir>
#include <smb4kcore_export.h>

class SMB4KCORE_EXPORT Smb4KMountSettings : public KConfigSkeleton
{
  public:
    class EnumClientCharset
    {
      public:
      enum type { default_charset, iso8859_1, iso8859_2, iso8859_3, iso8859_4, iso8859_5, iso8859_6, iso8859_7, iso8859_8, iso8859_9, iso8859_13, iso8859_14, iso8859_15, utf8, koi8_r, koi8_u, koi8_ru, cp1251, gb2312, big5, euc_jp, euc_kr, tis_620, COUNT };
    };
    class EnumWriteAccess
    {
      public:
      enum type { ReadWrite, ReadOnly, COUNT };
    };
    class EnumCacheMode
    {
      public:
      enum type { None, Strict, Loose, COUNT };
    };
    class EnumSecurityMode
    {
      public:
      enum type { None, Krb5, Krb5i, Ntlm, Ntlmi, Ntlmv2, Ntlmv2i, Ntlmssp, Ntlmsspi, COUNT };
    };

    static Smb4KMountSettings *self();
    ~Smb4KMountSettings() override;

    /**
      Set All or most of the servers support the CIFS Unix extensions
    */
    static
    void setCifsUnixExtensionsSupport( bool v )
    {
      if (!self()->isCifsUnixExtensionsSupportImmutable())
        self()->mCifsUnixExtensionsSupport = v;
    }

    /**
      Get All or most of the servers support the CIFS Unix extensions
    */
    static
    bool cifsUnixExtensionsSupport()
    {
      return self()->mCifsUnixExtensionsSupport;
    }

    /**
      Is All or most of the servers support the CIFS Unix extensions Immutable
    */
    static
    bool isCifsUnixExtensionsSupportImmutable()
    {
      return self()->isImmutable( QStringLiteral( "CifsUnixExtensionsSupport" ) );
    }

    /**
      Get Item object corresponding to CifsUnixExtensionsSupport()
    */
    ItemBool *cifsUnixExtensionsSupportItem()
    {
      return mCifsUnixExtensionsSupportItem;
    }

    /**
      Set Set the user and group ID
    */
    static
    void setUseIds( bool v )
    {
      if (!self()->isUseIdsImmutable())
        self()->mUseIds = v;
    }

    /**
      Get Set the user and group ID
    */
    static
    bool useIds()
    {
      return self()->mUseIds;
    }

    /**
      Is Set the user and group ID Immutable
    */
    static
    bool isUseIdsImmutable()
    {
      return self()->isImmutable( QStringLiteral( "UseIds" ) );
    }

    /**
      Get Item object corresponding to UseIds()
    */
    ItemBool *useIdsItem()
    {
      return mUseIdsItem;
    }

    /**
      Set File mode:
    */
    static
    void setUseFileMode( bool v )
    {
      if (!self()->isUseFileModeImmutable())
        self()->mUseFileMode = v;
    }

    /**
      Get File mode:
    */
    static
    bool useFileMode()
    {
      return self()->mUseFileMode;
    }

    /**
      Is File mode: Immutable
    */
    static
    bool isUseFileModeImmutable()
    {
      return self()->isImmutable( QStringLiteral( "UseFileMode" ) );
    }

    /**
      Get Item object corresponding to UseFileMode()
    */
    ItemBool *useFileModeItem()
    {
      return mUseFileModeItem;
    }

    /**
      Set FileMode
    */
    static
    void setFileMode( const QString & v )
    {
      if (!self()->isFileModeImmutable())
        self()->mFileMode = v;
    }

    /**
      Get FileMode
    */
    static
    QString fileMode()
    {
      return self()->mFileMode;
    }

    /**
      Is FileMode Immutable
    */
    static
    bool isFileModeImmutable()
    {
      return self()->isImmutable( QStringLiteral( "FileMode" ) );
    }

    /**
      Get Item object corresponding to FileMode()
    */
    ItemString *fileModeItem()
    {
      return mFileModeItem;
    }

    /**
      Set Directory mode:
    */
    static
    void setUseDirectoryMode( bool v )
    {
      if (!self()->isUseDirectoryModeImmutable())
        self()->mUseDirectoryMode = v;
    }

    /**
      Get Directory mode:
    */
    static
    bool useDirectoryMode()
    {
      return self()->mUseDirectoryMode;
    }

    /**
      Is Directory mode: Immutable
    */
    static
    bool isUseDirectoryModeImmutable()
    {
      return self()->isImmutable( QStringLiteral( "UseDirectoryMode" ) );
    }

    /**
      Get Item object corresponding to UseDirectoryMode()
    */
    ItemBool *useDirectoryModeItem()
    {
      return mUseDirectoryModeItem;
    }

    /**
      Set DirectoryMode
    */
    static
    void setDirectoryMode( const QString & v )
    {
      if (!self()->isDirectoryModeImmutable())
        self()->mDirectoryMode = v;
    }

    /**
      Get DirectoryMode
    */
    static
    QString directoryMode()
    {
      return self()->mDirectoryMode;
    }

    /**
      Is DirectoryMode Immutable
    */
    static
    bool isDirectoryModeImmutable()
    {
      return self()->isImmutable( QStringLiteral( "DirectoryMode" ) );
    }

    /**
      Get Item object corresponding to DirectoryMode()
    */
    ItemString *directoryModeItem()
    {
      return mDirectoryModeItem;
    }

    /**
      Set Client character set:
    */
    static
    void setUseClientCharset( bool v )
    {
      if (!self()->isUseClientCharsetImmutable())
        self()->mUseClientCharset = v;
    }

    /**
      Get Client character set:
    */
    static
    bool useClientCharset()
    {
      return self()->mUseClientCharset;
    }

    /**
      Is Client character set: Immutable
    */
    static
    bool isUseClientCharsetImmutable()
    {
      return self()->isImmutable( QStringLiteral( "UseClientCharset" ) );
    }

    /**
      Get Item object corresponding to UseClientCharset()
    */
    ItemBool *useClientCharsetItem()
    {
      return mUseClientCharsetItem;
    }

    /**
      Set ClientCharset
    */
    static
    void setClientCharset( int v )
    {
      if (!self()->isClientCharsetImmutable())
        self()->mClientCharset = v;
    }

    /**
      Get ClientCharset
    */
    static
    int clientCharset()
    {
      return self()->mClientCharset;
    }

    /**
      Is ClientCharset Immutable
    */
    static
    bool isClientCharsetImmutable()
    {
      return self()->isImmutable( QStringLiteral( "ClientCharset" ) );
    }

    /**
      Get Item object corresponding to ClientCharset()
    */
    ItemEnum *clientCharsetItem()
    {
      return mClientCharsetItem;
    }

    /**
      Set Write access:
    */
    static
    void setUseWriteAccess( bool v )
    {
      if (!self()->isUseWriteAccessImmutable())
        self()->mUseWriteAccess = v;
    }

    /**
      Get Write access:
    */
    static
    bool useWriteAccess()
    {
      return self()->mUseWriteAccess;
    }

    /**
      Is Write access: Immutable
    */
    static
    bool isUseWriteAccessImmutable()
    {
      return self()->isImmutable( QStringLiteral( "UseWriteAccess" ) );
    }

    /**
      Get Item object corresponding to UseWriteAccess()
    */
    ItemBool *useWriteAccessItem()
    {
      return mUseWriteAccessItem;
    }

    /**
      Set WriteAccess
    */
    static
    void setWriteAccess( int v )
    {
      if (!self()->isWriteAccessImmutable())
        self()->mWriteAccess = v;
    }

    /**
      Get WriteAccess
    */
    static
    int writeAccess()
    {
      return self()->mWriteAccess;
    }

    /**
      Is WriteAccess Immutable
    */
    static
    bool isWriteAccessImmutable()
    {
      return self()->isImmutable( QStringLiteral( "WriteAccess" ) );
    }

    /**
      Get Item object corresponding to WriteAccess()
    */
    ItemEnum *writeAccessItem()
    {
      return mWriteAccessItem;
    }

    /**
      Set Definitely assign the UID
    */
    static
    void setForceUID( bool v )
    {
      if (!self()->isForceUIDImmutable())
        self()->mForceUID = v;
    }

    /**
      Get Definitely assign the UID
    */
    static
    bool forceUID()
    {
      return self()->mForceUID;
    }

    /**
      Is Definitely assign the UID Immutable
    */
    static
    bool isForceUIDImmutable()
    {
      return self()->isImmutable( QStringLiteral( "ForceUID" ) );
    }

    /**
      Get Item object corresponding to ForceUID()
    */
    ItemBool *forceUIDItem()
    {
      return mForceUIDItem;
    }

    /**
      Set Definitely assign the GID
    */
    static
    void setForceGID( bool v )
    {
      if (!self()->isForceGIDImmutable())
        self()->mForceGID = v;
    }

    /**
      Get Definitely assign the GID
    */
    static
    bool forceGID()
    {
      return self()->mForceGID;
    }

    /**
      Is Definitely assign the GID Immutable
    */
    static
    bool isForceGIDImmutable()
    {
      return self()->isImmutable( QStringLiteral( "ForceGID" ) );
    }

    /**
      Get Item object corresponding to ForceGID()
    */
    ItemBool *forceGIDItem()
    {
      return mForceGIDItem;
    }

    /**
      Set Do permission checks
    */
    static
    void setPermissionChecks( bool v )
    {
      if (!self()->isPermissionChecksImmutable())
        self()->mPermissionChecks = v;
    }

    /**
      Get Do permission checks
    */
    static
    bool permissionChecks()
    {
      return self()->mPermissionChecks;
    }

    /**
      Is Do permission checks Immutable
    */
    static
    bool isPermissionChecksImmutable()
    {
      return self()->isImmutable( QStringLiteral( "PermissionChecks" ) );
    }

    /**
      Get Item object corresponding to PermissionChecks()
    */
    ItemBool *permissionChecksItem()
    {
      return mPermissionChecksItem;
    }

    /**
      Set Attempt to set UID and GID
    */
    static
    void setClientControlsIDs( bool v )
    {
      if (!self()->isClientControlsIDsImmutable())
        self()->mClientControlsIDs = v;
    }

    /**
      Get Attempt to set UID and GID
    */
    static
    bool clientControlsIDs()
    {
      return self()->mClientControlsIDs;
    }

    /**
      Is Attempt to set UID and GID Immutable
    */
    static
    bool isClientControlsIDsImmutable()
    {
      return self()->isImmutable( QStringLiteral( "ClientControlsIDs" ) );
    }

    /**
      Get Item object corresponding to ClientControlsIDs()
    */
    ItemBool *clientControlsIDsItem()
    {
      return mClientControlsIDsItem;
    }

    /**
      Set Use server inode numbers
    */
    static
    void setServerInodeNumbers( bool v )
    {
      if (!self()->isServerInodeNumbersImmutable())
        self()->mServerInodeNumbers = v;
    }

    /**
      Get Use server inode numbers
    */
    static
    bool serverInodeNumbers()
    {
      return self()->mServerInodeNumbers;
    }

    /**
      Is Use server inode numbers Immutable
    */
    static
    bool isServerInodeNumbersImmutable()
    {
      return self()->isImmutable( QStringLiteral( "ServerInodeNumbers" ) );
    }

    /**
      Get Item object corresponding to ServerInodeNumbers()
    */
    ItemBool *serverInodeNumbersItem()
    {
      return mServerInodeNumbersItem;
    }

    /**
      Set Do not send byte range lock requests
    */
    static
    void setNoLocking( bool v )
    {
      if (!self()->isNoLockingImmutable())
        self()->mNoLocking = v;
    }

    /**
      Get Do not send byte range lock requests
    */
    static
    bool noLocking()
    {
      return self()->mNoLocking;
    }

    /**
      Is Do not send byte range lock requests Immutable
    */
    static
    bool isNoLockingImmutable()
    {
      return self()->isImmutable( QStringLiteral( "NoLocking" ) );
    }

    /**
      Get Item object corresponding to NoLocking()
    */
    ItemBool *noLockingItem()
    {
      return mNoLockingItem;
    }

    /**
      Set Translate reserved characters
    */
    static
    void setTranslateReservedChars( bool v )
    {
      if (!self()->isTranslateReservedCharsImmutable())
        self()->mTranslateReservedChars = v;
    }

    /**
      Get Translate reserved characters
    */
    static
    bool translateReservedChars()
    {
      return self()->mTranslateReservedChars;
    }

    /**
      Is Translate reserved characters Immutable
    */
    static
    bool isTranslateReservedCharsImmutable()
    {
      return self()->isImmutable( QStringLiteral( "TranslateReservedChars" ) );
    }

    /**
      Get Item object corresponding to TranslateReservedChars()
    */
    ItemBool *translateReservedCharsItem()
    {
      return mTranslateReservedCharsItem;
    }

    /**
      Set Cache mode:
    */
    static
    void setUseCacheMode( bool v )
    {
      if (!self()->isUseCacheModeImmutable())
        self()->mUseCacheMode = v;
    }

    /**
      Get Cache mode:
    */
    static
    bool useCacheMode()
    {
      return self()->mUseCacheMode;
    }

    /**
      Is Cache mode: Immutable
    */
    static
    bool isUseCacheModeImmutable()
    {
      return self()->isImmutable( QStringLiteral( "UseCacheMode" ) );
    }

    /**
      Get Item object corresponding to UseCacheMode()
    */
    ItemBool *useCacheModeItem()
    {
      return mUseCacheModeItem;
    }

    /**
      Set CacheMode
    */
    static
    void setCacheMode( int v )
    {
      if (!self()->isCacheModeImmutable())
        self()->mCacheMode = v;
    }

    /**
      Get CacheMode
    */
    static
    int cacheMode()
    {
      return self()->mCacheMode;
    }

    /**
      Is CacheMode Immutable
    */
    static
    bool isCacheModeImmutable()
    {
      return self()->isImmutable( QStringLiteral( "CacheMode" ) );
    }

    /**
      Get Item object corresponding to CacheMode()
    */
    ItemEnum *cacheModeItem()
    {
      return mCacheModeItem;
    }

    /**
      Set Security mode:
    */
    static
    void setUseSecurityMode( bool v )
    {
      if (!self()->isUseSecurityModeImmutable())
        self()->mUseSecurityMode = v;
    }

    /**
      Get Security mode:
    */
    static
    bool useSecurityMode()
    {
      return self()->mUseSecurityMode;
    }

    /**
      Is Security mode: Immutable
    */
    static
    bool isUseSecurityModeImmutable()
    {
      return self()->isImmutable( QStringLiteral( "UseSecurityMode" ) );
    }

    /**
      Get Item object corresponding to UseSecurityMode()
    */
    ItemBool *useSecurityModeItem()
    {
      return mUseSecurityModeItem;
    }

    /**
      Set SecurityMode
    */
    static
    void setSecurityMode( int v )
    {
      if (!self()->isSecurityModeImmutable())
        self()->mSecurityMode = v;
    }

    /**
      Get SecurityMode
    */
    static
    int securityMode()
    {
      return self()->mSecurityMode;
    }

    /**
      Is SecurityMode Immutable
    */
    static
    bool isSecurityModeImmutable()
    {
      return self()->isImmutable( QStringLiteral( "SecurityMode" ) );
    }

    /**
      Get Item object corresponding to SecurityMode()
    */
    ItemEnum *securityModeItem()
    {
      return mSecurityModeItem;
    }

    /**
      Set Unmount all personal shares on exit
    */
    static
    void setUnmountSharesOnExit( bool v )
    {
      if (!self()->isUnmountSharesOnExitImmutable())
        self()->mUnmountSharesOnExit = v;
    }

    /**
      Get Unmount all personal shares on exit
    */
    static
    bool unmountSharesOnExit()
    {
      return self()->mUnmountSharesOnExit;
    }

    /**
      Is Unmount all personal shares on exit Immutable
    */
    static
    bool isUnmountSharesOnExitImmutable()
    {
      return self()->isImmutable( QStringLiteral( "UnmountSharesOnExit" ) );
    }

    /**
      Get Item object corresponding to UnmountSharesOnExit()
    */
    ItemBool *unmountSharesOnExitItem()
    {
      return mUnmountSharesOnExitItem;
    }

    /**
      Set Remount shares
    */
    static
    void setRemountShares( bool v )
    {
      if (!self()->isRemountSharesImmutable())
        self()->mRemountShares = v;
    }

    /**
      Get Remount shares
    */
    static
    bool remountShares()
    {
      return self()->mRemountShares;
    }

    /**
      Is Remount shares Immutable
    */
    static
    bool isRemountSharesImmutable()
    {
      return self()->isImmutable( QStringLiteral( "RemountShares" ) );
    }

    /**
      Get Item object corresponding to RemountShares()
    */
    ItemBool *remountSharesItem()
    {
      return mRemountSharesItem;
    }

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

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

      if (!self()->isRemountAttemptsImmutable())
        self()->mRemountAttempts = v;
    }

    /**
      Get Number of remount attempts:
    */
    static
    int remountAttempts()
    {
      return self()->mRemountAttempts;
    }

    /**
      Is Number of remount attempts: Immutable
    */
    static
    bool isRemountAttemptsImmutable()
    {
      return self()->isImmutable( QStringLiteral( "RemountAttempts" ) );
    }

    /**
      Get Item object corresponding to RemountAttempts()
    */
    ItemInt *remountAttemptsItem()
    {
      return mRemountAttemptsItem;
    }

    /**
      Set Interval between remount attempts:
    */
    static
    void setRemountInterval( int v )
    {
      if (v < 1)
      {
        qDebug() << "setRemountInterval: value " << v << " is less than the minimum value of 1";
        v = 1;
      }

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

      if (!self()->isRemountIntervalImmutable())
        self()->mRemountInterval = v;
    }

    /**
      Get Interval between remount attempts:
    */
    static
    int remountInterval()
    {
      return self()->mRemountInterval;
    }

    /**
      Is Interval between remount attempts: Immutable
    */
    static
    bool isRemountIntervalImmutable()
    {
      return self()->isImmutable( QStringLiteral( "RemountInterval" ) );
    }

    /**
      Get Item object corresponding to RemountInterval()
    */
    ItemInt *remountIntervalItem()
    {
      return mRemountIntervalItem;
    }

    /**
      Set Force the unmounting of inaccessible shares
    */
    static
    void setForceUnmountInaccessible( bool v )
    {
      if (!self()->isForceUnmountInaccessibleImmutable())
        self()->mForceUnmountInaccessible = v;
    }

    /**
      Get Force the unmounting of inaccessible shares
    */
    static
    bool forceUnmountInaccessible()
    {
      return self()->mForceUnmountInaccessible;
    }

    /**
      Is Force the unmounting of inaccessible shares Immutable
    */
    static
    bool isForceUnmountInaccessibleImmutable()
    {
      return self()->isImmutable( QStringLiteral( "ForceUnmountInaccessible" ) );
    }

    /**
      Get Item object corresponding to ForceUnmountInaccessible()
    */
    ItemBool *forceUnmountInaccessibleItem()
    {
      return mForceUnmountInaccessibleItem;
    }

    /**
      Set Detect all shares that are mounted on the system
    */
    static
    void setDetectAllShares( bool v )
    {
      if (!self()->isDetectAllSharesImmutable())
        self()->mDetectAllShares = v;
    }

    /**
      Get Detect all shares that are mounted on the system
    */
    static
    bool detectAllShares()
    {
      return self()->mDetectAllShares;
    }

    /**
      Is Detect all shares that are mounted on the system Immutable
    */
    static
    bool isDetectAllSharesImmutable()
    {
      return self()->isImmutable( QStringLiteral( "DetectAllShares" ) );
    }

    /**
      Get Item object corresponding to DetectAllShares()
    */
    ItemBool *detectAllSharesItem()
    {
      return mDetectAllSharesItem;
    }

  protected:
    Smb4KMountSettings();
    friend class Smb4KMountSettingsHelper;


    // Mounting
    bool mCifsUnixExtensionsSupport;
    bool mUseIds;
    bool mUseFileMode;
    QString mFileMode;
    bool mUseDirectoryMode;
    QString mDirectoryMode;
    bool mUseClientCharset;
    int mClientCharset;
    bool mUseWriteAccess;
    int mWriteAccess;
    bool mForceUID;
    bool mForceGID;
    bool mPermissionChecks;
    bool mClientControlsIDs;
    bool mServerInodeNumbers;
    bool mNoLocking;
    bool mTranslateReservedChars;
    bool mUseCacheMode;
    int mCacheMode;
    bool mUseSecurityMode;
    int mSecurityMode;
    bool mUnmountSharesOnExit;
    bool mRemountShares;
    int mRemountAttempts;
    int mRemountInterval;
    bool mForceUnmountInaccessible;
    bool mDetectAllShares;

  private:
    ItemBool *mCifsUnixExtensionsSupportItem;
    ItemBool *mUseIdsItem;
    ItemBool *mUseFileModeItem;
    ItemString *mFileModeItem;
    ItemBool *mUseDirectoryModeItem;
    ItemString *mDirectoryModeItem;
    ItemBool *mUseClientCharsetItem;
    ItemEnum *mClientCharsetItem;
    ItemBool *mUseWriteAccessItem;
    ItemEnum *mWriteAccessItem;
    ItemBool *mForceUIDItem;
    ItemBool *mForceGIDItem;
    ItemBool *mPermissionChecksItem;
    ItemBool *mClientControlsIDsItem;
    ItemBool *mServerInodeNumbersItem;
    ItemBool *mNoLockingItem;
    ItemBool *mTranslateReservedCharsItem;
    ItemBool *mUseCacheModeItem;
    ItemEnum *mCacheModeItem;
    ItemBool *mUseSecurityModeItem;
    ItemEnum *mSecurityModeItem;
    ItemBool *mUnmountSharesOnExitItem;
    ItemBool *mRemountSharesItem;
    ItemInt *mRemountAttemptsItem;
    ItemInt *mRemountIntervalItem;
    ItemBool *mForceUnmountInaccessibleItem;
    ItemBool *mDetectAllSharesItem;
};

#endif

