1/*
2 * Copyright (c) 2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16#ifndef DEVICEINFO_CSDK_H
17#define DEVICEINFO_CSDK_H
18
19#ifdef __cplusplus
20#if __cplusplus
21extern "C" {
22#endif
23#endif
24
25/**
26 * Obtains the device type represented by a string,
27 * which can be {@code phone} (or {@code default} for phones), {@code wearable}, {@code liteWearable},
28 * {@code tablet}, {@code tv}, {@code car}, or {@code smartVision}.
29 * @syscap SystemCapability.Startup.SystemInfo
30 * @since 10
31 */
32const char *OH_GetDeviceType(void);
33
34/**
35 * Obtains the device manufacturer represented by a string.
36 * @syscap SystemCapability.Startup.SystemInfo
37 * @since 10
38 */
39const char *OH_GetManufacture(void);
40
41/**
42 * Obtains the device brand represented by a string.
43 * @syscap SystemCapability.Startup.SystemInfo
44 * @since 10
45 */
46const char *OH_GetBrand(void);
47
48/**
49 * Obtains the product name speaded in the market
50 * @syscap SystemCapability.Startup.SystemInfo
51 * @since 10
52 */
53const char *OH_GetMarketName(void);
54
55/**
56 * Obtains the product series represented by a string.
57 * @syscap SystemCapability.Startup.SystemInfo
58 * @since 10
59 */
60const char *OH_GetProductSeries(void);
61
62/**
63 * Obtains the product model represented by a string.
64 * @syscap SystemCapability.Startup.SystemInfo
65 * @since 10
66 */
67const char *OH_GetProductModel(void);
68
69/**
70 * Obtains the software model represented by a string.
71 * @syscap SystemCapability.Startup.SystemInfo
72 * @since 10
73 */
74const char *OH_GetSoftwareModel(void);
75
76/**
77 * Obtains the hardware model represented by a string.
78 * @syscap SystemCapability.Startup.SystemInfo
79 * @since 10
80 */
81const char *OH_GetHardwareModel(void);
82
83/**
84 * Obtains the bootloader version number represented by a string.
85 * @syscap SystemCapability.Startup.SystemInfo
86 * @since 10
87 */
88const char *OH_GetBootloaderVersion(void);
89
90/**
91 * Obtains the application binary interface (Abi) list represented by a string.
92 * @syscap SystemCapability.Startup.SystemInfo
93 * @since 10
94 */
95const char *OH_GetAbiList(void);
96
97/**
98 * Obtains the security patch tag represented by a string.
99 * @syscap SystemCapability.Startup.SystemInfo
100 * @since 10
101 */
102const char *OH_GetSecurityPatchTag(void);
103
104/**
105 * Obtains the product version displayed for customer represented by a string.
106 * @syscap SystemCapability.Startup.SystemInfo
107 * @since 10
108 */
109const char *OH_GetDisplayVersion(void);
110
111/**
112 * Obtains the incremental version represented by a string.
113 * @syscap SystemCapability.Startup.SystemInfo
114 * @since 10
115 */
116const char *OH_GetIncrementalVersion(void);
117
118/**
119 * Obtains the OS release type represented by a string.
120 *
121 * <p>The OS release category can be {@code Release}, {@code Beta}, or {@code Canary}.
122 * The specific release type may be {@code Release}, {@code Beta1}, or others alike.
123 * @syscap SystemCapability.Startup.SystemInfo
124 * @since 10
125 */
126const char *OH_GetOsReleaseType(void);
127
128/**
129 * Obtains the OS full version name represented by a string.
130 * @syscap SystemCapability.Startup.SystemInfo
131 * @since 10
132 */
133const char *OH_GetOSFullName(void);
134
135/**
136 * Obtains the SDK API version number.
137 * @syscap SystemCapability.Startup.SystemInfo
138 * @since 10
139 */
140int OH_GetSdkApiVersion(void);
141
142/**
143 * Obtains the first API version number.
144 * @syscap SystemCapability.Startup.SystemInfo
145 * @since 10
146 */
147int OH_GetFirstApiVersion(void);
148
149/**
150 * Obtains the version ID by a string.
151 * @syscap SystemCapability.Startup.SystemInfo
152 * @since 10
153 */
154const char *OH_GetVersionId(void);
155
156/**
157 * Obtains the build type of the current running OS.
158 * @syscap SystemCapability.Startup.SystemInfo
159 * @since 10
160 */
161const char *OH_GetBuildType(void);
162
163/**
164 * Obtains the build user of the current running OS.
165 * @syscap SystemCapability.Startup.SystemInfo
166 * @since 10
167 */
168const char *OH_GetBuildUser(void);
169
170/**
171 * Obtains the build host of the current running OS.
172 * @syscap SystemCapability.Startup.SystemInfo
173 * @since 10
174 */
175const char *OH_GetBuildHost(void);
176
177/**
178 * Obtains the build time of the current running OS.
179 * @syscap SystemCapability.Startup.SystemInfo
180 * @since 10
181 */
182const char *OH_GetBuildTime(void);
183
184/**
185 * Obtains the version hash of the current running OS.
186 * @syscap SystemCapability.Startup.SystemInfo
187 * @since 10
188 */
189const char *OH_GetBuildRootHash(void);
190
191/**
192 * Obtains the Distribution OS name represented by a string.
193 *
194 * <p>Independent Software Vendor (ISV) may distribute OHOS with their own OS name.
195 * If ISV not specified, it will return an empty string
196 * @syscap SystemCapability.Startup.SystemInfo
197 * @since 10
198 */
199const char *OH_GetDistributionOSName(void);
200
201/**
202 * Obtains the ISV distribution OS version represented by a string.
203 * If ISV not specified, it will return the same value as OH_GetOSFullName
204 * @syscap SystemCapability.Startup.SystemInfo
205 * @since 10
206 */
207const char *OH_GetDistributionOSVersion(void);
208
209/**
210 * Obtains the ISV distribution OS api version represented by a integer.
211 * If ISV not specified, it will return the same value as OH_GetSdkApiVersion
212 * @syscap SystemCapability.Startup.SystemInfo
213 * @since 10
214 */
215int OH_GetDistributionOSApiVersion(void);
216
217/**
218 * Obtains the ISV distribution OS release type represented by a string.
219 * If ISV not specified, it will return the same value as OH_GetOsReleaseType
220 * @syscap SystemCapability.Startup.SystemInfo
221 * @since 10
222 */
223const char *OH_GetDistributionOSReleaseType(void);
224
225#ifdef __cplusplus
226#if __cplusplus
227}
228#endif
229#endif
230#endif
231