• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2021 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/**
17 * A static class pertaining to the product information.
18 *
19 * @since 6
20 * @syscap SystemCapability.Startup.SystemInfo
21 */
22declare namespace deviceInfo {
23     /**
24     * Obtains the device type represented by a string,
25     * which can be {@code phone} (or {@code default} for phones), {@code wearable}, {@code liteWearable},
26     * {@code tablet}, {@code tv}, {@code car}, or {@code smartVision}.
27     * @syscap SystemCapability.Startup.SystemInfo
28     * @since 6
29     */
30    const deviceType: string;
31
32    /**
33     * Obtains the device manufacturer represented by a string.
34     * @syscap SystemCapability.Startup.SystemInfo
35     * @since 6
36     */
37    const manufacture: string;
38
39    /**
40     * Obtains the device brand represented by a string.
41     * @syscap SystemCapability.Startup.SystemInfo
42     * @since 6
43     */
44    const brand: string;
45
46    /**
47     * Obtains the external product series represented by a string.
48     * @syscap SystemCapability.Startup.SystemInfo
49     * @since 6
50     */
51    const marketName: string;
52
53    /**
54     * Obtains the product series represented by a string.
55     * @syscap SystemCapability.Startup.SystemInfo
56     * @since 6
57     */
58    const productSeries: string;
59
60    /**
61     * Obtains the product model represented by a string.
62     * @syscap SystemCapability.Startup.SystemInfo
63     * @since 6
64     */
65    const productModel: string;
66
67    /**
68     * Obtains the software model represented by a string.
69     * @syscap SystemCapability.Startup.SystemInfo
70     * @since 6
71     */
72    const softwareModel: string;
73
74    /**
75     * Obtains the hardware model represented by a string.
76     * @syscap SystemCapability.Startup.SystemInfo
77     * @since 6
78     */
79    const hardwareModel: string;
80
81    /**
82     * Obtains the hardware profile represented by a string.
83     * @syscap SystemCapability.Startup.SystemInfo
84     * @since 6
85     * @deprecated since 9
86     */
87    const hardwareProfile: string;
88
89    /**
90     * Obtains the device serial number represented by a string.
91     * @permission ohos.permission.sec.ACCESS_UDID
92     * @syscap SystemCapability.Startup.SystemInfo
93     * @since 6
94     */
95    const serial: string;
96
97    /**
98     * Obtains the bootloader version number represented by a string.
99     * @syscap SystemCapability.Startup.SystemInfo
100     * @since 6
101     */
102    const bootloaderVersion: string;
103
104    /**
105     * Obtains the application binary interface (Abi) list represented by a string.
106     * @syscap SystemCapability.Startup.SystemInfo
107     * @since 6
108     */
109    const abiList: string;
110
111    /**
112     * Obtains the security patch level represented by a string.
113     * @syscap SystemCapability.Startup.SystemInfo
114     * @since 6
115     */
116    const securityPatchTag: string;
117
118    /**
119     * Obtains the product version represented by a string.
120     * @syscap SystemCapability.Startup.SystemInfo
121     * @since 6
122     */
123    const displayVersion: string;
124
125    /**
126     * Obtains the incremental version represented by a string.
127     * @syscap SystemCapability.Startup.SystemInfo
128     * @since 6
129     */
130    const incrementalVersion: string;
131
132    /**
133     * Obtains the OS release type represented by a string.
134     *
135     * <p>The OS release category can be {@code Release}, {@code Beta}, or {@code Canary}.
136     * The specific release type may be {@code Release}, {@code Beta1}, or others alike.
137     * @syscap SystemCapability.Startup.SystemInfo
138     * @since 6
139     */
140    const osReleaseType: string;
141
142    /**
143     * Obtains the OS version represented by a string.
144     * @syscap SystemCapability.Startup.SystemInfo
145     * @since 6
146     */
147    const osFullName: string;
148
149    /**
150     * Obtains the major (M) version number, which increases with any updates to the overall architecture.
151     * <p>The M version number monotonically increases from 1 to 99.
152     * @syscap SystemCapability.Startup.SystemInfo
153     * @since 6
154     */
155    const majorVersion: number;
156
157    /**
158     * Obtains the senior (S) version number, which increases with any updates to the partial
159     * architecture or major features.
160     * <p>The S version number monotonically increases from 0 to 99.
161     * @syscap SystemCapability.Startup.SystemInfo
162     * @since 6
163     */
164    const seniorVersion: number;
165
166    /**
167     * Obtains the feature (F) version number, which increases with any planned new features.
168     * <p>The F version number monotonically increases from 0 or 1 to 99.
169     * @syscap SystemCapability.Startup.SystemInfo
170     * @since 6
171     */
172    const featureVersion: number;
173
174    /**
175     * Obtains the build (B) version number, which increases with each new development build.
176     * <p>The B version number monotonically increases from 0 or 1 to 999.
177     * @syscap SystemCapability.Startup.SystemInfo
178     * @since 6
179     */
180    const buildVersion: number;
181
182    /**
183     * Obtains the SDK API version number.
184     * @syscap SystemCapability.Startup.SystemInfo
185     * @since 6
186     */
187    const sdkApiVersion: number;
188
189    /**
190     * Obtains the first API version number.
191     * @syscap SystemCapability.Startup.SystemInfo
192     * @since 6
193     */
194    const firstApiVersion: number;
195
196    /**
197     * Obtains the version ID by a string.
198     * @syscap SystemCapability.Startup.SystemInfo
199     * @since 6
200     */
201    const versionId: string;
202
203    /**
204     * Obtains the build types of the same baseline code.
205     * @syscap SystemCapability.Startup.SystemInfo
206     * @since 6
207     */
208    const buildType: string;
209
210    /**
211     * Obtains the different build user of the same baseline code.
212     * @syscap SystemCapability.Startup.SystemInfo
213     * @since 6
214     */
215    const buildUser: string;
216
217    /**
218     * Obtains the different build host of the same baseline code.
219     * @syscap SystemCapability.Startup.SystemInfo
220     * @since 6
221     */
222    const buildHost: string;
223
224    /**
225     * Obtains the build time.
226     * @syscap SystemCapability.Startup.SystemInfo
227     * @since 6
228     */
229    const buildTime: string;
230
231    /**
232     * Obtains the version hash.
233     * @syscap SystemCapability.Startup.SystemInfo
234     * @since 6
235     */
236    const buildRootHash: string;
237    /**
238     * Obtains the device udid.
239     * @permission ohos.permission.sec.ACCESS_UDID
240     * @syscap SystemCapability.Startup.SystemInfo
241     * @since 7
242     */
243    const udid: string;
244
245}
246
247export default deviceInfo;
248