/
file_system_provider.clj
586 lines (448 loc) · 29.9 KB
/
file_system_provider.clj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
(ns chromex.ext.file-system-provider
"Use the chrome.fileSystemProvider API to create file systems,
that can be accessible from the file manager on Chrome OS.
* available since Chrome 40
* https://developer.chrome.com/extensions/fileSystemProvider"
(:refer-clojure :only [defmacro defn apply declare meta let partial])
(:require [chromex.wrapgen :refer [gen-wrap-helper]]
[chromex.callgen :refer [gen-call-helper gen-tap-all-events-call]]))
(declare api-table)
(declare gen-call)
; -- functions --------------------------------------------------------------------------------------------------------------
(defmacro mount
"Mounts a file system with the given fileSystemId and displayName. displayName will be shown in the left panel of the Files
app. displayName can contain any characters including '/', but cannot be an empty string. displayName must be descriptive
but doesn't have to be unique. The fileSystemId must not be an empty string.Depending on the type of the file system being
mounted, the source option must be set appropriately.In case of an error, 'runtime.lastError' will be set with a
corresponding error code.
|options| - https://developer.chrome.com/extensions/fileSystemProvider#property-mount-options.
This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.
https://developer.chrome.com/extensions/fileSystemProvider#method-mount."
([options] (gen-call :function ::mount &form options)))
(defmacro unmount
"Unmounts a file system with the given fileSystemId. It must be called after 'onUnmountRequested' is invoked. Also, the
providing extension can decide to perform unmounting if not requested (eg. in case of lost connection, or a file error).In
case of an error, 'runtime.lastError' will be set with a corresponding error code.
|options| - https://developer.chrome.com/extensions/fileSystemProvider#property-unmount-options.
This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.
https://developer.chrome.com/extensions/fileSystemProvider#method-unmount."
([options] (gen-call :function ::unmount &form options)))
(defmacro get-all
"Returns all file systems mounted by the extension.
This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [file-systems] where:
|file-systems| - https://developer.chrome.com/extensions/fileSystemProvider#property-callback-fileSystems.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.
https://developer.chrome.com/extensions/fileSystemProvider#method-getAll."
([] (gen-call :function ::get-all &form)))
(defmacro get
"Returns information about a file system with the passed fileSystemId.
|file-system-id| - https://developer.chrome.com/extensions/fileSystemProvider#property-get-fileSystemId.
This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [file-system] where:
|file-system| - https://developer.chrome.com/extensions/fileSystemProvider#property-callback-fileSystem.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.
https://developer.chrome.com/extensions/fileSystemProvider#method-get."
([file-system-id] (gen-call :function ::get &form file-system-id)))
(defmacro notify
"Notifies about changes in the watched directory at observedPath in recursive mode. If the file system is mounted with
supportsNofityTag, then tag must be provided, and all changes since the last notification always reported, even if the
system was shutdown. The last tag can be obtained with 'getAll'.To use, the file_system_provider.notify manifest option
must be set to true.Value of tag can be any string which is unique per call, so it's possible to identify the last
registered notification. Eg. if the providing extension starts after a reboot, and the last registered notification's tag
is equal to '123', then it should call 'notify' for all changes which happened since the change tagged as '123'. It cannot
be an empty string.Not all providers are able to provide a tag, but if the file system has a changelog, then the tag can be
eg. a change number, or a revision number.Note that if a parent directory is removed, then all descendant entries are also
removed, and if they are watched, then the API must be notified about the fact. Also, if a directory is renamed, then all
descendant entries are in fact removed, as there is no entry under their original paths anymore.In case of an error,
'runtime.lastError' will be set will a corresponding error code.
|options| - https://developer.chrome.com/extensions/fileSystemProvider#property-notify-options.
This function returns a core.async channel of type `promise-chan` which eventually receives a result value.
Signature of the result value put on the channel is [].
In case of an error the channel closes without receiving any value and relevant error object can be obtained via
chromex.error/get-last-error.
https://developer.chrome.com/extensions/fileSystemProvider#method-notify."
([options] (gen-call :function ::notify &form options)))
; -- events -----------------------------------------------------------------------------------------------------------------
;
; docs: https://github.com/binaryage/chromex/#tapping-events
(defmacro tap-on-unmount-requested-events
"Raised when unmounting for the file system with the fileSystemId identifier is requested. In the response, the 'unmount'
API method must be called together with successCallback. If unmounting is not possible (eg. due to a pending operation),
then errorCallback must be called.
Events will be put on the |channel| with signature [::on-unmount-requested [options success-callback error-callback]]
where:
|options| - https://developer.chrome.com/extensions/fileSystemProvider#property-onUnmountRequested-options.
|success-callback| - Callback to be called by the providing extension in case of a success.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/fileSystemProvider#event-onUnmountRequested."
([channel & args] (apply gen-call :event ::on-unmount-requested &form channel args)))
(defmacro tap-on-get-metadata-requested-events
"Raised when metadata of a file or a directory at entryPath is requested. The metadata must be returned with the
successCallback call. In case of an error, errorCallback must be called.
Events will be put on the |channel| with signature [::on-get-metadata-requested [options success-callback error-callback]]
where:
|options| - https://developer.chrome.com/extensions/fileSystemProvider#property-onGetMetadataRequested-options.
|success-callback| - Success callback for the 'onGetMetadataRequested' event.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/fileSystemProvider#event-onGetMetadataRequested."
([channel & args] (apply gen-call :event ::on-get-metadata-requested &form channel args)))
(defmacro tap-on-get-actions-requested-events
"Raised when a list of actions for a set of files or directories at entryPaths is requested. All of the returned actions
must be applicable to each entry. If there are no such actions, an empty array should be returned. The actions must be
returned with the successCallback call. In case of an error, errorCallback must be called.
Events will be put on the |channel| with signature [::on-get-actions-requested [options success-callback error-callback]]
where:
|options| - https://developer.chrome.com/extensions/fileSystemProvider#property-onGetActionsRequested-options.
|success-callback| - Success callback for the 'onGetActionsRequested' event.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/fileSystemProvider#event-onGetActionsRequested."
([channel & args] (apply gen-call :event ::on-get-actions-requested &form channel args)))
(defmacro tap-on-read-directory-requested-events
"Raised when contents of a directory at directoryPath are requested. The results must be returned in chunks by calling the
successCallback several times. In case of an error, errorCallback must be called.
Events will be put on the |channel| with signature [::on-read-directory-requested [options success-callback
error-callback]] where:
|options| - https://developer.chrome.com/extensions/fileSystemProvider#property-onReadDirectoryRequested-options.
|success-callback| - Success callback for the 'onReadDirectoryRequested' event. If more entries will be returned, then
hasMore must be true, and it has to be called again with additional entries. If no more entries are
available, then hasMore must be set to false.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/fileSystemProvider#event-onReadDirectoryRequested."
([channel & args] (apply gen-call :event ::on-read-directory-requested &form channel args)))
(defmacro tap-on-open-file-requested-events
"Raised when opening a file at filePath is requested. If the file does not exist, then the operation must fail. Maximum
number of files opened at once can be specified with MountOptions.
Events will be put on the |channel| with signature [::on-open-file-requested [options success-callback error-callback]]
where:
|options| - https://developer.chrome.com/extensions/fileSystemProvider#property-onOpenFileRequested-options.
|success-callback| - Callback to be called by the providing extension in case of a success.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/fileSystemProvider#event-onOpenFileRequested."
([channel & args] (apply gen-call :event ::on-open-file-requested &form channel args)))
(defmacro tap-on-close-file-requested-events
"Raised when opening a file previously opened with openRequestId is requested to be closed.
Events will be put on the |channel| with signature [::on-close-file-requested [options success-callback error-callback]]
where:
|options| - https://developer.chrome.com/extensions/fileSystemProvider#property-onCloseFileRequested-options.
|success-callback| - Callback to be called by the providing extension in case of a success.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/fileSystemProvider#event-onCloseFileRequested."
([channel & args] (apply gen-call :event ::on-close-file-requested &form channel args)))
(defmacro tap-on-read-file-requested-events
"Raised when reading contents of a file opened previously with openRequestId is requested. The results must be returned in
chunks by calling successCallback several times. In case of an error, errorCallback must be called.
Events will be put on the |channel| with signature [::on-read-file-requested [options success-callback error-callback]]
where:
|options| - https://developer.chrome.com/extensions/fileSystemProvider#property-onReadFileRequested-options.
|success-callback| - Success callback for the 'onReadFileRequested' event. If more data will be returned, then hasMore
must be true, and it has to be called again with additional entries. If no more data is available,
then hasMore must be set to false.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/fileSystemProvider#event-onReadFileRequested."
([channel & args] (apply gen-call :event ::on-read-file-requested &form channel args)))
(defmacro tap-on-create-directory-requested-events
"Raised when creating a directory is requested. The operation must fail with the EXISTS error if the target directory
already exists. If recursive is true, then all of the missing directories on the directory path must be created.
Events will be put on the |channel| with signature [::on-create-directory-requested [options success-callback
error-callback]] where:
|options| - https://developer.chrome.com/extensions/fileSystemProvider#property-onCreateDirectoryRequested-options.
|success-callback| - Callback to be called by the providing extension in case of a success.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/fileSystemProvider#event-onCreateDirectoryRequested."
([channel & args] (apply gen-call :event ::on-create-directory-requested &form channel args)))
(defmacro tap-on-delete-entry-requested-events
"Raised when deleting an entry is requested. If recursive is true, and the entry is a directory, then all of the entries
inside must be recursively deleted as well.
Events will be put on the |channel| with signature [::on-delete-entry-requested [options success-callback error-callback]]
where:
|options| - https://developer.chrome.com/extensions/fileSystemProvider#property-onDeleteEntryRequested-options.
|success-callback| - Callback to be called by the providing extension in case of a success.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/fileSystemProvider#event-onDeleteEntryRequested."
([channel & args] (apply gen-call :event ::on-delete-entry-requested &form channel args)))
(defmacro tap-on-create-file-requested-events
"Raised when creating a file is requested. If the file already exists, then errorCallback must be called with the 'EXISTS'
error code.
Events will be put on the |channel| with signature [::on-create-file-requested [options success-callback error-callback]]
where:
|options| - https://developer.chrome.com/extensions/fileSystemProvider#property-onCreateFileRequested-options.
|success-callback| - Callback to be called by the providing extension in case of a success.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/fileSystemProvider#event-onCreateFileRequested."
([channel & args] (apply gen-call :event ::on-create-file-requested &form channel args)))
(defmacro tap-on-copy-entry-requested-events
"Raised when copying an entry (recursively if a directory) is requested. If an error occurs, then errorCallback must be
called.
Events will be put on the |channel| with signature [::on-copy-entry-requested [options success-callback error-callback]]
where:
|options| - https://developer.chrome.com/extensions/fileSystemProvider#property-onCopyEntryRequested-options.
|success-callback| - Callback to be called by the providing extension in case of a success.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/fileSystemProvider#event-onCopyEntryRequested."
([channel & args] (apply gen-call :event ::on-copy-entry-requested &form channel args)))
(defmacro tap-on-move-entry-requested-events
"Raised when moving an entry (recursively if a directory) is requested. If an error occurs, then errorCallback must be
called.
Events will be put on the |channel| with signature [::on-move-entry-requested [options success-callback error-callback]]
where:
|options| - https://developer.chrome.com/extensions/fileSystemProvider#property-onMoveEntryRequested-options.
|success-callback| - Callback to be called by the providing extension in case of a success.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/fileSystemProvider#event-onMoveEntryRequested."
([channel & args] (apply gen-call :event ::on-move-entry-requested &form channel args)))
(defmacro tap-on-truncate-requested-events
"Raised when truncating a file to a desired length is requested. If an error occurs, then errorCallback must be called.
Events will be put on the |channel| with signature [::on-truncate-requested [options success-callback error-callback]]
where:
|options| - https://developer.chrome.com/extensions/fileSystemProvider#property-onTruncateRequested-options.
|success-callback| - Callback to be called by the providing extension in case of a success.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/fileSystemProvider#event-onTruncateRequested."
([channel & args] (apply gen-call :event ::on-truncate-requested &form channel args)))
(defmacro tap-on-write-file-requested-events
"Raised when writing contents to a file opened previously with openRequestId is requested.
Events will be put on the |channel| with signature [::on-write-file-requested [options success-callback error-callback]]
where:
|options| - https://developer.chrome.com/extensions/fileSystemProvider#property-onWriteFileRequested-options.
|success-callback| - Callback to be called by the providing extension in case of a success.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/fileSystemProvider#event-onWriteFileRequested."
([channel & args] (apply gen-call :event ::on-write-file-requested &form channel args)))
(defmacro tap-on-abort-requested-events
"Raised when aborting an operation with operationRequestId is requested. The operation executed with operationRequestId must
be immediately stopped and successCallback of this abort request executed. If aborting fails, then errorCallback must be
called. Note, that callbacks of the aborted operation must not be called, as they will be ignored. Despite calling
errorCallback, the request may be forcibly aborted.
Events will be put on the |channel| with signature [::on-abort-requested [options success-callback error-callback]] where:
|options| - https://developer.chrome.com/extensions/fileSystemProvider#property-onAbortRequested-options.
|success-callback| - Callback to be called by the providing extension in case of a success.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/fileSystemProvider#event-onAbortRequested."
([channel & args] (apply gen-call :event ::on-abort-requested &form channel args)))
(defmacro tap-on-configure-requested-events
"Raised when showing a configuration dialog for fileSystemId is requested. If it's handled, the
file_system_provider.configurable manfiest option must be set to true.
Events will be put on the |channel| with signature [::on-configure-requested [options success-callback error-callback]]
where:
|options| - https://developer.chrome.com/extensions/fileSystemProvider#property-onConfigureRequested-options.
|success-callback| - Callback to be called by the providing extension in case of a success.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/fileSystemProvider#event-onConfigureRequested."
([channel & args] (apply gen-call :event ::on-configure-requested &form channel args)))
(defmacro tap-on-mount-requested-events
"Raised when showing a dialog for mounting a new file system is requested. If the extension/app is a file handler, then this
event shouldn't be handled. Instead app.runtime.onLaunched should be handled in order to mount new file systems when a file
is opened. For multiple mounts, the file_system_provider.multiple_mounts manifest option must be set to true.
Events will be put on the |channel| with signature [::on-mount-requested [success-callback error-callback]] where:
|success-callback| - Callback to be called by the providing extension in case of a success.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/fileSystemProvider#event-onMountRequested."
([channel & args] (apply gen-call :event ::on-mount-requested &form channel args)))
(defmacro tap-on-add-watcher-requested-events
"Raised when setting a new directory watcher is requested. If an error occurs, then errorCallback must be called.
Events will be put on the |channel| with signature [::on-add-watcher-requested [options success-callback error-callback]]
where:
|options| - https://developer.chrome.com/extensions/fileSystemProvider#property-onAddWatcherRequested-options.
|success-callback| - Callback to be called by the providing extension in case of a success.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/fileSystemProvider#event-onAddWatcherRequested."
([channel & args] (apply gen-call :event ::on-add-watcher-requested &form channel args)))
(defmacro tap-on-remove-watcher-requested-events
"Raised when the watcher should be removed. If an error occurs, then errorCallback must be called.
Events will be put on the |channel| with signature [::on-remove-watcher-requested [options success-callback
error-callback]] where:
|options| - https://developer.chrome.com/extensions/fileSystemProvider#property-onRemoveWatcherRequested-options.
|success-callback| - Callback to be called by the providing extension in case of a success.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/fileSystemProvider#event-onRemoveWatcherRequested."
([channel & args] (apply gen-call :event ::on-remove-watcher-requested &form channel args)))
(defmacro tap-on-execute-action-requested-events
"Raised when executing an action for a set of files or directories is\\ requested. After the action is completed,
successCallback must be called. On error, errorCallback must be called.
Events will be put on the |channel| with signature [::on-execute-action-requested [options success-callback
error-callback]] where:
|options| - https://developer.chrome.com/extensions/fileSystemProvider#property-onExecuteActionRequested-options.
|success-callback| - Callback to be called by the providing extension in case of a success.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/extensions/fileSystemProvider#event-onExecuteActionRequested."
([channel & args] (apply gen-call :event ::on-execute-action-requested &form channel args)))
; -- convenience ------------------------------------------------------------------------------------------------------------
(defmacro tap-all-events
"Taps all valid non-deprecated events in chromex.ext.file-system-provider namespace."
[chan]
(gen-tap-all-events-call api-table (meta &form) chan))
; ---------------------------------------------------------------------------------------------------------------------------
; -- API TABLE --------------------------------------------------------------------------------------------------------------
; ---------------------------------------------------------------------------------------------------------------------------
(def api-table
{:namespace "chrome.fileSystemProvider",
:since "40",
:functions
[{:id ::mount,
:name "mount",
:callback? true,
:params [{:name "options", :type "object"} {:name "callback", :optional? true, :type :callback}]}
{:id ::unmount,
:name "unmount",
:callback? true,
:params [{:name "options", :type "object"} {:name "callback", :optional? true, :type :callback}]}
{:id ::get-all,
:name "getAll",
:callback? true,
:params
[{:name "callback",
:type :callback,
:callback {:params [{:name "file-systems", :type "[array-of-fileSystemProvider.FileSystemInfos]"}]}}]}
{:id ::get,
:name "get",
:since "42",
:callback? true,
:params
[{:name "file-system-id", :type "string"}
{:name "callback",
:type :callback,
:callback {:params [{:name "file-system", :type "fileSystemProvider.FileSystemInfo"}]}}]}
{:id ::notify,
:name "notify",
:since "45",
:callback? true,
:params [{:name "options", :type "object"} {:name "callback", :optional? true, :type :callback}]}],
:events
[{:id ::on-unmount-requested,
:name "onUnmountRequested",
:params
[{:name "options", :type "object"}
{:name "success-callback", :type "function"}
{:name "error-callback", :type :callback}]}
{:id ::on-get-metadata-requested,
:name "onGetMetadataRequested",
:params
[{:name "options", :type "object"}
{:name "success-callback", :type "function"}
{:name "error-callback", :type :callback}]}
{:id ::on-get-actions-requested,
:name "onGetActionsRequested",
:since "48",
:params
[{:name "options", :type "object"}
{:name "success-callback", :type "function"}
{:name "error-callback", :type :callback}]}
{:id ::on-read-directory-requested,
:name "onReadDirectoryRequested",
:params
[{:name "options", :type "object"}
{:name "success-callback", :type "function"}
{:name "error-callback", :type :callback}]}
{:id ::on-open-file-requested,
:name "onOpenFileRequested",
:params
[{:name "options", :type "object"}
{:name "success-callback", :type "function"}
{:name "error-callback", :type :callback}]}
{:id ::on-close-file-requested,
:name "onCloseFileRequested",
:params
[{:name "options", :type "object"}
{:name "success-callback", :type "function"}
{:name "error-callback", :type :callback}]}
{:id ::on-read-file-requested,
:name "onReadFileRequested",
:params
[{:name "options", :type "object"}
{:name "success-callback", :type "function"}
{:name "error-callback", :type :callback}]}
{:id ::on-create-directory-requested,
:name "onCreateDirectoryRequested",
:params
[{:name "options", :type "object"}
{:name "success-callback", :type "function"}
{:name "error-callback", :type :callback}]}
{:id ::on-delete-entry-requested,
:name "onDeleteEntryRequested",
:params
[{:name "options", :type "object"}
{:name "success-callback", :type "function"}
{:name "error-callback", :type :callback}]}
{:id ::on-create-file-requested,
:name "onCreateFileRequested",
:params
[{:name "options", :type "object"}
{:name "success-callback", :type "function"}
{:name "error-callback", :type :callback}]}
{:id ::on-copy-entry-requested,
:name "onCopyEntryRequested",
:params
[{:name "options", :type "object"}
{:name "success-callback", :type "function"}
{:name "error-callback", :type :callback}]}
{:id ::on-move-entry-requested,
:name "onMoveEntryRequested",
:params
[{:name "options", :type "object"}
{:name "success-callback", :type "function"}
{:name "error-callback", :type :callback}]}
{:id ::on-truncate-requested,
:name "onTruncateRequested",
:params
[{:name "options", :type "object"}
{:name "success-callback", :type "function"}
{:name "error-callback", :type :callback}]}
{:id ::on-write-file-requested,
:name "onWriteFileRequested",
:params
[{:name "options", :type "object"}
{:name "success-callback", :type "function"}
{:name "error-callback", :type :callback}]}
{:id ::on-abort-requested,
:name "onAbortRequested",
:params
[{:name "options", :type "object"}
{:name "success-callback", :type "function"}
{:name "error-callback", :type :callback}]}
{:id ::on-configure-requested,
:name "onConfigureRequested",
:since "44",
:params
[{:name "options", :type "object"}
{:name "success-callback", :type "function"}
{:name "error-callback", :type :callback}]}
{:id ::on-mount-requested,
:name "onMountRequested",
:since "44",
:params [{:name "success-callback", :type "function"} {:name "error-callback", :type :callback}]}
{:id ::on-add-watcher-requested,
:name "onAddWatcherRequested",
:since "45",
:params
[{:name "options", :type "object"}
{:name "success-callback", :type "function"}
{:name "error-callback", :type :callback}]}
{:id ::on-remove-watcher-requested,
:name "onRemoveWatcherRequested",
:since "45",
:params
[{:name "options", :type "object"}
{:name "success-callback", :type "function"}
{:name "error-callback", :type :callback}]}
{:id ::on-execute-action-requested,
:name "onExecuteActionRequested",
:since "48",
:params
[{:name "options", :type "object"}
{:name "success-callback", :type "function"}
{:name "error-callback", :type :callback}]}]})
; -- helpers ----------------------------------------------------------------------------------------------------------------
; code generation for native API wrapper
(defmacro gen-wrap [kind item-id config & args]
(apply gen-wrap-helper api-table kind item-id config args))
; code generation for API call-site
(def gen-call (partial gen-call-helper api-table))