/
bluetooth.cljs
34 lines (22 loc) · 1.23 KB
/
bluetooth.cljs
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
(ns chromex.app.bluetooth (:require-macros [chromex.app.bluetooth :refer [gen-wrap]])
(:require [chromex.core]))
; -- functions --------------------------------------------------------------------------------------------------------------
(defn get-adapter-state* [config]
(gen-wrap :function ::get-adapter-state config))
(defn get-device* [config device-address]
(gen-wrap :function ::get-device config device-address))
(defn get-devices* [config filter]
(gen-wrap :function ::get-devices config filter))
(defn start-discovery* [config]
(gen-wrap :function ::start-discovery config))
(defn stop-discovery* [config]
(gen-wrap :function ::stop-discovery config))
; -- events -----------------------------------------------------------------------------------------------------------------
(defn on-adapter-state-changed* [config channel & args]
(gen-wrap :event ::on-adapter-state-changed config channel args))
(defn on-device-added* [config channel & args]
(gen-wrap :event ::on-device-added config channel args))
(defn on-device-changed* [config channel & args]
(gen-wrap :event ::on-device-changed config channel args))
(defn on-device-removed* [config channel & args]
(gen-wrap :event ::on-device-removed config channel args))