From 022c2a16a0be6f1e64395c29d44a4c6f0495f04c Mon Sep 17 00:00:00 2001 From: BinaryAge Bot Date: Sat, 26 Dec 2020 15:26:55 +0100 Subject: [PATCH] regenerate APIs from Chromium @ 3fc45039a8ff https://chromium.googlesource.com/chromium/src.git/+/3fc45039a8ff08a79015c72d3daf0435523ae278 --- readme.md | 4 +- src/apps/chromex/app/system/power_source.clj | 90 ------------------- src/apps/chromex/app/system/power_source.cljs | 16 ---- src/apps/readme.md | 7 +- 4 files changed, 3 insertions(+), 114 deletions(-) delete mode 100644 src/apps/chromex/app/system/power_source.clj delete mode 100644 src/apps/chromex/app/system/power_source.cljs diff --git a/readme.md b/readme.md index 72eaf625..8ca6f67c 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,6 @@ # chromex [![GitHub license](https://img.shields.io/badge/license-MIT-lightgrey.svg)](license.txt) [![Clojars Project](https://img.shields.io/clojars/v/binaryage/chromex.svg)](https://clojars.org/binaryage/chromex) [![Travis](https://img.shields.io/travis/binaryage/chromex.svg)](https://travis-ci.org/binaryage/chromex) [![Example Projects](https://img.shields.io/badge/project-examples-ff69b4.svg)](https://github.com/binaryage/chromex/tree/master/examples) -This library is auto-generated. Current version was **generated on 2020-12-25** from [**Chromium @ 540e75bd7468**](https://chromium.googlesource.com/chromium/src.git/+/540e75bd74680df9c276746e338e16c13941b0be). +This library is auto-generated. Current version was **generated on 2020-12-26** from [**Chromium @ 3fc45039a8ff**](https://chromium.googlesource.com/chromium/src.git/+/3fc45039a8ff08a79015c72d3daf0435523ae278). Looking for a nightly version? Check out [**nightly branch**](https://github.com/binaryage/chromex/tree/nightly) which gets updated if there are any new API changes. @@ -11,7 +11,7 @@ For Chrome Extensions and also for Chrome Apps: | API family | namespaces | properties | functions | events | | --- | --- | --- | --- | --- | | [Public Chrome Extension APIs](src/exts) | 83 | 62 | 404 | 180 | -| [Public Chrome App APIs](src/apps) | 68 | 32 | 450 | 153 | +| [Public Chrome App APIs](src/apps) | 67 | 32 | 448 | 152 | | [Private Chrome Extension APIs](src/exts_private) | 40 | 0 | 508 | 92 | | [Private Chrome App APIs](src/apps_private) | 37 | 0 | 379 | 87 | diff --git a/src/apps/chromex/app/system/power_source.clj b/src/apps/chromex/app/system/power_source.clj deleted file mode 100644 index 73d498c7..00000000 --- a/src/apps/chromex/app/system/power_source.clj +++ /dev/null @@ -1,90 +0,0 @@ -(ns chromex.app.system.power-source - "The chrome.system.powerSource API allows Chrome Kiosk Apps to - query the state of connected power sources. - - * available since Chrome 69 - * https://developer.chrome.com/apps/system.powerSource" - - (: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 get-power-source-info - "Requests information on attached power sources. - - 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 [power-source-info] where: - - |power-source-info| - https://developer.chrome.com/apps/system.powerSource#property-callback-powerSourceInfo. - - 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/apps/system.powerSource#method-getPowerSourceInfo." - ([] (gen-call :function ::get-power-source-info &form))) - -(defmacro request-status-update - "Requests a power source status update. Resulting power source status updates are observable using 'onPowerChanged'. - - https://developer.chrome.com/apps/system.powerSource#method-requestStatusUpdate." - ([] (gen-call :function ::request-status-update &form))) - -; -- events ----------------------------------------------------------------------------------------------------------------- -; -; docs: https://github.com/binaryage/chromex/#tapping-events - -(defmacro tap-on-power-changed-events - "Event for changes in the set of connected power sources. - - Events will be put on the |channel| with signature [::on-power-changed [power-source-info]] where: - - |power-source-info| - https://developer.chrome.com/apps/system.powerSource#property-onPowerChanged-powerSourceInfo. - - Note: |args| will be passed as additional parameters into Chrome event's .addListener call. - - https://developer.chrome.com/apps/system.powerSource#event-onPowerChanged." - ([channel & args] (apply gen-call :event ::on-power-changed &form channel args))) - -; -- convenience ------------------------------------------------------------------------------------------------------------ - -(defmacro tap-all-events - "Taps all valid non-deprecated events in chromex.app.system.power-source namespace." - [chan] - (gen-tap-all-events-call api-table (meta &form) chan)) - -; --------------------------------------------------------------------------------------------------------------------------- -; -- API TABLE -------------------------------------------------------------------------------------------------------------- -; --------------------------------------------------------------------------------------------------------------------------- - -(def api-table - {:namespace "chrome.system.powerSource", - :since "69", - :functions - [{:id ::get-power-source-info, - :name "getPowerSourceInfo", - :callback? true, - :params - [{:name "callback", - :type :callback, - :callback - {:params - [{:name "power-source-info", :optional? true, :type "[array-of-system.powerSource.PowerSourceInfos]"}]}}]} - {:id ::request-status-update, :name "requestStatusUpdate"}], - :events - [{:id ::on-power-changed, - :name "onPowerChanged", - :params [{:name "power-source-info", :type "[array-of-system.powerSource.PowerSourceInfos]"}]}]}) - -; -- 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)) \ No newline at end of file diff --git a/src/apps/chromex/app/system/power_source.cljs b/src/apps/chromex/app/system/power_source.cljs deleted file mode 100644 index f59e20ce..00000000 --- a/src/apps/chromex/app/system/power_source.cljs +++ /dev/null @@ -1,16 +0,0 @@ -(ns chromex.app.system.power-source (:require-macros [chromex.app.system.power-source :refer [gen-wrap]]) - (:require [chromex.core])) - -; -- functions -------------------------------------------------------------------------------------------------------------- - -(defn get-power-source-info* [config] - (gen-wrap :function ::get-power-source-info config)) - -(defn request-status-update* [config] - (gen-wrap :function ::request-status-update config)) - -; -- events ----------------------------------------------------------------------------------------------------------------- - -(defn on-power-changed* [config channel & args] - (gen-wrap :event ::on-power-changed config channel args)) - diff --git a/src/apps/readme.md b/src/apps/readme.md index 5308db60..7f4a12df 100644 --- a/src/apps/readme.md +++ b/src/apps/readme.md @@ -61,7 +61,6 @@ | [chrome.system.display](https://developer.chrome.com/extensions/system.display) | [chromex/app/system/display.clj](chromex/app/system/display.clj) | | [chrome.system.memory](https://developer.chrome.com/extensions/system.memory) | [chromex/app/system/memory.clj](chromex/app/system/memory.clj) | | [chrome.system.network](https://developer.chrome.com/extensions/system.network) | [chromex/app/system/network.clj](chromex/app/system/network.clj) | -| [chrome.system.powerSource](https://developer.chrome.com/extensions/system.powerSource) | [chromex/app/system/power_source.clj](chromex/app/system/power_source.clj) | | [chrome.system.storage](https://developer.chrome.com/extensions/system.storage) | [chromex/app/system/storage.clj](chromex/app/system/storage.clj) | | [chrome.systemIndicator](https://developer.chrome.com/extensions/systemIndicator) | [chromex/app/system_indicator.clj](chromex/app/system_indicator.clj) | | [chrome.tabs](https://developer.chrome.com/extensions/tabs) | [chromex/app/tabs.clj](chromex/app/tabs.clj) | @@ -76,7 +75,7 @@ ### API stats -Generated 68 namespaces containing 32 properties, 450 functions and 153 events: +Generated 67 namespaces containing 32 properties, 448 functions and 152 events: | :namespace | :properties | :functions | :events | @@ -138,7 +137,6 @@ Generated 68 namespaces containing 32 properties, 450 functions and 153 events: | chrome.system.display | 0 | 14 | 1 | | chrome.system.memory | 0 | 1 | 0 | | chrome.system.network | 0 | 1 | 0 | - | chrome.system.powerSource | 0 | 2 | 1 | | chrome.system.storage | 0 | 3 | 2 | | chrome.systemIndicator | 0 | 3 | 1 | | chrome.tabs | 1 | 29 | 13 | @@ -399,9 +397,6 @@ Generated 68 namespaces containing 32 properties, 450 functions and 153 events: [chromex.app.system.network refer:[ get-network-interfaces tap-all-events]] - [chromex.app.system.power-source refer:[ - get-power-source-info request-status-update tap-on-power-changed tap-all-events]] - [chromex.app.system.storage refer:[ get-info eject-device get-available-capacity tap-on-attached tap-on-detached tap-all-events]]