blob: 9cd167d28da4b77ffa42d38f7ef2e1b90cb645dd [file] [log] [blame]
// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <string>
#include <vector>
namespace cros_disks {
class Filesystem {
explicit Filesystem(const std::string& type);
bool accepts_user_and_group_id() const {
return accepts_user_and_group_id_;
void set_accepts_user_and_group_id(bool accepts_user_and_group_id) {
accepts_user_and_group_id_ = accepts_user_and_group_id;
const std::vector<std::string>& extra_mount_options() const {
return extra_mount_options_;
void set_extra_mount_options(
const std::vector<std::string>& extra_mount_options) {
extra_mount_options_ = extra_mount_options;
// Adds an option to the list of extra mount options.
void AddExtraMountOption(const std::string& option) {
bool is_experimental() const { return is_experimental_; }
void set_is_experimental(bool is_experimental) {
is_experimental_ = is_experimental;
bool is_mounted_read_only() const { return is_mounted_read_only_; }
void set_is_mounted_read_only(bool is_mounted_read_only) {
is_mounted_read_only_ = is_mounted_read_only;
const std::string& mount_type() const {
return mount_type_.empty() ? type_ : mount_type_;
void set_mount_type(const std::string& mount_type) {
mount_type_ = mount_type;
const std::string& mounter_type() const {
return mounter_type_;
void set_mounter_type(const std::string& mounter_type) {
mounter_type_ = mounter_type;
const std::string& type() const { return type_; }
void set_type(const std::string& type) { type_ = type; }
// This variable is set to true if default user and group ID can be
// specified for mounting the filesystem.
bool accepts_user_and_group_id_;
// Extra mount options to specify when mounting the filesystem.
std::vector<std::string> extra_mount_options_;
// This variable is set to true if the filesystem should be enabled
// only if the disk manager allows experimental features.
bool is_experimental_;
// This variable is set to true if the filesystem should be mounted
// as read-only.
bool is_mounted_read_only_;
// Filesystem type that is passed to the mounter when mounting the
// filesystem.
std::string mount_type_;
// Type of mounter to use for mounting the filesystem.
std::string mounter_type_;
// Filesystem type.
std::string type_;
} // namespace cros_disks