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

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

namespace Akonadi_Maildir_Resource {

class MaildirSettings : public KConfigSkeleton
{
  public:

    MaildirSettings( KSharedConfig::Ptr config = KSharedConfig::openConfig() );
    ~MaildirSettings() override;

    /**
      Set Path to maildir
    */
    void setPath( const QString & v )
    {
      if (!isPathImmutable())
        mPath = v;
    }

    /**
      Get Path to maildir
    */
    QString path() const
    {
      return mPath;
    }

    /**
      Is Path to maildir Immutable
    */
    bool isPathImmutable() const
    {
      return isImmutable( QStringLiteral( "Path" ) );
    }

    /**
      Get Item object corresponding to Path()
    */
    ItemPath *pathItem()
    {
      return mPathItem;
    }

    /**
      Set Path points to a folder containing Maildirs instead of to a maildir itself.
    */
    void setTopLevelIsContainer( bool v )
    {
      if (!isTopLevelIsContainerImmutable())
        mTopLevelIsContainer = v;
    }

    /**
      Get Path points to a folder containing Maildirs instead of to a maildir itself.
    */
    bool topLevelIsContainer() const
    {
      return mTopLevelIsContainer;
    }

    /**
      Is Path points to a folder containing Maildirs instead of to a maildir itself. Immutable
    */
    bool isTopLevelIsContainerImmutable() const
    {
      return isImmutable( QStringLiteral( "TopLevelIsContainer" ) );
    }

    /**
      Get Item object corresponding to TopLevelIsContainer()
    */
    ItemBool *topLevelIsContainerItem()
    {
      return mTopLevelIsContainerItem;
    }

    /**
      Set Do not change the actual backend data.
    */
    void setReadOnly( bool v )
    {
      if (!isReadOnlyImmutable())
        mReadOnly = v;
    }

    /**
      Get Do not change the actual backend data.
    */
    bool readOnly() const
    {
      return mReadOnly;
    }

    /**
      Is Do not change the actual backend data. Immutable
    */
    bool isReadOnlyImmutable() const
    {
      return isImmutable( QStringLiteral( "ReadOnly" ) );
    }

    /**
      Get Item object corresponding to ReadOnly()
    */
    ItemBool *readOnlyItem()
    {
      return mReadOnlyItem;
    }

    /**
      Set MonitorFilesystem
    */
    void setMonitorFilesystem( bool v )
    {
      if (!isMonitorFilesystemImmutable())
        mMonitorFilesystem = v;
    }

    /**
      Get MonitorFilesystem
    */
    bool monitorFilesystem() const
    {
      return mMonitorFilesystem;
    }

    /**
      Is MonitorFilesystem Immutable
    */
    bool isMonitorFilesystemImmutable() const
    {
      return isImmutable( QStringLiteral( "MonitorFilesystem" ) );
    }

    /**
      Get Item object corresponding to MonitorFilesystem()
    */
    ItemBool *monitorFilesystemItem()
    {
      return mMonitorFilesystemItem;
    }

  protected:

    // General
    QString mPath;
    bool mTopLevelIsContainer;
    bool mReadOnly;
    bool mMonitorFilesystem;

  private:
    ItemPath *mPathItem;
    ItemBool *mTopLevelIsContainerItem;
    ItemBool *mReadOnlyItem;
    ItemBool *mMonitorFilesystemItem;
};

}

#endif

