1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INFO_H_
6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INFO_H_
10 #include "base/files/file_path.h"
11 #include "chrome/common/extensions/api/file_system_provider_capabilities/file_system_provider_capabilities_handler.h"
14 namespace file_system_provider
{
16 // Options for creating the provided file system info.
20 // Only mandatory fields.
21 MountOptions(const std::string
& file_system_id
,
22 const std::string
& display_name
);
24 std::string file_system_id
;
25 std::string display_name
;
27 bool supports_notify_tag
;
28 int opened_files_limit
;
31 // Contains information about the provided file system instance.
32 class ProvidedFileSystemInfo
{
34 ProvidedFileSystemInfo();
36 ProvidedFileSystemInfo(const std::string
& extension_id
,
37 const MountOptions
& mount_options
,
38 const base::FilePath
& mount_path
,
41 extensions::FileSystemProviderSource source
);
43 ~ProvidedFileSystemInfo();
45 const std::string
& extension_id() const { return extension_id_
; }
46 const std::string
& file_system_id() const { return file_system_id_
; }
47 const std::string
& display_name() const { return display_name_
; }
48 bool writable() const { return writable_
; }
49 bool supports_notify_tag() const { return supports_notify_tag_
; }
50 int opened_files_limit() const { return opened_files_limit_
; }
51 const base::FilePath
& mount_path() const { return mount_path_
; }
52 const bool configurable() const { return configurable_
; }
53 const bool watchable() const { return watchable_
; }
54 extensions::FileSystemProviderSource
source() const { return source_
; }
57 // ID of the extension providing this file system.
58 std::string extension_id_
;
60 // ID of the file system.
61 std::string file_system_id_
;
63 // Name of the file system, can be rendered in the UI.
64 std::string display_name_
;
66 // Whether the file system is writable or just read-only.
69 // Supports tags for file/directory change notifications.
70 bool supports_notify_tag_
;
72 // Limit of opened files in parallel. If unlimited, then 0.
73 int opened_files_limit_
;
75 // Mount path of the underlying file system.
76 base::FilePath mount_path_
;
78 // Whether the file system is configurable.
81 // Whether the file system is watchable.
84 // Source of the file system's data.
85 extensions::FileSystemProviderSource source_
;
88 } // namespace file_system_provider
89 } // namespace chromeos
91 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_PROVIDED_FILE_SYSTEM_INFO_H_