#pragma once #ifndef MESSMER_CRYFSCLI_PROGRAMOPTIONS_PROGRAMOPTIONS_H #define MESSMER_CRYFSCLI_PROGRAMOPTIONS_PROGRAMOPTIONS_H #include #include #include #include #include namespace cryfs_cli { namespace program_options { class ProgramOptions final { public: ProgramOptions(boost::filesystem::path baseDir, boost::filesystem::path mountDir, boost::optional configFile, bool foreground, bool allowFilesystemUpgrade, bool allowReplacedFilesystem, bool createMissingBasedir, bool createMissingMountpoint, boost::optional unmountAfterIdleMinutes, boost::optional logFile, boost::optional cipher, boost::optional blocksizeBytes, bool allowIntegrityViolations, boost::optional missingBlockIsIntegrityViolation, std::vector fuseOptions); ProgramOptions(ProgramOptions &&rhs) = default; const boost::filesystem::path &baseDir() const; const boost::filesystem::path &mountDir() const; const boost::optional &configFile() const; bool foreground() const; bool allowFilesystemUpgrade() const; bool allowReplacedFilesystem() const; bool createMissingBasedir() const; bool createMissingMountpoint() const; const boost::optional &unmountAfterIdleMinutes() const; const boost::optional &logFile() const; const boost::optional &cipher() const; const boost::optional &blocksizeBytes() const; bool allowIntegrityViolations() const; const boost::optional &missingBlockIsIntegrityViolation() const; const std::vector &fuseOptions() const; bool mountDirIsDriveLetter() const; private: boost::filesystem::path _baseDir; // this is always absolute boost::filesystem::path _mountDir; // this is absolute iff !_mountDirIsDriveLetter boost::optional _configFile; bool _foreground; bool _allowFilesystemUpgrade; bool _allowReplacedFilesystem; bool _createMissingBasedir; bool _createMissingMountpoint; boost::optional _unmountAfterIdleMinutes; boost::optional _logFile; boost::optional _cipher; boost::optional _blocksizeBytes; bool _allowIntegrityViolations; boost::optional _missingBlockIsIntegrityViolation; std::vector _fuseOptions; bool _mountDirIsDriveLetter; DISALLOW_COPY_AND_ASSIGN(ProgramOptions); }; } } #endif