Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 [ | 5 [ |
| 6 { | 6 { |
| 7 "namespace":"fileBrowserPrivate", | 7 "namespace":"fileBrowserPrivate", |
| 8 "description": "none", | 8 "description": "none", |
| 9 "types": [ | 9 "types": [ |
| 10 { | 10 { |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 336 "description": "Approximated completed portion of the transfer opera tion." | 336 "description": "Approximated completed portion of the transfer opera tion." |
| 337 }, | 337 }, |
| 338 "total": { | 338 "total": { |
| 339 "type": "number", | 339 "type": "number", |
| 340 "optional": true, | 340 "optional": true, |
| 341 "description": "Approximated total size of transfer operation." | 341 "description": "Approximated total size of transfer operation." |
| 342 } | 342 } |
| 343 } | 343 } |
| 344 }, | 344 }, |
| 345 { | 345 { |
| 346 "id": "CopyProgressStatus", | |
| 347 "type": "object", | |
| 348 "description": "Payload data for copy status progress updates.", | |
| 349 "properties": { | |
| 350 "type": { | |
| 351 "type": "string", | |
| 352 "enum": ["BEGIN_ENTRY_COPY", "END_ENTRY_COPY", "PROGRESS", "SUCCESS" , "ERROR"], | |
| 353 "description": "The type of the progress event. BEGIN_ENTRY_COPY is called before for each entry copy, END_ENTRY_COPY is called after for each entry copy. PROGRESS is called periodically during copy. SUCCESS is called after all copy is completed. ERROR is called when an error is found." | |
| 354 }, | |
| 355 "url": { | |
| 356 "type": "string", | |
| 357 "optional": true, | |
| 358 "description": "URL for the entry. Available only for BEGIN_ENTRY_CO PY, END_ENTRY_COPY, PROGRESS and SUCCESS." | |
|
satorux1
2013/08/27 06:09:41
If a directory copy is initiated with startCopy(),
hidehiko
2013/08/27 06:32:18
Done.
| |
| 359 }, | |
| 360 "size": { | |
|
satorux1
2013/08/27 06:09:41
size -> num_bytes_copied ? see below
hidehiko
2013/08/27 06:32:18
Will address in the next cycle. Please see also my
| |
| 361 "type": "number", | |
| 362 "optional": true, | |
| 363 "description": "Number of processed bytes for each entry copy. Avail able only for PROGRESS event." | |
|
satorux1
2013/08/27 06:09:41
What does this mean for a directory copy? I'm gues
hidehiko
2013/08/27 06:32:18
No, this won't be cumulative, but just num of copi
satorux1
2013/08/27 06:57:26
Ah this explains a lot.
| |
| 364 }, | |
| 365 "error": { | |
| 366 "type": "integer", | |
| 367 "optional": true, | |
| 368 "description": "Error code of the error. Available only for ERROR ev ent." | |
|
satorux1
2013/08/27 06:09:41
What error code? Shouldn't we define enum codes fo
hidehiko
2013/08/27 06:32:18
Clarified it is FileError's code.
(FileError is be
| |
| 369 } | |
| 370 } | |
| 371 }, | |
| 372 { | |
| 346 "id": "FileTransferCancelStatus", | 373 "id": "FileTransferCancelStatus", |
| 347 "type": "object", | 374 "type": "object", |
| 348 "description": "Payload data for file transfer cancel response.", | 375 "description": "Payload data for file transfer cancel response.", |
| 349 "properties": { | 376 "properties": { |
| 350 "fileUrl": { | 377 "fileUrl": { |
| 351 "type": "string", | 378 "type": "string", |
| 352 "description": "URL of file that is being transfered." | 379 "description": "URL of file that is being transfered." |
| 353 }, | 380 }, |
| 354 "canceled": { | 381 "canceled": { |
| 355 "type": "boolean", | 382 "type": "boolean", |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 830 "name" : "fileTransferCancelStatuses", | 857 "name" : "fileTransferCancelStatuses", |
| 831 "type": "array", | 858 "type": "array", |
| 832 "items": {"$ref": "FileTransferCancelStatus"}, | 859 "items": {"$ref": "FileTransferCancelStatus"}, |
| 833 "description": "The list of FileTransferCancelStatus." | 860 "description": "The list of FileTransferCancelStatus." |
| 834 } | 861 } |
| 835 ] | 862 ] |
| 836 } | 863 } |
| 837 ] | 864 ] |
| 838 }, | 865 }, |
| 839 { | 866 { |
| 867 "name": "startCopy", | |
| 868 "description": "Starts to copy an entry. If the source is directory, the copy is done recursively.", | |
| 869 "parameters": [ | |
| 870 { | |
| 871 "name": "sourceUrl", | |
| 872 "type": "string", | |
| 873 "description": "URL of the source entry to be copied." | |
| 874 }, | |
| 875 { | |
| 876 "name": "targetUrl", | |
| 877 "type": "string", | |
| 878 "description": "URL of the destination location." | |
| 879 }, | |
| 880 { | |
| 881 "name": "callback", | |
| 882 "type": "function", | |
| 883 "description": "Completion callback.", | |
| 884 "parameters": [ | |
| 885 { | |
| 886 "name": "copyId", | |
| 887 "type": "integer", | |
| 888 "description": "ID of the copy task. Can be used to identify the progress, and to cancel the task." | |
| 889 } | |
| 890 ] | |
| 891 } | |
| 892 ] | |
| 893 }, | |
| 894 { | |
| 895 "name": "cancelCopy", | |
| 896 "description": "Cancels the running copy task.", | |
| 897 "parameters": [ | |
| 898 { | |
| 899 "name": "copyId", | |
| 900 "type": "integer", | |
| 901 "description": "ID of the copy task to be cancelled." | |
| 902 }, | |
| 903 { | |
| 904 "name": "callback", | |
| 905 "type": "function", | |
| 906 "optional": true, | |
| 907 "description": "Completion callback of the cancel.", | |
| 908 "parameters": [] | |
| 909 } | |
| 910 ] | |
| 911 }, | |
| 912 { | |
| 840 "name": "setLastModified", | 913 "name": "setLastModified", |
| 841 "description": "Updates last modified to specified time in seconds", | 914 "description": "Updates last modified to specified time in seconds", |
| 842 "parameters": [ | 915 "parameters": [ |
| 843 { | 916 { |
| 844 "name": "fileUrl", | 917 "name": "fileUrl", |
| 845 "type": "string", | 918 "type": "string", |
| 846 "description": "File url from the local file system." | 919 "description": "File url from the local file system." |
| 847 }, | 920 }, |
| 848 { | 921 { |
| 849 "name": "lastModified", | 922 "name": "lastModified", |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1195 "parameters": [ | 1268 "parameters": [ |
| 1196 { | 1269 { |
| 1197 "type": "array", | 1270 "type": "array", |
| 1198 "items": {"$ref": "FileTransferStatus"}, | 1271 "items": {"$ref": "FileTransferStatus"}, |
| 1199 "name": "event", | 1272 "name": "event", |
| 1200 "description": "List of ongoing file statuses for ongoing transfer o perations." | 1273 "description": "List of ongoing file statuses for ongoing transfer o perations." |
| 1201 } | 1274 } |
| 1202 ] | 1275 ] |
| 1203 }, | 1276 }, |
| 1204 { | 1277 { |
| 1278 "name": "onCopyProgress", | |
| 1279 "type": "function", | |
| 1280 "description": "Periodically called during a copy task to notify its pro gress update.", | |
|
satorux1
2013/08/27 06:09:41
events are not something "called". Maybe:
"The ev
hidehiko
2013/08/27 06:32:18
I see. Then how about "fired" as other event's des
satorux1
2013/08/27 06:57:26
fired sgtm
| |
| 1281 "parameters": [ | |
| 1282 { | |
| 1283 "type": "integer", | |
| 1284 "name": "copyId", | |
| 1285 "description": "Id of the copy task of this progress update." | |
| 1286 }, | |
| 1287 { | |
| 1288 "$ref": "CopyProgressStatus", | |
| 1289 "name": "status", | |
| 1290 "description": "Progress update status." | |
| 1291 } | |
| 1292 ] | |
| 1293 }, | |
| 1294 { | |
| 1205 "name": "onDirectoryChanged", | 1295 "name": "onDirectoryChanged", |
| 1206 "type": "function", | 1296 "type": "function", |
| 1207 "description": "Fired when watched file change event is detected in a wa tched directory.", | 1297 "description": "Fired when watched file change event is detected in a wa tched directory.", |
| 1208 "parameters": [ | 1298 "parameters": [ |
| 1209 { | 1299 { |
| 1210 "$ref": "FileWatchEvent", | 1300 "$ref": "FileWatchEvent", |
| 1211 "name": "event", | 1301 "name": "event", |
| 1212 "description": "File watch event information." | 1302 "description": "File watch event information." |
| 1213 } | 1303 } |
| 1214 ] | 1304 ] |
| 1215 }, | 1305 }, |
| 1216 { | 1306 { |
| 1217 "name": "onPreferencesChanged", | 1307 "name": "onPreferencesChanged", |
| 1218 "type": "function", | 1308 "type": "function", |
| 1219 "description": "Fired when file manager preferences change. The preferen ces can be retrieved via 'getPreferences'.", | 1309 "description": "Fired when file manager preferences change. The preferen ces can be retrieved via 'getPreferences'.", |
| 1220 "parameters": [] | 1310 "parameters": [] |
| 1221 }, | 1311 }, |
| 1222 { | 1312 { |
| 1223 "name": "onDriveConnectionStatusChanged", | 1313 "name": "onDriveConnectionStatusChanged", |
| 1224 "type": "function", | 1314 "type": "function", |
| 1225 "description": "Fired when the active network connection state changes. The network connection state can be retrieved via 'getDriveConnectionState'.", | 1315 "description": "Fired when the active network connection state changes. The network connection state can be retrieved via 'getDriveConnectionState'.", |
| 1226 "parameters": [] | 1316 "parameters": [] |
| 1227 } | 1317 } |
| 1228 ] | 1318 ] |
| 1229 } | 1319 } |
| 1230 ] | 1320 ] |
| OLD | NEW |