Index: components/arc/common/file_system.mojom |
diff --git a/components/arc/common/file_system.mojom b/components/arc/common/file_system.mojom |
index 403e0c76ca043332fa0a6e77fd6d85fefd03f662..35f22a6a95103d26acfdda1b0645a676e0ffcfe3 100644 |
--- a/components/arc/common/file_system.mojom |
+++ b/components/arc/common/file_system.mojom |
@@ -2,12 +2,47 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
// |
-// Next MinVersion: 2 |
+// Next MinVersion: 3 |
module arc.mojom; |
+// Represents a document in Android DocumentsProvider. |
+// See Android docs of DocumentsContract.Document for details. |
+[Extensible] |
Luis Héctor Chávez
2016/12/07 15:59:05
nit: only enums need [Extensible].
Shuhei Takahashi
2016/12/08 05:38:03
Done.
|
+struct Document { |
+ // ID of the document. |
dcheng
2016/12/07 18:30:48
Does this have any structure, or is it just an opa
Shuhei Takahashi
2016/12/08 05:38:03
It's an opaque string, described in DocumentsContr
|
+ string document_id; |
+ |
+ // Display name of the document. |
+ string display_name; |
+ |
+ // MIME type of the document. |
+ // A directory is represented by a document having MIME_TYPE_DIR MIME type. |
+ string mime_type; |
+ |
+ // Size of the document in bytes. If the size is unknown, -1 is set. |
Yusuke Sato
2016/12/07 18:50:27
When is the size unknown typically? Example?
Shuhei Takahashi
2016/12/08 05:38:03
Added examples (directories and streams).
|
+ int64 size; |
+ |
+ // Timestamp when the document was modified last time, in milliseconds |
+ // since UNIX epoch. |
+ uint64 last_modified; |
dcheng
2016/12/07 18:30:48
Can we use Time from common_custom_types.mojom?
Shuhei Takahashi
2016/12/08 05:38:03
Having a typed value sounds pretty, but Time is ma
dcheng
2016/12/09 08:00:18
Would you be willing to file a bug for this and ad
Shuhei Takahashi
2016/12/09 08:17:53
Sure, filed a bug: http://crbug.com/672737
|
+}; |
+ |
// Next method ID: 3 |
Luis Héctor Chávez
2016/12/07 15:59:05
Next method ID: 5
Shuhei Takahashi
2016/12/08 05:38:03
Oops, done.
|
interface FileSystemInstance { |
+ // Queries child documents of the directory specified by |authority| and |
+ // |parent_document_id| in Documents Provider. |
+ // If such a directory does not exist, null is returned. |
+ [MinVersion=2] GetChildDocuments@4(string authority, |
+ string parent_document_id) => |
+ (array<Document>? documents); |
+ |
+ // Queries the document specified by |authority| and |document_id| in |
+ // Documents Provider. |
+ // If such a document does not exist, null is returned. |
+ [MinVersion=2] GetDocument@3(string authority, string document_id) => |
+ (Document? document); |
+ |
// Asks the ContentResolver for the size of the file specified by the URL. |
// If the file does not exist or the size is unknown, -1 is returned. |
[MinVersion=1] GetFileSize@1(string url) => (int64 size); |