46 Star 176 Fork 4.8K

OpenHarmony/interface_sdk-js

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
@ohos.deviceInfo.d.ts 18.76 KB
一键复制 编辑 原始数据 按行查看 历史
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772
/*
* Copyright (c) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit BasicServicesKit
*/
/**
* A static class pertaining to the product information.
*
* @namespace deviceInfo
* @syscap SystemCapability.Startup.SystemInfo
* @since 6
*/
/**
* A static class pertaining to the product information.
*
* @namespace deviceInfo
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @atomicservice
* @since 11
*/
declare namespace deviceInfo {
/**
* Enumerates thedevice types.
* @enum { string }
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @atomicservice
* @since 20
*/
enum DeviceTypes {
/**
* Default device for phones
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @atomicservice
* @since 20
*/
TYPE_DEFAULT = 'default',
/**
* Phone device
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @atomicservice
* @since 20
*/
TYPE_PHONE = 'phone',
/**
* Tablet device
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @atomicservice
* @since 20
*/
TYPE_TABLET = 'tablet',
/**
* 2in1 device
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @atomicservice
* @since 20
*/
TYPE_2IN1 = '2in1',
/**
* Tv device
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @atomicservice
* @since 20
*/
TYPE_TV = 'tv',
/**
* Wearable device
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @atomicservice
* @since 20
*/
TYPE_WEARABLE = 'wearable',
/**
* Car device
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @atomicservice
* @since 20
*/
TYPE_CAR = 'car'
}
/**
* Obtains the device type represented by a string,
* which can be {@code phone} (or {@code default} for phones), {@code wearable}, {@code liteWearable},
* {@code tablet}, {@code tv}, {@code car}, or {@code smartVision}.
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 6
*/
/**
* Obtains the device type represented by a string,
* which can be {@code phone} (or {@code default} for phones), {@code wearable}, {@code liteWearable},
* {@code tablet}, {@code tv}, {@code car}, or {@code smartVision}.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @since 10
*/
/**
* Obtains the device type represented by a string,
* which can be {@code phone} (or {@code default} for phones), {@code wearable}, {@code liteWearable},
* {@code tablet}, {@code tv}, {@code car}, or {@code smartVision}.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @atomicservice
* @since 11
*/
const deviceType: string;
/**
* Obtains the device manufacturer represented by a string.
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 6
*/
/**
* Obtains the device manufacturer represented by a string.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @since 10
*/
const manufacture: string;
/**
* Obtains the device brand represented by a string.
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 6
*/
/**
* Obtains the device brand represented by a string.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @since 10
*/
/**
* Obtains the device brand represented by a string.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @atomicservice
* @since 11
*/
const brand: string;
/**
* Obtains the external product series represented by a string.
*
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 6
*/
/**
* Obtains the external product series represented by a string.
*
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @since 10
*/
const marketName: string;
/**
* Obtains the product series represented by a string.
*
* @constant
* @syscap SystemCapability.Startup.SystemInfo
* @since 6
*/
/**
* Obtains the product series represented by a string.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @since 10
*/
const productSeries: string;
/**
* Obtains the product model represented by a string.
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 6
*/
/**
* Obtains the product model represented by a string.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @since 10
*/
/**
* Obtains the product model represented by a string.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @atomicservice
* @since 11
*/
const productModel: string;
/**
* Obtains the product model alias represented by a string.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @atomicservice
* @since 14
*/
const productModelAlias: string;
/**
* Obtains the software model represented by a string.
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 6
*/
/**
* Obtains the software model represented by a string.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @since 10
*/
const softwareModel: string;
/**
* Obtains the hardware model represented by a string.
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 6
*/
/**
* Obtains the hardware model represented by a string.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @since 10
*/
const hardwareModel: string;
/**
* Obtains the hardware profile represented by a string.
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 6
* @deprecated since 9
*/
const hardwareProfile: string;
/**
* Obtains the device serial number represented by a string.
*
* @permission ohos.permission.sec.ACCESS_UDID
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 6
*/
const serial: string;
/**
* Obtains the bootloader version number represented by a string.
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 6
*/
/**
* Obtains the bootloader version number represented by a string.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @since 10
*/
const bootloaderVersion: string;
/**
* Obtains the application binary interface (Abi) list represented by a string.
*
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 6
*/
/**
* Obtains the application binary interface (Abi) list represented by a string.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @since 10
*/
const abiList: string;
/**
* Obtains the security patch level represented by a string.
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 6
*/
/**
* Obtains the security patch level represented by a string.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @since 10
*/
const securityPatchTag: string;
/**
* Obtains the product version represented by a string.
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 6
*/
/**
* Obtains the product version represented by a string.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @since 10
*/
const displayVersion: string;
/**
* Obtains the incremental version represented by a string.
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 6
*/
/**
* Obtains the incremental version represented by a string.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @since 10
*/
const incrementalVersion: string;
/**
* Obtains the OS release type represented by a string.
* <p>The OS release category can be {@code Release}, {@code Beta}, or {@code Canary}.
* The specific release type may be {@code Release}, {@code Beta1}, or others alike.
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 6
*/
/**
* Obtains the OS release type represented by a string.
* <p>The OS release category can be {@code Release}, {@code Beta}, or {@code Canary}.
* The specific release type may be {@code Release}, {@code Beta1}, or others alike.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @since 10
*/
const osReleaseType: string;
/**
* Obtains the OS version represented by a string.
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 6
*/
/**
* Obtains the OS version represented by a string.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @since 10
*/
/**
* Obtains the OS version represented by a string.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @atomicservice
* @since 11
*/
const osFullName: string;
/**
* Obtains the major (M) version number, which increases with any updates to the overall architecture.
* <p>The M version number monotonically increases from 1 to 99.
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 6
*/
/**
* Obtains the major (M) version number, which increases with any updates to the overall architecture.
* <p>The M version number monotonically increases from 1 to 99.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @since 10
*/
const majorVersion: number;
/**
* Obtains the senior (S) version number, which increases with any updates to the partial
* architecture or major features.
* <p>The S version number monotonically increases from 0 to 99.
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 6
*/
/**
* Obtains the senior (S) version number, which increases with any updates to the partial
* architecture or major features.
* <p>The S version number monotonically increases from 0 to 99.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @since 10
*/
const seniorVersion: number;
/**
* Obtains the feature (F) version number, which increases with any planned new features.
* <p>The F version number monotonically increases from 0 or 1 to 99.
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 6
*/
/**
* Obtains the feature (F) version number, which increases with any planned new features.
* <p>The F version number monotonically increases from 0 or 1 to 99.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @since 10
*/
const featureVersion: number;
/**
* Obtains the build (B) version number, which increases with each new development build.
* <p>The B version number monotonically increases from 0 or 1 to 999.
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 6
*/
/**
* Obtains the build (B) version number, which increases with each new development build.
* <p>The B version number monotonically increases from 0 or 1 to 999.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @since 10
*/
const buildVersion: number;
/**
* Obtains the SDK API version number.
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 6
*/
/**
* Obtains the SDK API version number.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @since 10
*/
/**
* Obtains the SDK API version number.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @atomicservice
* @since 14
*/
const sdkApiVersion: number;
/**
* Obtains the first API version number.
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 6
*/
/**
* Obtains the first API version number.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @since 10
*/
const firstApiVersion: number;
/**
* Obtains the version ID by a string.
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 6
*/
/**
* Obtains the version ID by a string.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @since 10
*/
const versionId: string;
/**
* Obtains the build types of the same baseline code.
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 6
*/
/**
* Obtains the build types of the same baseline code.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @since 10
*/
const buildType: string;
/**
* Obtains the different build user of the same baseline code.
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 6
*/
/**
* Obtains the different build user of the same baseline code.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @since 10
*/
const buildUser: string;
/**
* Obtains the different build host of the same baseline code.
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 6
*/
/**
* Obtains the different build host of the same baseline code.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @since 10
*/
const buildHost: string;
/**
* Obtains the build time.
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 6
*/
/**
* Obtains the build time.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @since 10
*/
const buildTime: string;
/**
* Obtains the version hash.
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 6
*/
/**
* Obtains the version hash.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @since 10
*/
const buildRootHash: string;
/**
* Obtains the device udid.
*
* @permission ohos.permission.sec.ACCESS_UDID
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 7
*/
const udid: string;
/**
* Obtains the Distribution OS name.
* <p>Independent Software Vendor (ISV) may distribute OHOS with their own OS name.
* distributionOsName will return the ISV OS name
* If ISV not specified, it will return an empty string
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 10
*/
const distributionOSName: string;
/**
* Obtains the Distribution OS version.
* <p>Independent Software Vendor (ISV) may distribute OHOS with their own OS version.
* distributionOSVersion will return the ISV OS version
* If ISV not specified, it will return the same value as osFullName
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 10
*/
const distributionOSVersion: string;
/**
* Obtains the Distribution OS version.
* <p>Independent Software Vendor (ISV) may distribute OHOS with their own OS api version.
* distributionOSVersion will return the ISV OS api version
* If ISV not specified, it will return the same value as sdkApiVersion
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 10
*/
const distributionOSApiVersion: number;
/**
* Obtains the Distribution OS api name.
* <p>Independent Software Vendor (ISV) may distribute OHOS with their own OS api name.
* distributionOSApiName will return the ISV OS api name
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 13
*/
const distributionOSApiName: string;
/**
* Obtains the Distribution OS release type.
* <p>Independent Software Vendor (ISV) may distribute OHOS with their own OS release type.
* distributionOSVersion will return the ISV OS release type
* If ISV not specified, it will return the same value as osReleaseType
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 10
*/
const distributionOSReleaseType: string;
/**
* Open Device Identifier (ODID): a developer-level non-permanent device identifier.
* A developer can be an enterprise or individual developer.
* Example: dff3cdfd-7beb-1e7d-fdf7-1dbfddd7d30c
*
* An ODID will be regenerate in the following scenarios:
* Restore a phone to its factory settings.
* Uninstall and reinstall all apps of one developer on one device.
*
* An ODID is generated based on the following rules:
* For apps from the same developer, which are running on the same device, they have the same ODID.
* For apps from different developers, which are running on the same device, each of them has its own ODID.
* For apps from the same developer, which are running on different devices, each of them has its own ODID.
* For apps from different developers, which are running on different devices, each of them has its own ODID.
*
* @syscap SystemCapability.Startup.SystemInfo
* @since 12
*/
const ODID: string;
/**
* Obtaining the hard drive serial number.
*
* @permission ohos.permission.ACCESS_DISK_PHY_INFO
* @syscap SystemCapability.Startup.SystemInfo
* @since 15
*/
const diskSN: string;
/**
* Performance Class level of a device.
*
* @enum { number }
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @since 19
*/
export enum PerformanceClassLevel {
/**
* Device Capability Level is high.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @since 19
*/
CLASS_LEVEL_HIGH,
/**
* Device Capability Level is medium.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @since 19
*/
CLASS_LEVEL_MEDIUM,
/**
* Device Capability Level is low.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @since 19
*/
CLASS_LEVEL_LOW
}
/**
* Obtaining the performance class.
*
* @syscap SystemCapability.Startup.SystemInfo
* @crossplatform
* @since 19
*/
const performanceClass: PerformanceClassLevel;
/**
* Obtains the device CPU chipType by a string.
*
* @type { string }
* @syscap SystemCapability.Startup.SystemInfo
* @since 21
*/
const chipType: string;
/**
* Obtains the deviceboot count by a number
* if get failed, it will return -1
*
* @type { number }
* @syscap SystemCapability.Startup.SystemInfo
* @since 21
*/
const bootCount: number;
}
export default deviceInfo;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openharmony/interface_sdk-js.git
git@gitee.com:openharmony/interface_sdk-js.git
openharmony
interface_sdk-js
interface_sdk-js
master

搜索帮助