Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 // | 4 // |
| 5 // Next MinVersion: 2 | 5 // Next MinVersion: 3 |
| 6 | 6 |
| 7 module arc.mojom; | 7 module arc.mojom; |
| 8 | 8 |
| 9 // Represents a document in Android DocumentsProvider. | |
| 10 // See Android docs of DocumentsContract.Document for details. | |
| 11 [Extensible] | |
| 12 struct Document { | |
| 13 // ID of the document. | |
| 14 string document_id; | |
| 15 | |
| 16 // Display name of the document. | |
| 17 string display_name; | |
| 18 | |
| 19 // MIME type of the document. | |
| 20 // A directory is represented by a document having MIME_TYPE_DIR MIME type. | |
| 21 string mime_type; | |
| 22 | |
| 23 // Size of the document in bytes. If the size is unknown, -1 is set. | |
| 24 int64 size; | |
| 25 | |
| 26 // Timestamp when the document was modified last time, in milliseconds | |
| 27 // since UNIX epoch. | |
| 28 uint64 last_modified; | |
| 29 }; | |
| 30 | |
| 9 // Next method ID: 3 | 31 // Next method ID: 3 |
| 10 interface FileSystemInstance { | 32 interface FileSystemInstance { |
| 33 // Queries the child documents of the directory specified by |authority| and | |
| 34 // |parent_document_id|. | |
| 35 // If such a directory does not exist, null is returned. | |
| 36 [MinVersion=2] GetChildDocuments@4(string authority, | |
| 37 string parent_document_id) => | |
|
hashimoto
2016/12/07 10:02:22
qq #1: Existing methods like GetFileSize() and Ope
Shuhei Takahashi
2016/12/07 10:35:32
We can make IPC interface to solely use content UR
hashimoto
2016/12/07 10:51:00
How about putting an Android doc URL?
https://deve
Shuhei Takahashi
2016/12/08 05:38:03
Thanks, added a link.
| |
| 38 (array<Document>? documents); | |
| 39 | |
| 40 // Queries the document specified by |authority| and |document_id|. | |
| 41 // If such a document does not exist, null is returned. | |
| 42 [MinVersion=2] GetDocument@3(string authority, string document_id) => | |
| 43 (Document? document); | |
| 44 | |
| 11 // Asks the ContentResolver for the size of the file specified by the URL. | 45 // Asks the ContentResolver for the size of the file specified by the URL. |
| 12 // If the file does not exist or the size is unknown, -1 is returned. | 46 // If the file does not exist or the size is unknown, -1 is returned. |
| 13 [MinVersion=1] GetFileSize@1(string url) => (int64 size); | 47 [MinVersion=1] GetFileSize@1(string url) => (int64 size); |
| 14 | 48 |
| 15 // Asks the ContentResolver to get a FD to read the file specified by the | 49 // Asks the ContentResolver to get a FD to read the file specified by the |
| 16 // URL. | 50 // URL. |
| 17 [MinVersion=1] OpenFileToRead@2(string url) => (handle? fd); | 51 [MinVersion=1] OpenFileToRead@2(string url) => (handle? fd); |
| 18 | 52 |
| 19 // Requests MediaProvider to scan specified files. | 53 // Requests MediaProvider to scan specified files. |
| 20 // When the specified file does not exist, the corresponding entry in | 54 // When the specified file does not exist, the corresponding entry in |
| 21 // MediaProvider is removed. | 55 // MediaProvider is removed. |
| 22 RequestMediaScan@0(array<string> paths); | 56 RequestMediaScan@0(array<string> paths); |
| 23 }; | 57 }; |
| OLD | NEW |