/
autotest_private.clj
760 lines (584 loc) · 30.7 KB
/
autotest_private.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
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
(ns chromex.ext.autotest-private
"API for integration testing. To be used on test images with a test component
extension.
* available since Chrome 30"
(: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 logout
"Logout of a user session."
([] (gen-call :function ::logout &form)))
(defmacro restart
"Restart the browser."
([] (gen-call :function ::restart &form)))
(defmacro shutdown
"Shutdown the browser.
|force| - if set, ignore ongoing downloads and onunbeforeunload handlers."
([force] (gen-call :function ::shutdown &form force)))
(defmacro login-status
"Get login status.
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 [status] where:
|status| - ?
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."
([] (gen-call :function ::login-status &form)))
(defmacro lock-screen
"Locks the screen."
([] (gen-call :function ::lock-screen &form)))
(defmacro get-extensions-info
"Get info about installed extensions.
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 [info] where:
|info| - ?
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."
([] (gen-call :function ::get-extensions-info &form)))
(defmacro simulate-asan-memory-bug
"Simulates a memory access bug for asan testing."
([] (gen-call :function ::simulate-asan-memory-bug &form)))
(defmacro set-touchpad-sensitivity
"Set the touchpad pointer sensitivity setting.
|value| - the pointer sensitivity setting index."
([value] (gen-call :function ::set-touchpad-sensitivity &form value)))
(defmacro set-tap-to-click
"Turn on/off tap-to-click for the touchpad.
|enabled| - if set, enable tap-to-click."
([enabled] (gen-call :function ::set-tap-to-click &form enabled)))
(defmacro set-three-finger-click
"Turn on/off three finger click for the touchpad.
|enabled| - if set, enable three finger click."
([enabled] (gen-call :function ::set-three-finger-click &form enabled)))
(defmacro set-tap-dragging
"Turn on/off tap dragging for the touchpad.
|enabled| - if set, enable tap dragging."
([enabled] (gen-call :function ::set-tap-dragging &form enabled)))
(defmacro set-natural-scroll
"Turn on/off Australian scrolling for devices other than wheel mouse.
|enabled| - if set, enable Australian scrolling."
([enabled] (gen-call :function ::set-natural-scroll &form enabled)))
(defmacro set-mouse-sensitivity
"Set the mouse pointer sensitivity setting.
|value| - the pointer sensitivity setting index."
([value] (gen-call :function ::set-mouse-sensitivity &form value)))
(defmacro set-primary-button-right
"Swap the primary mouse button for left click.
|right| - if set, swap the primary mouse button."
([right] (gen-call :function ::set-primary-button-right &form right)))
(defmacro set-mouse-reverse-scroll
"Turn on/off reverse scrolling for mice.
|enabled| - if set, enable reverse scrolling."
([enabled] (gen-call :function ::set-mouse-reverse-scroll &form enabled)))
(defmacro get-visible-notifications
"Get visible notifications on the system.
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 [notifications] where:
|notifications| - ?
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."
([] (gen-call :function ::get-visible-notifications &form)))
(defmacro get-arc-state
"Get state of the ARC session.
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 [result] where:
|result| - ?
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."
([] (gen-call :function ::get-arc-state &form)))
(defmacro get-play-store-state
"Get state of the Play Store.
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 [result] where:
|result| - ?
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."
([] (gen-call :function ::get-play-store-state &form)))
(defmacro get-printer-list
"Get list of available printers
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 [printers] where:
|printers| - ?
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."
([] (gen-call :function ::get-printer-list &form)))
(defmacro is-app-shown
"Returns true if requested app is shown in Chrome.
|app-id| - ?
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 [app-shown] where:
|app-shown| - ?
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."
([app-id] (gen-call :function ::is-app-shown &form app-id)))
(defmacro is-arc-provisioned
"Returns true if ARC is provisioned. [deprecated='Use getArcState()']
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 [arc-provisioned] where:
|arc-provisioned| - ?
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."
([] (gen-call :function ::is-arc-provisioned &form)))
(defmacro get-arc-app
"Gets information about the requested ARC app.
|app-id| - ?
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 [package] where:
|package| - ?
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."
([app-id] (gen-call :function ::get-arc-app &form app-id)))
(defmacro get-arc-package
"Gets information about requested ARC package.
|package-name| - ?
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 [package] where:
|package| - ?
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."
([package-name] (gen-call :function ::get-arc-package &form package-name)))
(defmacro launch-arc-app
"Launches ARC app with optional intent. Returns true if ARC is active, app exists and launch request is passed to Android.
|app-id| - ?
|intent| - ?
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 [app-launched] where:
|app-launched| - ?
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."
([app-id intent] (gen-call :function ::launch-arc-app &form app-id intent)))
(defmacro launch-app
"Launches an application from the launcher with the given appId.
|app-id| - ?
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."
([app-id] (gen-call :function ::launch-app &form app-id)))
(defmacro close-app
"Closes an application the given appId in case it was running.
|app-id| - ?
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."
([app-id] (gen-call :function ::close-app &form app-id)))
(defmacro update-printer
"Update printer. Printer with empty ID is considered new.
|printer| - ?"
([printer] (gen-call :function ::update-printer &form printer)))
(defmacro remove-printer
"Remove printer.
|printer-id| - ?"
([printer-id] (gen-call :function ::remove-printer &form printer-id)))
(defmacro set-play-store-enabled
"Enable/disable the Play Store.
|enabled| - if set, enable the Play Store.
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."
([enabled] (gen-call :function ::set-play-store-enabled &form enabled)))
(defmacro get-histogram
"Get details about a histogram displayed at chrome://histogram.
|name| - Histogram name, e.g. 'Accessibility.CrosAutoclick'.
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 [histogram] where:
|histogram| - ?
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."
([name] (gen-call :function ::get-histogram &form name)))
(defmacro run-crostini-installer
"Run the crostini installer GUI to install the default crostini vm / container and create sshfs mount. The installer
launches the crostini terminal app on completion. The installer expects that crostini is not already installed.
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."
([] (gen-call :function ::run-crostini-installer &form)))
(defmacro run-crostini-uninstaller
"Run the crostini uninstaller GUI to remove the default crostini vm / container. The callback is invoked upon completion.
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."
([] (gen-call :function ::run-crostini-uninstaller &form)))
(defmacro set-crostini-enabled
"Enable/disable Crostini in preferences.
|enabled| - Enable Crostini.
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."
([enabled] (gen-call :function ::set-crostini-enabled &form enabled)))
(defmacro export-crostini
"Export the crostini container.
|path| - The path in Downloads to save the export.
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."
([path] (gen-call :function ::export-crostini &form path)))
(defmacro import-crostini
"Import the crostini container.
|path| - The path in Downloads to read the import.
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."
([path] (gen-call :function ::import-crostini &form path)))
(defmacro take-screenshot
"Takes a screenshot and returns the data in base64 encoded PNG format.
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 [base64-png] where:
|base64-png| - ?
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."
([] (gen-call :function ::take-screenshot &form)))
(defmacro bootstrap-machine-learning-service
"Makes a basic request to ML Service, triggering 1. ML Service daemon startup, and 2. the initial D-Bus -> Mojo IPC
bootstrap.
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."
([] (gen-call :function ::bootstrap-machine-learning-service &form)))
(defmacro set-assistant-enabled
"Enable/disable the Google Assistant
|enabled| - ?
|timeout-ms| - ?
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."
([enabled timeout-ms] (gen-call :function ::set-assistant-enabled &form enabled timeout-ms)))
(defmacro send-assistant-text-query
"Send a text query via Google Assistant.
|query| - ?
|timeout-ms| - ?
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 [response] where:
|response| - ?
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."
([query timeout-ms] (gen-call :function ::send-assistant-text-query &form query timeout-ms)))
(defmacro set-whitelisted-pref
"Set value for the specified user pref in the pref tree.
|pref-name| - ?
|value| - ?
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."
([pref-name value] (gen-call :function ::set-whitelisted-pref &form pref-name value)))
(defmacro set-crostini-app-scaled
"Enable/disable a Crostini app's 'scaled' property.
|app-id| - The Crostini application ID.
|scaled| - The app is 'scaled' when shown, which means it uses low display density.
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."
([app-id scaled] (gen-call :function ::set-crostini-app-scaled &form app-id scaled)))
(defmacro get-primary-display-scale-factor
"Get the primary display scale factor. |callback| is invoked with the scale factor.
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 [scale-factor] where:
|scale-factor| - ?
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."
([] (gen-call :function ::get-primary-display-scale-factor &form)))
(defmacro is-tablet-mode-enabled
"Get the tablet mode enabled status. |callback| is invoked with the tablet mode enablement status.
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 [enabled] where:
|enabled| - ?
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."
([] (gen-call :function ::is-tablet-mode-enabled &form)))
(defmacro set-tablet-mode-enabled
"Enable/disable tablet mode. After calling this function, it won't be possible to physically switch to/from tablet mode
since that functionality will be disabled.
|enabled| - if set, enable tablet mode.
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 [enabled] where:
|enabled| - ?
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."
([enabled] (gen-call :function ::set-tablet-mode-enabled &form enabled)))
(defmacro get-shelf-auto-hide-behavior
"Get the shelf auto hide behavior.
|display-id| - display that contains the shelf. |callback| is invoked with the shelf auto hide behavior. Possible
behavior values are: 'always', 'never' or 'hidden'.
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 [behavior] where:
|behavior| - ?
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."
([display-id] (gen-call :function ::get-shelf-auto-hide-behavior &form display-id)))
(defmacro set-shelf-auto-hide-behavior
"Set the shelf auto hide behavior.
|display-id| - display that contains the shelf.
|behavior| - an enum of 'always', 'never' or 'hidden'.
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."
([display-id behavior] (gen-call :function ::set-shelf-auto-hide-behavior &form display-id behavior)))
(defmacro get-shelf-alignment
"Get the shelf alignment.
|display-id| - display that contains the shelf. |callback| is invoked with the shelf alignment type.
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 [alignment] where:
|alignment| - ?
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."
([display-id] (gen-call :function ::get-shelf-alignment &form display-id)))
(defmacro set-shelf-alignment
"Set the shelf alignment.
|display-id| - display that contains the shelf.
|alignment| - the type of alignment to set.
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."
([display-id alignment] (gen-call :function ::set-shelf-alignment &form display-id alignment)))
(defmacro show-virtual-keyboard-if-enabled
"Show virtual keyboard of the current input method if it's available."
([] (gen-call :function ::show-virtual-keyboard-if-enabled &form)))
; -- convenience ------------------------------------------------------------------------------------------------------------
(defmacro tap-all-events
"Taps all valid non-deprecated events in chromex.ext.autotest-private namespace."
[chan]
(gen-tap-all-events-call api-table (meta &form) chan))
; ---------------------------------------------------------------------------------------------------------------------------
; -- API TABLE --------------------------------------------------------------------------------------------------------------
; ---------------------------------------------------------------------------------------------------------------------------
(def api-table
{:namespace "chrome.autotestPrivate",
:since "30",
:functions
[{:id ::logout, :name "logout"}
{:id ::restart, :name "restart"}
{:id ::shutdown, :name "shutdown", :params [{:name "force", :type "boolean"}]}
{:id ::login-status,
:name "loginStatus",
:callback? true,
:params [{:name "callback", :type :callback, :callback {:params [{:name "status", :type "object"}]}}]}
{:id ::lock-screen, :name "lockScreen"}
{:id ::get-extensions-info,
:name "getExtensionsInfo",
:callback? true,
:params [{:name "callback", :type :callback, :callback {:params [{:name "info", :type "object"}]}}]}
{:id ::simulate-asan-memory-bug, :name "simulateAsanMemoryBug"}
{:id ::set-touchpad-sensitivity, :name "setTouchpadSensitivity", :params [{:name "value", :type "integer"}]}
{:id ::set-tap-to-click, :name "setTapToClick", :params [{:name "enabled", :type "boolean"}]}
{:id ::set-three-finger-click, :name "setThreeFingerClick", :params [{:name "enabled", :type "boolean"}]}
{:id ::set-tap-dragging, :name "setTapDragging", :params [{:name "enabled", :type "boolean"}]}
{:id ::set-natural-scroll, :name "setNaturalScroll", :params [{:name "enabled", :type "boolean"}]}
{:id ::set-mouse-sensitivity, :name "setMouseSensitivity", :params [{:name "value", :type "integer"}]}
{:id ::set-primary-button-right, :name "setPrimaryButtonRight", :params [{:name "right", :type "boolean"}]}
{:id ::set-mouse-reverse-scroll,
:name "setMouseReverseScroll",
:since "62",
:params [{:name "enabled", :type "boolean"}]}
{:id ::get-visible-notifications,
:name "getVisibleNotifications",
:since "52",
:callback? true,
:params
[{:name "callback", :type :callback, :callback {:params [{:name "notifications", :type "[array-of-objects]"}]}}]}
{:id ::get-arc-state,
:name "getArcState",
:since "74",
:callback? true,
:params [{:name "callback", :type :callback, :callback {:params [{:name "result", :type "object"}]}}]}
{:id ::get-play-store-state,
:name "getPlayStoreState",
:since "60",
:callback? true,
:params [{:name "callback", :type :callback, :callback {:params [{:name "result", :type "object"}]}}]}
{:id ::get-printer-list,
:name "getPrinterList",
:since "65",
:callback? true,
:params
[{:name "callback",
:type :callback,
:callback {:params [{:name "printers", :type "[array-of-autotestPrivate.Printers]"}]}}]}
{:id ::is-app-shown,
:name "isAppShown",
:since "71",
:callback? true,
:params
[{:name "app-id", :type "string"}
{:name "callback", :type :callback, :callback {:params [{:name "app-shown", :type "boolean"}]}}]}
{:id ::is-arc-provisioned,
:name "isArcProvisioned",
:since "71",
:callback? true,
:params [{:name "callback", :type :callback, :callback {:params [{:name "arc-provisioned", :type "boolean"}]}}]}
{:id ::get-arc-app,
:name "getArcApp",
:since "73",
:callback? true,
:params
[{:name "app-id", :type "string"}
{:name "callback", :type :callback, :callback {:params [{:name "package", :type "object"}]}}]}
{:id ::get-arc-package,
:name "getArcPackage",
:since "73",
:callback? true,
:params
[{:name "package-name", :type "string"}
{:name "callback", :type :callback, :callback {:params [{:name "package", :type "object"}]}}]}
{:id ::launch-arc-app,
:name "launchArcApp",
:since "73",
:callback? true,
:params
[{:name "app-id", :type "string"}
{:name "intent", :type "string"}
{:name "callback", :type :callback, :callback {:params [{:name "app-launched", :type "boolean"}]}}]}
{:id ::launch-app,
:name "launchApp",
:since "71",
:callback? true,
:params [{:name "app-id", :type "string"} {:name "callback", :type :callback}]}
{:id ::close-app,
:name "closeApp",
:since "73",
:callback? true,
:params [{:name "app-id", :type "string"} {:name "callback", :type :callback}]}
{:id ::update-printer,
:name "updatePrinter",
:since "68",
:params [{:name "printer", :type "autotestPrivate.Printer"}]}
{:id ::remove-printer, :name "removePrinter", :since "68", :params [{:name "printer-id", :type "string"}]}
{:id ::set-play-store-enabled,
:name "setPlayStoreEnabled",
:since "60",
:callback? true,
:params [{:name "enabled", :type "boolean"} {:name "callback", :type :callback}]}
{:id ::get-histogram,
:name "getHistogram",
:since "71",
:callback? true,
:params
[{:name "name", :type "string"}
{:name "callback", :type :callback, :callback {:params [{:name "histogram", :type "object"}]}}]}
{:id ::run-crostini-installer,
:name "runCrostiniInstaller",
:since "70",
:callback? true,
:params [{:name "callback", :type :callback}]}
{:id ::run-crostini-uninstaller,
:name "runCrostiniUninstaller",
:since "71",
:callback? true,
:params [{:name "callback", :type :callback}]}
{:id ::set-crostini-enabled,
:name "setCrostiniEnabled",
:since "71",
:callback? true,
:params [{:name "enabled", :type "boolean"} {:name "callback", :type :callback}]}
{:id ::export-crostini,
:name "exportCrostini",
:since "75",
:callback? true,
:params [{:name "path", :type "string"} {:name "callback", :type :callback}]}
{:id ::import-crostini,
:name "importCrostini",
:since "75",
:callback? true,
:params [{:name "path", :type "string"} {:name "callback", :type :callback}]}
{:id ::take-screenshot,
:name "takeScreenshot",
:since "71",
:callback? true,
:params [{:name "callback", :type :callback, :callback {:params [{:name "base64-png", :type "string"}]}}]}
{:id ::bootstrap-machine-learning-service,
:name "bootstrapMachineLearningService",
:since "71",
:callback? true,
:params [{:name "callback", :type :callback}]}
{:id ::set-assistant-enabled,
:name "setAssistantEnabled",
:since "72",
:callback? true,
:params
[{:name "enabled", :type "boolean"} {:name "timeout-ms", :type "integer"} {:name "callback", :type :callback}]}
{:id ::send-assistant-text-query,
:name "sendAssistantTextQuery",
:since "73",
:callback? true,
:params
[{:name "query", :type "string"}
{:name "timeout-ms", :type "integer"}
{:name "callback", :type :callback, :callback {:params [{:name "response", :type "object"}]}}]}
{:id ::set-whitelisted-pref,
:name "setWhitelistedPref",
:since "74",
:callback? true,
:params [{:name "pref-name", :type "string"} {:name "value", :type "any"} {:name "callback", :type :callback}]}
{:id ::set-crostini-app-scaled,
:name "setCrostiniAppScaled",
:since "73",
:callback? true,
:params [{:name "app-id", :type "string"} {:name "scaled", :type "boolean"} {:name "callback", :type :callback}]}
{:id ::get-primary-display-scale-factor,
:name "getPrimaryDisplayScaleFactor",
:since "73",
:callback? true,
:params [{:name "callback", :type :callback, :callback {:params [{:name "scale-factor", :type "double"}]}}]}
{:id ::is-tablet-mode-enabled,
:name "isTabletModeEnabled",
:since "74",
:callback? true,
:params [{:name "callback", :type :callback, :callback {:params [{:name "enabled", :type "boolean"}]}}]}
{:id ::set-tablet-mode-enabled,
:name "setTabletModeEnabled",
:since "74",
:callback? true,
:params
[{:name "enabled", :type "boolean"}
{:name "callback", :type :callback, :callback {:params [{:name "enabled", :type "boolean"}]}}]}
{:id ::get-shelf-auto-hide-behavior,
:name "getShelfAutoHideBehavior",
:since "75",
:callback? true,
:params
[{:name "display-id", :type "string"}
{:name "callback", :type :callback, :callback {:params [{:name "behavior", :type "string"}]}}]}
{:id ::set-shelf-auto-hide-behavior,
:name "setShelfAutoHideBehavior",
:since "75",
:callback? true,
:params
[{:name "display-id", :type "string"} {:name "behavior", :type "string"} {:name "callback", :type :callback}]}
{:id ::get-shelf-alignment,
:name "getShelfAlignment",
:since "future",
:callback? true,
:params
[{:name "display-id", :type "string"}
{:name "callback",
:type :callback,
:callback {:params [{:name "alignment", :type "autotestPrivate.ShelfAlignmentType"}]}}]}
{:id ::set-shelf-alignment,
:name "setShelfAlignment",
:since "future",
:callback? true,
:params
[{:name "display-id", :type "string"}
{:name "alignment", :type "autotestPrivate.ShelfAlignmentType"}
{:name "callback", :type :callback}]}
{:id ::show-virtual-keyboard-if-enabled, :name "showVirtualKeyboardIfEnabled", :since "75"}]})
; -- 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))