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
[]
= "ohos-basic-services-kit-sys"
= "0.1.0"
= "2021"
= "Raw bindings to the BasicServicesKit NDK of OpenHarmony"
= "Apache-2.0"
= "https://github.com/openharmony-rs/ohos-sys"
= ["OpenHarmony", "HarmonyOS", "ffi", "commonevent", "BasicServicesKit"]
= "README.md"
[]
= { = "0.2", = true }
[]
= []
#! ### Sub-APIs
#!
#! BasicServicesKit groups several unrelated system-service APIs under one
#! upstream kit. Each NDK lives in a separate shared library, so each is
#! exposed behind its own cargo feature. A sub-API feature is a no-op unless
#! the matching `api-XX` feature is also enabled (CommonEvent / Print / Scan
#! / OS Account / Time Service require `api-12`; BatteryInfo requires
#! `api-13`).
## Enables the CommonEvent NDK (`libohcommonevent.so`). Requires `api-12`.
= []
## Enables the BatteryInfo NDK (`libohbattery_info.so`). Requires `api-13`.
= []
## Enables the Print NDK (`libohprint.so`). Requires `api-12`.
= []
## Enables the Scan NDK (`libohscan.so`). Requires `api-12`.
= []
## Enables the OS Account NDK (`libos_account_ndk.so`). Requires `api-12`.
= []
## Enables the Time Service NDK (`libtime_service_ndk.so`). Requires `api-12`.
= []
## Enables every sub-API in this kit.
= [
"commonevent",
"battery-info",
"print",
"scan",
"os-account",
"time-service",
]
#! ### OpenHarmony API level
## Enables bindings for OpenHarmony API-level 12. BasicServicesKit is first
## available at this API level, so this is the minimum supported feature.
= []
## Enables bindings for OpenHarmony API-level 13. Adds BatteryInfo.
= ["api-12"]
## Enables bindings for OpenHarmony API-level 14 (No changes).
= ["api-13"]
## Enables bindings for OpenHarmony API-level 15 (No changes).
= ["api-14"]
## Enables bindings for OpenHarmony API-level 16 (No changes).
= ["api-15"]
## Enables bindings for OpenHarmony API-level 17 (No changes).
= ["api-16"]
## Enables bindings for OpenHarmony API-level 18. Adds the CommonEvent
## publish APIs and the ordered-event subscriber APIs.
= ["api-17"]
## Enables bindings for OpenHarmony API-level 19 (No changes).
= ["api-18"]
## Enables bindings for OpenHarmony API-level 20. Adds the CommonEvent
## `SENDING_LIMIT_EXCEEDED` error variant.
= ["api-19"]
## Enables bindings for OpenHarmony API-level 21 (No changes).
= ["api-20"]
## Enables bindings for OpenHarmony API-level 22 (No changes).
= ["api-21"]
## Enables bindings for OpenHarmony API-level 23 (No changes).
= ["api-22"]
#! ### Internal features
## Document available features when building the documentation
= ["dep:document-features"]
[]
= ["document-features", "all-apis", "api-23"]
= ["aarch64-unknown-linux-ohos", "armv7-unknown-linux-ohos", "x86_64-unknown-linux-ohos"]
= true