161847f8eSopenharmony_ci/* 261847f8eSopenharmony_ci * Copyright (c) 2021-2024 Huawei Device Co., Ltd. 361847f8eSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 461847f8eSopenharmony_ci * you may not use this file except in compliance with the License. 561847f8eSopenharmony_ci * You may obtain a copy of the License at 661847f8eSopenharmony_ci * 761847f8eSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 861847f8eSopenharmony_ci * 961847f8eSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 1061847f8eSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 1161847f8eSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1261847f8eSopenharmony_ci * See the License for the specific language governing permissions and 1361847f8eSopenharmony_ci * limitations under the License. 1461847f8eSopenharmony_ci */ 1561847f8eSopenharmony_ci 1661847f8eSopenharmony_ci/** 1761847f8eSopenharmony_ci * @file 1861847f8eSopenharmony_ci * @kit LocalizationKit 1961847f8eSopenharmony_ci */ 2061847f8eSopenharmony_ci 2161847f8eSopenharmony_ciimport { RawFileDescriptor as _RawFileDescriptor } from './global/rawFileDescriptor'; 2261847f8eSopenharmony_ciimport { Resource as _Resource } from './global/resource'; 2361847f8eSopenharmony_ciimport { AsyncCallback as _AsyncCallback } from './@ohos.base'; 2461847f8eSopenharmony_ciimport { DrawableDescriptor } from './@ohos.arkui.drawableDescriptor'; 2561847f8eSopenharmony_ci 2661847f8eSopenharmony_ci/** 2761847f8eSopenharmony_ci * Provides resource related APIs. 2861847f8eSopenharmony_ci * 2961847f8eSopenharmony_ci * @namespace resourceManager 3061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 3161847f8eSopenharmony_ci * @since 6 3261847f8eSopenharmony_ci */ 3361847f8eSopenharmony_ci/** 3461847f8eSopenharmony_ci * Provides resource related APIs. 3561847f8eSopenharmony_ci * 3661847f8eSopenharmony_ci * @namespace resourceManager 3761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 3861847f8eSopenharmony_ci * @crossplatform 3961847f8eSopenharmony_ci * @since 10 4061847f8eSopenharmony_ci */ 4161847f8eSopenharmony_ci/** 4261847f8eSopenharmony_ci * Provides resource related APIs. 4361847f8eSopenharmony_ci * 4461847f8eSopenharmony_ci * @namespace resourceManager 4561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 4661847f8eSopenharmony_ci * @crossplatform 4761847f8eSopenharmony_ci * @atomicservice 4861847f8eSopenharmony_ci * @since 11 4961847f8eSopenharmony_ci */ 5061847f8eSopenharmony_cideclare namespace resourceManager { 5161847f8eSopenharmony_ci /** 5261847f8eSopenharmony_ci * Enumerates screen directions. 5361847f8eSopenharmony_ci * 5461847f8eSopenharmony_ci * @enum { number } 5561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 5661847f8eSopenharmony_ci * @since 6 5761847f8eSopenharmony_ci */ 5861847f8eSopenharmony_ci /** 5961847f8eSopenharmony_ci * Enumerates screen directions. 6061847f8eSopenharmony_ci * 6161847f8eSopenharmony_ci * @enum { number } 6261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 6361847f8eSopenharmony_ci * @crossplatform 6461847f8eSopenharmony_ci * @since 10 6561847f8eSopenharmony_ci */ 6661847f8eSopenharmony_ci /** 6761847f8eSopenharmony_ci * Enumerates screen directions. 6861847f8eSopenharmony_ci * 6961847f8eSopenharmony_ci * @enum { number } 7061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 7161847f8eSopenharmony_ci * @crossplatform 7261847f8eSopenharmony_ci * @atomicservice 7361847f8eSopenharmony_ci * @since 11 7461847f8eSopenharmony_ci */ 7561847f8eSopenharmony_ci export enum Direction { 7661847f8eSopenharmony_ci /** 7761847f8eSopenharmony_ci * Indicates the vertical direction. 7861847f8eSopenharmony_ci * 7961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 8061847f8eSopenharmony_ci * @since 6 8161847f8eSopenharmony_ci */ 8261847f8eSopenharmony_ci /** 8361847f8eSopenharmony_ci * Indicates the vertical direction. 8461847f8eSopenharmony_ci * 8561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 8661847f8eSopenharmony_ci * @crossplatform 8761847f8eSopenharmony_ci * @since 10 8861847f8eSopenharmony_ci */ 8961847f8eSopenharmony_ci /** 9061847f8eSopenharmony_ci * Indicates the vertical direction. 9161847f8eSopenharmony_ci * 9261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 9361847f8eSopenharmony_ci * @crossplatform 9461847f8eSopenharmony_ci * @atomicservice 9561847f8eSopenharmony_ci * @since 11 9661847f8eSopenharmony_ci */ 9761847f8eSopenharmony_ci DIRECTION_VERTICAL = 0, 9861847f8eSopenharmony_ci 9961847f8eSopenharmony_ci /** 10061847f8eSopenharmony_ci * Indicates the horizontal direction. 10161847f8eSopenharmony_ci * 10261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 10361847f8eSopenharmony_ci * @since 6 10461847f8eSopenharmony_ci */ 10561847f8eSopenharmony_ci /** 10661847f8eSopenharmony_ci * Indicates the horizontal direction. 10761847f8eSopenharmony_ci * 10861847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 10961847f8eSopenharmony_ci * @crossplatform 11061847f8eSopenharmony_ci * @since 10 11161847f8eSopenharmony_ci */ 11261847f8eSopenharmony_ci /** 11361847f8eSopenharmony_ci * Indicates the horizontal direction. 11461847f8eSopenharmony_ci * 11561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 11661847f8eSopenharmony_ci * @crossplatform 11761847f8eSopenharmony_ci * @atomicservice 11861847f8eSopenharmony_ci * @since 11 11961847f8eSopenharmony_ci */ 12061847f8eSopenharmony_ci DIRECTION_HORIZONTAL = 1 12161847f8eSopenharmony_ci } 12261847f8eSopenharmony_ci 12361847f8eSopenharmony_ci /** 12461847f8eSopenharmony_ci * Enumerates device types. 12561847f8eSopenharmony_ci * 12661847f8eSopenharmony_ci * @enum { number } 12761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 12861847f8eSopenharmony_ci * @since 6 12961847f8eSopenharmony_ci */ 13061847f8eSopenharmony_ci /** 13161847f8eSopenharmony_ci * Enumerates device types. 13261847f8eSopenharmony_ci * 13361847f8eSopenharmony_ci * @enum { number } 13461847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 13561847f8eSopenharmony_ci * @crossplatform 13661847f8eSopenharmony_ci * @since 10 13761847f8eSopenharmony_ci */ 13861847f8eSopenharmony_ci /** 13961847f8eSopenharmony_ci * Enumerates device types. 14061847f8eSopenharmony_ci * 14161847f8eSopenharmony_ci * @enum { number } 14261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 14361847f8eSopenharmony_ci * @crossplatform 14461847f8eSopenharmony_ci * @atomicservice 14561847f8eSopenharmony_ci * @since 11 14661847f8eSopenharmony_ci */ 14761847f8eSopenharmony_ci export enum DeviceType { 14861847f8eSopenharmony_ci /** 14961847f8eSopenharmony_ci * Indicates a phone. 15061847f8eSopenharmony_ci * 15161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 15261847f8eSopenharmony_ci * @since 6 15361847f8eSopenharmony_ci */ 15461847f8eSopenharmony_ci /** 15561847f8eSopenharmony_ci * Indicates a phone. 15661847f8eSopenharmony_ci * 15761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 15861847f8eSopenharmony_ci * @crossplatform 15961847f8eSopenharmony_ci * @since 10 16061847f8eSopenharmony_ci */ 16161847f8eSopenharmony_ci /** 16261847f8eSopenharmony_ci * Indicates a phone. 16361847f8eSopenharmony_ci * 16461847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 16561847f8eSopenharmony_ci * @crossplatform 16661847f8eSopenharmony_ci * @atomicservice 16761847f8eSopenharmony_ci * @since 11 16861847f8eSopenharmony_ci */ 16961847f8eSopenharmony_ci DEVICE_TYPE_PHONE = 0x00, 17061847f8eSopenharmony_ci 17161847f8eSopenharmony_ci /** 17261847f8eSopenharmony_ci * Indicates a tablet. 17361847f8eSopenharmony_ci * 17461847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 17561847f8eSopenharmony_ci * @since 6 17661847f8eSopenharmony_ci */ 17761847f8eSopenharmony_ci /** 17861847f8eSopenharmony_ci * Indicates a tablet. 17961847f8eSopenharmony_ci * 18061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 18161847f8eSopenharmony_ci * @since 10 18261847f8eSopenharmony_ci */ 18361847f8eSopenharmony_ci /** 18461847f8eSopenharmony_ci * Indicates a tablet. 18561847f8eSopenharmony_ci * 18661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 18761847f8eSopenharmony_ci * @crossplatform 18861847f8eSopenharmony_ci * @atomicservice 18961847f8eSopenharmony_ci * @since 11 19061847f8eSopenharmony_ci */ 19161847f8eSopenharmony_ci DEVICE_TYPE_TABLET = 0x01, 19261847f8eSopenharmony_ci 19361847f8eSopenharmony_ci /** 19461847f8eSopenharmony_ci * Indicates a car. 19561847f8eSopenharmony_ci * 19661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 19761847f8eSopenharmony_ci * @since 6 19861847f8eSopenharmony_ci */ 19961847f8eSopenharmony_ci /** 20061847f8eSopenharmony_ci * Indicates a car. 20161847f8eSopenharmony_ci * 20261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 20361847f8eSopenharmony_ci * @since 10 20461847f8eSopenharmony_ci */ 20561847f8eSopenharmony_ci /** 20661847f8eSopenharmony_ci * Indicates a car. 20761847f8eSopenharmony_ci * 20861847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 20961847f8eSopenharmony_ci * @crossplatform 21061847f8eSopenharmony_ci * @atomicservice 21161847f8eSopenharmony_ci * @since 11 21261847f8eSopenharmony_ci */ 21361847f8eSopenharmony_ci DEVICE_TYPE_CAR = 0x02, 21461847f8eSopenharmony_ci 21561847f8eSopenharmony_ci /** 21661847f8eSopenharmony_ci * Indicates a PC. 21761847f8eSopenharmony_ci * 21861847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 21961847f8eSopenharmony_ci * @since 6 22061847f8eSopenharmony_ci */ 22161847f8eSopenharmony_ci /** 22261847f8eSopenharmony_ci * Indicates a PC. 22361847f8eSopenharmony_ci * 22461847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 22561847f8eSopenharmony_ci * @since 10 22661847f8eSopenharmony_ci */ 22761847f8eSopenharmony_ci /** 22861847f8eSopenharmony_ci * Indicates a PC. 22961847f8eSopenharmony_ci * 23061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 23161847f8eSopenharmony_ci * @crossplatform 23261847f8eSopenharmony_ci * @atomicservice 23361847f8eSopenharmony_ci * @since 11 23461847f8eSopenharmony_ci */ 23561847f8eSopenharmony_ci DEVICE_TYPE_PC = 0x03, 23661847f8eSopenharmony_ci 23761847f8eSopenharmony_ci /** 23861847f8eSopenharmony_ci * Indicates a smart TV. 23961847f8eSopenharmony_ci * 24061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 24161847f8eSopenharmony_ci * @since 6 24261847f8eSopenharmony_ci */ 24361847f8eSopenharmony_ci /** 24461847f8eSopenharmony_ci * Indicates a smart TV. 24561847f8eSopenharmony_ci * 24661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 24761847f8eSopenharmony_ci * @since 10 24861847f8eSopenharmony_ci */ 24961847f8eSopenharmony_ci /** 25061847f8eSopenharmony_ci * Indicates a smart TV. 25161847f8eSopenharmony_ci * 25261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 25361847f8eSopenharmony_ci * @crossplatform 25461847f8eSopenharmony_ci * @atomicservice 25561847f8eSopenharmony_ci * @since 11 25661847f8eSopenharmony_ci */ 25761847f8eSopenharmony_ci DEVICE_TYPE_TV = 0x04, 25861847f8eSopenharmony_ci 25961847f8eSopenharmony_ci /** 26061847f8eSopenharmony_ci * Indicates a wearable device. 26161847f8eSopenharmony_ci * 26261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 26361847f8eSopenharmony_ci * @since 6 26461847f8eSopenharmony_ci */ 26561847f8eSopenharmony_ci /** 26661847f8eSopenharmony_ci * Indicates a wearable device. 26761847f8eSopenharmony_ci * 26861847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 26961847f8eSopenharmony_ci * @since 10 27061847f8eSopenharmony_ci */ 27161847f8eSopenharmony_ci /** 27261847f8eSopenharmony_ci * Indicates a wearable device. 27361847f8eSopenharmony_ci * 27461847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 27561847f8eSopenharmony_ci * @crossplatform 27661847f8eSopenharmony_ci * @atomicservice 27761847f8eSopenharmony_ci * @since 11 27861847f8eSopenharmony_ci */ 27961847f8eSopenharmony_ci DEVICE_TYPE_WEARABLE = 0x06, 28061847f8eSopenharmony_ci 28161847f8eSopenharmony_ci /** 28261847f8eSopenharmony_ci * Indicates a 2in1 device. 28361847f8eSopenharmony_ci * 28461847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 28561847f8eSopenharmony_ci * @crossplatform 28661847f8eSopenharmony_ci * @atomicservice 28761847f8eSopenharmony_ci * @since 11 28861847f8eSopenharmony_ci */ 28961847f8eSopenharmony_ci DEVICE_TYPE_2IN1 = 0x07 29061847f8eSopenharmony_ci } 29161847f8eSopenharmony_ci 29261847f8eSopenharmony_ci /** 29361847f8eSopenharmony_ci * Enumerates screen density types. 29461847f8eSopenharmony_ci * 29561847f8eSopenharmony_ci * @enum { number } 29661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 29761847f8eSopenharmony_ci * @since 6 29861847f8eSopenharmony_ci */ 29961847f8eSopenharmony_ci /** 30061847f8eSopenharmony_ci * Enumerates screen density types. 30161847f8eSopenharmony_ci * 30261847f8eSopenharmony_ci * @enum { number } 30361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 30461847f8eSopenharmony_ci * @crossplatform 30561847f8eSopenharmony_ci * @since 10 30661847f8eSopenharmony_ci */ 30761847f8eSopenharmony_ci /** 30861847f8eSopenharmony_ci * Enumerates screen density types. 30961847f8eSopenharmony_ci * 31061847f8eSopenharmony_ci * @enum { number } 31161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 31261847f8eSopenharmony_ci * @crossplatform 31361847f8eSopenharmony_ci * @atomicservice 31461847f8eSopenharmony_ci * @since 11 31561847f8eSopenharmony_ci */ 31661847f8eSopenharmony_ci export enum ScreenDensity { 31761847f8eSopenharmony_ci /** 31861847f8eSopenharmony_ci * Indicates small screen density. 31961847f8eSopenharmony_ci * 32061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 32161847f8eSopenharmony_ci * @since 6 32261847f8eSopenharmony_ci */ 32361847f8eSopenharmony_ci /** 32461847f8eSopenharmony_ci * Indicates small screen density. 32561847f8eSopenharmony_ci * 32661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 32761847f8eSopenharmony_ci * @crossplatform 32861847f8eSopenharmony_ci * @since 10 32961847f8eSopenharmony_ci */ 33061847f8eSopenharmony_ci /** 33161847f8eSopenharmony_ci * Indicates small screen density. 33261847f8eSopenharmony_ci * 33361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 33461847f8eSopenharmony_ci * @crossplatform 33561847f8eSopenharmony_ci * @atomicservice 33661847f8eSopenharmony_ci * @since 11 33761847f8eSopenharmony_ci */ 33861847f8eSopenharmony_ci SCREEN_SDPI = 120, 33961847f8eSopenharmony_ci 34061847f8eSopenharmony_ci /** 34161847f8eSopenharmony_ci * Indicates medium screen density. 34261847f8eSopenharmony_ci * 34361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 34461847f8eSopenharmony_ci * @since 6 34561847f8eSopenharmony_ci */ 34661847f8eSopenharmony_ci /** 34761847f8eSopenharmony_ci * Indicates medium screen density. 34861847f8eSopenharmony_ci * 34961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 35061847f8eSopenharmony_ci * @crossplatform 35161847f8eSopenharmony_ci * @since 10 35261847f8eSopenharmony_ci */ 35361847f8eSopenharmony_ci /** 35461847f8eSopenharmony_ci * Indicates medium screen density. 35561847f8eSopenharmony_ci * 35661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 35761847f8eSopenharmony_ci * @crossplatform 35861847f8eSopenharmony_ci * @atomicservice 35961847f8eSopenharmony_ci * @since 11 36061847f8eSopenharmony_ci */ 36161847f8eSopenharmony_ci SCREEN_MDPI = 160, 36261847f8eSopenharmony_ci 36361847f8eSopenharmony_ci /** 36461847f8eSopenharmony_ci * Indicates large screen density. 36561847f8eSopenharmony_ci * 36661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 36761847f8eSopenharmony_ci * @since 6 36861847f8eSopenharmony_ci */ 36961847f8eSopenharmony_ci /** 37061847f8eSopenharmony_ci * Indicates large screen density. 37161847f8eSopenharmony_ci * 37261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 37361847f8eSopenharmony_ci * @crossplatform 37461847f8eSopenharmony_ci * @since 10 37561847f8eSopenharmony_ci */ 37661847f8eSopenharmony_ci /** 37761847f8eSopenharmony_ci * Indicates large screen density. 37861847f8eSopenharmony_ci * 37961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 38061847f8eSopenharmony_ci * @crossplatform 38161847f8eSopenharmony_ci * @atomicservice 38261847f8eSopenharmony_ci * @since 11 38361847f8eSopenharmony_ci */ 38461847f8eSopenharmony_ci SCREEN_LDPI = 240, 38561847f8eSopenharmony_ci 38661847f8eSopenharmony_ci /** 38761847f8eSopenharmony_ci * Indicates extra-large screen density. 38861847f8eSopenharmony_ci * 38961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 39061847f8eSopenharmony_ci * @since 6 39161847f8eSopenharmony_ci */ 39261847f8eSopenharmony_ci /** 39361847f8eSopenharmony_ci * Indicates extra-large screen density. 39461847f8eSopenharmony_ci * 39561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 39661847f8eSopenharmony_ci * @crossplatform 39761847f8eSopenharmony_ci * @since 10 39861847f8eSopenharmony_ci */ 39961847f8eSopenharmony_ci /** 40061847f8eSopenharmony_ci * Indicates extra-large screen density. 40161847f8eSopenharmony_ci * 40261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 40361847f8eSopenharmony_ci * @crossplatform 40461847f8eSopenharmony_ci * @atomicservice 40561847f8eSopenharmony_ci * @since 11 40661847f8eSopenharmony_ci */ 40761847f8eSopenharmony_ci SCREEN_XLDPI = 320, 40861847f8eSopenharmony_ci 40961847f8eSopenharmony_ci /** 41061847f8eSopenharmony_ci * Indicates extra-extra-large screen density. 41161847f8eSopenharmony_ci * 41261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 41361847f8eSopenharmony_ci * @since 6 41461847f8eSopenharmony_ci */ 41561847f8eSopenharmony_ci /** 41661847f8eSopenharmony_ci * Indicates extra-extra-large screen density. 41761847f8eSopenharmony_ci * 41861847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 41961847f8eSopenharmony_ci * @crossplatform 42061847f8eSopenharmony_ci * @since 10 42161847f8eSopenharmony_ci */ 42261847f8eSopenharmony_ci /** 42361847f8eSopenharmony_ci * Indicates extra-extra-large screen density. 42461847f8eSopenharmony_ci * 42561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 42661847f8eSopenharmony_ci * @crossplatform 42761847f8eSopenharmony_ci * @atomicservice 42861847f8eSopenharmony_ci * @since 11 42961847f8eSopenharmony_ci */ 43061847f8eSopenharmony_ci SCREEN_XXLDPI = 480, 43161847f8eSopenharmony_ci 43261847f8eSopenharmony_ci /** 43361847f8eSopenharmony_ci * Indicates extra-extra-extra-large screen density. 43461847f8eSopenharmony_ci * 43561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 43661847f8eSopenharmony_ci * @since 6 43761847f8eSopenharmony_ci */ 43861847f8eSopenharmony_ci /** 43961847f8eSopenharmony_ci * Indicates extra-extra-extra-large screen density. 44061847f8eSopenharmony_ci * 44161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 44261847f8eSopenharmony_ci * @crossplatform 44361847f8eSopenharmony_ci * @since 10 44461847f8eSopenharmony_ci */ 44561847f8eSopenharmony_ci /** 44661847f8eSopenharmony_ci * Indicates extra-extra-extra-large screen density. 44761847f8eSopenharmony_ci * 44861847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 44961847f8eSopenharmony_ci * @crossplatform 45061847f8eSopenharmony_ci * @atomicservice 45161847f8eSopenharmony_ci * @since 11 45261847f8eSopenharmony_ci */ 45361847f8eSopenharmony_ci SCREEN_XXXLDPI = 640 45461847f8eSopenharmony_ci } 45561847f8eSopenharmony_ci 45661847f8eSopenharmony_ci /** 45761847f8eSopenharmony_ci * Enumerates color mode types. 45861847f8eSopenharmony_ci * 45961847f8eSopenharmony_ci * @enum { number } 46061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 46161847f8eSopenharmony_ci * @crossplatform 46261847f8eSopenharmony_ci * @atomicservice 46361847f8eSopenharmony_ci * @since 12 46461847f8eSopenharmony_ci */ 46561847f8eSopenharmony_ci export enum ColorMode { 46661847f8eSopenharmony_ci 46761847f8eSopenharmony_ci /** 46861847f8eSopenharmony_ci * Indicates dark mode. 46961847f8eSopenharmony_ci * 47061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 47161847f8eSopenharmony_ci * @crossplatform 47261847f8eSopenharmony_ci * @atomicservice 47361847f8eSopenharmony_ci * @since 12 47461847f8eSopenharmony_ci */ 47561847f8eSopenharmony_ci DARK = 0, 47661847f8eSopenharmony_ci 47761847f8eSopenharmony_ci /** 47861847f8eSopenharmony_ci * Indicates light mode. 47961847f8eSopenharmony_ci * 48061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 48161847f8eSopenharmony_ci * @crossplatform 48261847f8eSopenharmony_ci * @atomicservice 48361847f8eSopenharmony_ci * @since 12 48461847f8eSopenharmony_ci */ 48561847f8eSopenharmony_ci LIGHT = 1 48661847f8eSopenharmony_ci } 48761847f8eSopenharmony_ci 48861847f8eSopenharmony_ci /** 48961847f8eSopenharmony_ci * Provides the device configuration. 49061847f8eSopenharmony_ci * 49161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 49261847f8eSopenharmony_ci * @since 6 49361847f8eSopenharmony_ci */ 49461847f8eSopenharmony_ci /** 49561847f8eSopenharmony_ci * Provides the device configuration. 49661847f8eSopenharmony_ci * 49761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 49861847f8eSopenharmony_ci * @crossplatform 49961847f8eSopenharmony_ci * @since 10 50061847f8eSopenharmony_ci */ 50161847f8eSopenharmony_ci /** 50261847f8eSopenharmony_ci * Provides the device configuration. 50361847f8eSopenharmony_ci * 50461847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 50561847f8eSopenharmony_ci * @crossplatform 50661847f8eSopenharmony_ci * @atomicservice 50761847f8eSopenharmony_ci * @since 11 50861847f8eSopenharmony_ci */ 50961847f8eSopenharmony_ci export class Configuration { 51061847f8eSopenharmony_ci /** 51161847f8eSopenharmony_ci * Indicates the screen direction of the current device. 51261847f8eSopenharmony_ci * 51361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 51461847f8eSopenharmony_ci * @since 6 51561847f8eSopenharmony_ci */ 51661847f8eSopenharmony_ci /** 51761847f8eSopenharmony_ci * Indicates the screen direction of the current device. 51861847f8eSopenharmony_ci * 51961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 52061847f8eSopenharmony_ci * @crossplatform 52161847f8eSopenharmony_ci * @since 10 52261847f8eSopenharmony_ci */ 52361847f8eSopenharmony_ci /** 52461847f8eSopenharmony_ci * Indicates the screen direction of the current device. 52561847f8eSopenharmony_ci * 52661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 52761847f8eSopenharmony_ci * @crossplatform 52861847f8eSopenharmony_ci * @atomicservice 52961847f8eSopenharmony_ci * @since 11 53061847f8eSopenharmony_ci */ 53161847f8eSopenharmony_ci /** 53261847f8eSopenharmony_ci * Indicates the screen direction of the current device. 53361847f8eSopenharmony_ci * 53461847f8eSopenharmony_ci * @type { Direction } 53561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 53661847f8eSopenharmony_ci * @crossplatform 53761847f8eSopenharmony_ci * @atomicservice 53861847f8eSopenharmony_ci * @since 12 53961847f8eSopenharmony_ci */ 54061847f8eSopenharmony_ci direction: Direction; 54161847f8eSopenharmony_ci 54261847f8eSopenharmony_ci /** 54361847f8eSopenharmony_ci * Indicates the current system language, for example, zh-Hans-CN. 54461847f8eSopenharmony_ci * 54561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 54661847f8eSopenharmony_ci * @since 6 54761847f8eSopenharmony_ci */ 54861847f8eSopenharmony_ci /** 54961847f8eSopenharmony_ci * Indicates the current system language, for example, zh-Hans-CN. 55061847f8eSopenharmony_ci * 55161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 55261847f8eSopenharmony_ci * @crossplatform 55361847f8eSopenharmony_ci * @since 10 55461847f8eSopenharmony_ci */ 55561847f8eSopenharmony_ci /** 55661847f8eSopenharmony_ci * Indicates the current system language, for example, zh-Hans-CN. 55761847f8eSopenharmony_ci * 55861847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 55961847f8eSopenharmony_ci * @crossplatform 56061847f8eSopenharmony_ci * @atomicservice 56161847f8eSopenharmony_ci * @since 11 56261847f8eSopenharmony_ci */ 56361847f8eSopenharmony_ci /** 56461847f8eSopenharmony_ci * Indicates the current system language, for example, zh-Hans-CN. 56561847f8eSopenharmony_ci * 56661847f8eSopenharmony_ci * @type { string } 56761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 56861847f8eSopenharmony_ci * @crossplatform 56961847f8eSopenharmony_ci * @atomicservice 57061847f8eSopenharmony_ci * @since 12 57161847f8eSopenharmony_ci */ 57261847f8eSopenharmony_ci locale: string; 57361847f8eSopenharmony_ci 57461847f8eSopenharmony_ci /** 57561847f8eSopenharmony_ci * Indicates the device type. 57661847f8eSopenharmony_ci * 57761847f8eSopenharmony_ci * @type { DeviceType } 57861847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 57961847f8eSopenharmony_ci * @crossplatform 58061847f8eSopenharmony_ci * @atomicservice 58161847f8eSopenharmony_ci * @since 12 58261847f8eSopenharmony_ci */ 58361847f8eSopenharmony_ci deviceType: DeviceType; 58461847f8eSopenharmony_ci 58561847f8eSopenharmony_ci /** 58661847f8eSopenharmony_ci * Indicates the screen density. 58761847f8eSopenharmony_ci * 58861847f8eSopenharmony_ci * @type { ScreenDensity } 58961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 59061847f8eSopenharmony_ci * @crossplatform 59161847f8eSopenharmony_ci * @atomicservice 59261847f8eSopenharmony_ci * @since 12 59361847f8eSopenharmony_ci */ 59461847f8eSopenharmony_ci screenDensity: ScreenDensity; 59561847f8eSopenharmony_ci 59661847f8eSopenharmony_ci /** 59761847f8eSopenharmony_ci * Indicates the color mode. 59861847f8eSopenharmony_ci * 59961847f8eSopenharmony_ci * @type { ColorMode } 60061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 60161847f8eSopenharmony_ci * @crossplatform 60261847f8eSopenharmony_ci * @atomicservice 60361847f8eSopenharmony_ci * @since 12 60461847f8eSopenharmony_ci */ 60561847f8eSopenharmony_ci colorMode: ColorMode; 60661847f8eSopenharmony_ci 60761847f8eSopenharmony_ci /** 60861847f8eSopenharmony_ci * Indicates the mcc. 60961847f8eSopenharmony_ci * 61061847f8eSopenharmony_ci * @type { number } 61161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 61261847f8eSopenharmony_ci * @crossplatform 61361847f8eSopenharmony_ci * @atomicservice 61461847f8eSopenharmony_ci * @since 12 61561847f8eSopenharmony_ci */ 61661847f8eSopenharmony_ci mcc: number; 61761847f8eSopenharmony_ci 61861847f8eSopenharmony_ci /** 61961847f8eSopenharmony_ci * Indicates the mnc. 62061847f8eSopenharmony_ci * 62161847f8eSopenharmony_ci * @type { number } 62261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 62361847f8eSopenharmony_ci * @crossplatform 62461847f8eSopenharmony_ci * @atomicservice 62561847f8eSopenharmony_ci * @since 12 62661847f8eSopenharmony_ci */ 62761847f8eSopenharmony_ci mnc: number; 62861847f8eSopenharmony_ci } 62961847f8eSopenharmony_ci 63061847f8eSopenharmony_ci /** 63161847f8eSopenharmony_ci * Provides the device capability. 63261847f8eSopenharmony_ci * 63361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 63461847f8eSopenharmony_ci * @since 6 63561847f8eSopenharmony_ci */ 63661847f8eSopenharmony_ci /** 63761847f8eSopenharmony_ci * Provides the device capability. 63861847f8eSopenharmony_ci * 63961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 64061847f8eSopenharmony_ci * @crossplatform 64161847f8eSopenharmony_ci * @since 10 64261847f8eSopenharmony_ci */ 64361847f8eSopenharmony_ci /** 64461847f8eSopenharmony_ci * Provides the device capability. 64561847f8eSopenharmony_ci * 64661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 64761847f8eSopenharmony_ci * @crossplatform 64861847f8eSopenharmony_ci * @atomicservice 64961847f8eSopenharmony_ci * @since 11 65061847f8eSopenharmony_ci */ 65161847f8eSopenharmony_ci export class DeviceCapability { 65261847f8eSopenharmony_ci /** 65361847f8eSopenharmony_ci * Indicates the screen density of the current device. 65461847f8eSopenharmony_ci * 65561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 65661847f8eSopenharmony_ci * @since 6 65761847f8eSopenharmony_ci */ 65861847f8eSopenharmony_ci /** 65961847f8eSopenharmony_ci * Indicates the screen density of the current device. 66061847f8eSopenharmony_ci * 66161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 66261847f8eSopenharmony_ci * @crossplatform 66361847f8eSopenharmony_ci * @since 10 66461847f8eSopenharmony_ci */ 66561847f8eSopenharmony_ci /** 66661847f8eSopenharmony_ci * Indicates the screen density of the current device. 66761847f8eSopenharmony_ci * 66861847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 66961847f8eSopenharmony_ci * @crossplatform 67061847f8eSopenharmony_ci * @atomicservice 67161847f8eSopenharmony_ci * @since 11 67261847f8eSopenharmony_ci */ 67361847f8eSopenharmony_ci /** 67461847f8eSopenharmony_ci * Indicates the screen density of the current device. 67561847f8eSopenharmony_ci * 67661847f8eSopenharmony_ci * @type { ScreenDensity } 67761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 67861847f8eSopenharmony_ci * @crossplatform 67961847f8eSopenharmony_ci * @atomicservice 68061847f8eSopenharmony_ci * @since 12 68161847f8eSopenharmony_ci */ 68261847f8eSopenharmony_ci screenDensity: ScreenDensity; 68361847f8eSopenharmony_ci 68461847f8eSopenharmony_ci /** 68561847f8eSopenharmony_ci * Indicates the type of the current device. 68661847f8eSopenharmony_ci * 68761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 68861847f8eSopenharmony_ci * @since 6 68961847f8eSopenharmony_ci */ 69061847f8eSopenharmony_ci /** 69161847f8eSopenharmony_ci * Indicates the type of the current device. 69261847f8eSopenharmony_ci * 69361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 69461847f8eSopenharmony_ci * @crossplatform 69561847f8eSopenharmony_ci * @since 10 69661847f8eSopenharmony_ci */ 69761847f8eSopenharmony_ci /** 69861847f8eSopenharmony_ci * Indicates the type of the current device. 69961847f8eSopenharmony_ci * 70061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 70161847f8eSopenharmony_ci * @crossplatform 70261847f8eSopenharmony_ci * @atomicservice 70361847f8eSopenharmony_ci * @since 11 70461847f8eSopenharmony_ci */ 70561847f8eSopenharmony_ci /** 70661847f8eSopenharmony_ci * Indicates the type of the current device. 70761847f8eSopenharmony_ci * 70861847f8eSopenharmony_ci * @type { DeviceType } 70961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 71061847f8eSopenharmony_ci * @crossplatform 71161847f8eSopenharmony_ci * @atomicservice 71261847f8eSopenharmony_ci * @since 12 71361847f8eSopenharmony_ci */ 71461847f8eSopenharmony_ci deviceType: DeviceType; 71561847f8eSopenharmony_ci } 71661847f8eSopenharmony_ci 71761847f8eSopenharmony_ci /** 71861847f8eSopenharmony_ci * The ResourceManager callback. 71961847f8eSopenharmony_ci * 72061847f8eSopenharmony_ci * @interface AsyncCallback 72161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 72261847f8eSopenharmony_ci * @since 6 72361847f8eSopenharmony_ci * @deprecated since 9 72461847f8eSopenharmony_ci */ 72561847f8eSopenharmony_ci export interface AsyncCallback<T> { 72661847f8eSopenharmony_ci /** 72761847f8eSopenharmony_ci * Defines the callback format. 72861847f8eSopenharmony_ci * 72961847f8eSopenharmony_ci * @param { Error } err - Indicates the error info. 73061847f8eSopenharmony_ci * @param { T } data - Indicates the return data. 73161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 73261847f8eSopenharmony_ci * @since 6 73361847f8eSopenharmony_ci * @deprecated since 9 73461847f8eSopenharmony_ci */ 73561847f8eSopenharmony_ci (err: Error, data: T): void; 73661847f8eSopenharmony_ci } 73761847f8eSopenharmony_ci 73861847f8eSopenharmony_ci /** 73961847f8eSopenharmony_ci * Obtains the ResourceManager object of the current application. 74061847f8eSopenharmony_ci * 74161847f8eSopenharmony_ci * @param { AsyncCallback<ResourceManager> } callback - Indicates the callback containing the ResourceManager object. 74261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 74361847f8eSopenharmony_ci * @FAModelOnly 74461847f8eSopenharmony_ci * @since 6 74561847f8eSopenharmony_ci */ 74661847f8eSopenharmony_ci /** 74761847f8eSopenharmony_ci * Obtains the ResourceManager object of the current application. 74861847f8eSopenharmony_ci * 74961847f8eSopenharmony_ci * @param { AsyncCallback<ResourceManager> } callback - Indicates the callback containing the ResourceManager object. 75061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 75161847f8eSopenharmony_ci * @FAModelOnly 75261847f8eSopenharmony_ci * @since 11 75361847f8eSopenharmony_ci */ 75461847f8eSopenharmony_ci export function getResourceManager(callback: AsyncCallback<ResourceManager>): void; 75561847f8eSopenharmony_ci 75661847f8eSopenharmony_ci /** 75761847f8eSopenharmony_ci * Obtains the ResourceManager object of the specified application. 75861847f8eSopenharmony_ci * 75961847f8eSopenharmony_ci * @param { string } bundleName - Indicates the bundle name of the specified application. 76061847f8eSopenharmony_ci * @param { AsyncCallback<ResourceManager> } callback - Indicates the callback containing the ResourceManager object. 76161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 76261847f8eSopenharmony_ci * @FAModelOnly 76361847f8eSopenharmony_ci * @since 6 76461847f8eSopenharmony_ci */ 76561847f8eSopenharmony_ci /** 76661847f8eSopenharmony_ci * Obtains the ResourceManager object of the specified application. 76761847f8eSopenharmony_ci * 76861847f8eSopenharmony_ci * @param { string } bundleName - Indicates the bundle name of the specified application. 76961847f8eSopenharmony_ci * @param { AsyncCallback<ResourceManager> } callback - Indicates the callback containing the ResourceManager object. 77061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 77161847f8eSopenharmony_ci * @FAModelOnly 77261847f8eSopenharmony_ci * @since 11 77361847f8eSopenharmony_ci */ 77461847f8eSopenharmony_ci export function getResourceManager(bundleName: string, callback: AsyncCallback<ResourceManager>): void; 77561847f8eSopenharmony_ci 77661847f8eSopenharmony_ci /** 77761847f8eSopenharmony_ci * Obtains the ResourceManager object of the current application. 77861847f8eSopenharmony_ci * 77961847f8eSopenharmony_ci * @returns { Promise<ResourceManager> } The ResourceManager object is returned in Promise mode. 78061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 78161847f8eSopenharmony_ci * @FAModelOnly 78261847f8eSopenharmony_ci * @since 6 78361847f8eSopenharmony_ci */ 78461847f8eSopenharmony_ci /** 78561847f8eSopenharmony_ci * Obtains the ResourceManager object of the current application. 78661847f8eSopenharmony_ci * 78761847f8eSopenharmony_ci * @returns { Promise<ResourceManager> } The ResourceManager object is returned in Promise mode. 78861847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 78961847f8eSopenharmony_ci * @FAModelOnly 79061847f8eSopenharmony_ci * @since 11 79161847f8eSopenharmony_ci */ 79261847f8eSopenharmony_ci export function getResourceManager(): Promise<ResourceManager>; 79361847f8eSopenharmony_ci 79461847f8eSopenharmony_ci /** 79561847f8eSopenharmony_ci * Obtains the ResourceManager object of the specified application. 79661847f8eSopenharmony_ci * 79761847f8eSopenharmony_ci * @param { string } bundleName - Indicates the bundle name of the specified application. 79861847f8eSopenharmony_ci * @returns { Promise<ResourceManager> } The ResourceManager object is returned in Promise mode. 79961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 80061847f8eSopenharmony_ci * @FAModelOnly 80161847f8eSopenharmony_ci * @since 6 80261847f8eSopenharmony_ci */ 80361847f8eSopenharmony_ci /** 80461847f8eSopenharmony_ci * Obtains the ResourceManager object of the specified application. 80561847f8eSopenharmony_ci * 80661847f8eSopenharmony_ci * @param { string } bundleName - Indicates the bundle name of the specified application. 80761847f8eSopenharmony_ci * @returns { Promise<ResourceManager> } The ResourceManager object is returned in Promise mode. 80861847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 80961847f8eSopenharmony_ci * @FAModelOnly 81061847f8eSopenharmony_ci * @since 11 81161847f8eSopenharmony_ci */ 81261847f8eSopenharmony_ci export function getResourceManager(bundleName: string): Promise<ResourceManager>; 81361847f8eSopenharmony_ci 81461847f8eSopenharmony_ci /** 81561847f8eSopenharmony_ci * Obtains a global shared system ResourceManager object that provides access to only system resource, in which the 81661847f8eSopenharmony_ci * resConfig is default value(contains resLocale, screenDensityDpi, direction, etc). 81761847f8eSopenharmony_ci * 81861847f8eSopenharmony_ci * @returns { ResourceManager } The System ResourceManager object is returned. 81961847f8eSopenharmony_ci * @throws { BusinessError } 9001009 - Failed to access the system resource. 82061847f8eSopenharmony_ci * which is not mapped to application sandbox, This error code will be thrown. 82161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 82261847f8eSopenharmony_ci * @since 10 82361847f8eSopenharmony_ci */ 82461847f8eSopenharmony_ci /** 82561847f8eSopenharmony_ci * Obtains a global shared system ResourceManager object that provides access to only system resource, in which the 82661847f8eSopenharmony_ci * resConfig is default value(contains resLocale, screenDensityDpi, direction, etc). 82761847f8eSopenharmony_ci * 82861847f8eSopenharmony_ci * @returns { ResourceManager } The System ResourceManager object is returned. 82961847f8eSopenharmony_ci * @throws { BusinessError } 9001009 - Failed to access the system resource. 83061847f8eSopenharmony_ci * which is not mapped to application sandbox, This error code will be thrown. 83161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 83261847f8eSopenharmony_ci * @crossplatform 83361847f8eSopenharmony_ci * @atomicservice 83461847f8eSopenharmony_ci * @since 11 83561847f8eSopenharmony_ci */ 83661847f8eSopenharmony_ci export function getSystemResourceManager(): ResourceManager; 83761847f8eSopenharmony_ci 83861847f8eSopenharmony_ci /** 83961847f8eSopenharmony_ci * Provides the capability of accessing application resources. 84061847f8eSopenharmony_ci * 84161847f8eSopenharmony_ci * @interface ResourceManager 84261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 84361847f8eSopenharmony_ci * @since 6 84461847f8eSopenharmony_ci */ 84561847f8eSopenharmony_ci /** 84661847f8eSopenharmony_ci * Provides the capability of accessing application resources. 84761847f8eSopenharmony_ci * 84861847f8eSopenharmony_ci * @interface ResourceManager 84961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 85061847f8eSopenharmony_ci * @crossplatform 85161847f8eSopenharmony_ci * @since 10 85261847f8eSopenharmony_ci */ 85361847f8eSopenharmony_ci /** 85461847f8eSopenharmony_ci * Provides the capability of accessing application resources. 85561847f8eSopenharmony_ci * 85661847f8eSopenharmony_ci * @interface ResourceManager 85761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 85861847f8eSopenharmony_ci * @crossplatform 85961847f8eSopenharmony_ci * @atomicservice 86061847f8eSopenharmony_ci * @since 11 86161847f8eSopenharmony_ci */ 86261847f8eSopenharmony_ci export interface ResourceManager { 86361847f8eSopenharmony_ci /** 86461847f8eSopenharmony_ci * Obtains the character string corresponding to a specified resource ID in callback mode. 86561847f8eSopenharmony_ci * 86661847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 86761847f8eSopenharmony_ci * @param { AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the obtained character string. 86861847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 86961847f8eSopenharmony_ci * @since 6 87061847f8eSopenharmony_ci * @deprecated since 9 87161847f8eSopenharmony_ci * @useinstead ohos.resourceManager.getStringValue 87261847f8eSopenharmony_ci */ 87361847f8eSopenharmony_ci getString(resId: number, callback: AsyncCallback<string>): void; 87461847f8eSopenharmony_ci 87561847f8eSopenharmony_ci /** 87661847f8eSopenharmony_ci * Obtains string resources associated with a specified resource ID in Promise mode. 87761847f8eSopenharmony_ci * 87861847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 87961847f8eSopenharmony_ci * @returns { Promise<string> } The character string corresponding to the resource ID. 88061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 88161847f8eSopenharmony_ci * @since 6 88261847f8eSopenharmony_ci * @deprecated since 9 88361847f8eSopenharmony_ci * @useinstead ohos.resourceManager.getStringValue 88461847f8eSopenharmony_ci */ 88561847f8eSopenharmony_ci getString(resId: number): Promise<string>; 88661847f8eSopenharmony_ci 88761847f8eSopenharmony_ci /** 88861847f8eSopenharmony_ci * Obtains the character string corresponding to a specified resource object in callback mode. 88961847f8eSopenharmony_ci * 89061847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 89161847f8eSopenharmony_ci * @param { _AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the obtained character string. 89261847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 89361847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 89461847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 89561847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 89661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 89761847f8eSopenharmony_ci * @stagemodelonly 89861847f8eSopenharmony_ci * @since 9 89961847f8eSopenharmony_ci */ 90061847f8eSopenharmony_ci /** 90161847f8eSopenharmony_ci * Obtains the character string corresponding to a specified resource object in callback mode. 90261847f8eSopenharmony_ci * 90361847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 90461847f8eSopenharmony_ci * @param { _AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the obtained character string. 90561847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 90661847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 90761847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 90861847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 90961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 91061847f8eSopenharmony_ci * @stagemodelonly 91161847f8eSopenharmony_ci * @crossplatform 91261847f8eSopenharmony_ci * @since 10 91361847f8eSopenharmony_ci */ 91461847f8eSopenharmony_ci /** 91561847f8eSopenharmony_ci * Obtains the character string corresponding to a specified resource object in callback mode. 91661847f8eSopenharmony_ci * 91761847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 91861847f8eSopenharmony_ci * @param { _AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the obtained character string. 91961847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 92061847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 92161847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 92261847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 92361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 92461847f8eSopenharmony_ci * @stagemodelonly 92561847f8eSopenharmony_ci * @crossplatform 92661847f8eSopenharmony_ci * @atomicservice 92761847f8eSopenharmony_ci * @since 11 92861847f8eSopenharmony_ci */ 92961847f8eSopenharmony_ci getStringValue(resource: Resource, callback: _AsyncCallback<string>): void; 93061847f8eSopenharmony_ci 93161847f8eSopenharmony_ci /** 93261847f8eSopenharmony_ci * Obtains string resources associated with a specified resource object in Promise mode. 93361847f8eSopenharmony_ci * 93461847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 93561847f8eSopenharmony_ci * @returns { Promise<string> } The character string corresponding to the resource object. 93661847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 93761847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 93861847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 93961847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 94061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 94161847f8eSopenharmony_ci * @stagemodelonly 94261847f8eSopenharmony_ci * @since 9 94361847f8eSopenharmony_ci */ 94461847f8eSopenharmony_ci /** 94561847f8eSopenharmony_ci * Obtains string resources associated with a specified resource object in Promise mode. 94661847f8eSopenharmony_ci * 94761847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 94861847f8eSopenharmony_ci * @returns { Promise<string> } The character string corresponding to the resource object. 94961847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 95061847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 95161847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 95261847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 95361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 95461847f8eSopenharmony_ci * @stagemodelonly 95561847f8eSopenharmony_ci * @crossplatform 95661847f8eSopenharmony_ci * @since 10 95761847f8eSopenharmony_ci */ 95861847f8eSopenharmony_ci /** 95961847f8eSopenharmony_ci * Obtains string resources associated with a specified resource object in Promise mode. 96061847f8eSopenharmony_ci * 96161847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 96261847f8eSopenharmony_ci * @returns { Promise<string> } The character string corresponding to the resource object. 96361847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 96461847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 96561847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 96661847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 96761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 96861847f8eSopenharmony_ci * @stagemodelonly 96961847f8eSopenharmony_ci * @crossplatform 97061847f8eSopenharmony_ci * @atomicservice 97161847f8eSopenharmony_ci * @since 11 97261847f8eSopenharmony_ci */ 97361847f8eSopenharmony_ci getStringValue(resource: Resource): Promise<string>; 97461847f8eSopenharmony_ci 97561847f8eSopenharmony_ci /** 97661847f8eSopenharmony_ci * Obtains the array of character strings corresponding to a specified resource ID in callback mode. 97761847f8eSopenharmony_ci * 97861847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 97961847f8eSopenharmony_ci * @param { AsyncCallback<Array<string>> } callback - Indicates the asynchronous callback used to return the obtained array of character strings. 98061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 98161847f8eSopenharmony_ci * @since 6 98261847f8eSopenharmony_ci * @deprecated since 9 98361847f8eSopenharmony_ci * @useinstead ohos.resourceManager.getStringArrayValue 98461847f8eSopenharmony_ci */ 98561847f8eSopenharmony_ci getStringArray(resId: number, callback: AsyncCallback<Array<string>>): void; 98661847f8eSopenharmony_ci 98761847f8eSopenharmony_ci /** 98861847f8eSopenharmony_ci * Obtains the array of character strings corresponding to a specified resource ID in Promise mode. 98961847f8eSopenharmony_ci * 99061847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 99161847f8eSopenharmony_ci * @returns { Promise<Array<string>> } The array of character strings corresponding to the specified resource ID. 99261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 99361847f8eSopenharmony_ci * @since 6 99461847f8eSopenharmony_ci * @deprecated since 9 99561847f8eSopenharmony_ci * @useinstead ohos.resourceManager.getStringArrayValue 99661847f8eSopenharmony_ci */ 99761847f8eSopenharmony_ci getStringArray(resId: number): Promise<Array<string>>; 99861847f8eSopenharmony_ci 99961847f8eSopenharmony_ci /** 100061847f8eSopenharmony_ci * Obtains the array of character strings corresponding to a specified resource object in callback mode. 100161847f8eSopenharmony_ci * 100261847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 100361847f8eSopenharmony_ci * @param { _AsyncCallback<Array<string>> } callback - Indicates the asynchronous callback used to return the obtained array of character strings. 100461847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 100561847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 100661847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 100761847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 100861847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 100961847f8eSopenharmony_ci * @stagemodelonly 101061847f8eSopenharmony_ci * @since 9 101161847f8eSopenharmony_ci */ 101261847f8eSopenharmony_ci /** 101361847f8eSopenharmony_ci * Obtains the array of character strings corresponding to a specified resource object in callback mode. 101461847f8eSopenharmony_ci * 101561847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 101661847f8eSopenharmony_ci * @param { _AsyncCallback<Array<string>> } callback - Indicates the asynchronous callback used to return the obtained array of character strings. 101761847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 101861847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 101961847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 102061847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 102161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 102261847f8eSopenharmony_ci * @stagemodelonly 102361847f8eSopenharmony_ci * @crossplatform 102461847f8eSopenharmony_ci * @since 10 102561847f8eSopenharmony_ci */ 102661847f8eSopenharmony_ci /** 102761847f8eSopenharmony_ci * Obtains the array of character strings corresponding to a specified resource object in callback mode. 102861847f8eSopenharmony_ci * 102961847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 103061847f8eSopenharmony_ci * @param { _AsyncCallback<Array<string>> } callback - Indicates the asynchronous callback used to return the obtained array of character strings. 103161847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 103261847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 103361847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 103461847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 103561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 103661847f8eSopenharmony_ci * @stagemodelonly 103761847f8eSopenharmony_ci * @crossplatform 103861847f8eSopenharmony_ci * @atomicservice 103961847f8eSopenharmony_ci * @since 11 104061847f8eSopenharmony_ci */ 104161847f8eSopenharmony_ci getStringArrayValue(resource: Resource, callback: _AsyncCallback<Array<string>>): void; 104261847f8eSopenharmony_ci 104361847f8eSopenharmony_ci /** 104461847f8eSopenharmony_ci * Obtains the array of character strings corresponding to a specified resource object in Promise mode. 104561847f8eSopenharmony_ci * 104661847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 104761847f8eSopenharmony_ci * @returns { Promise<Array<string>> } The array of character strings corresponding to the specified resource object. 104861847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 104961847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 105061847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 105161847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 105261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 105361847f8eSopenharmony_ci * @stagemodelonly 105461847f8eSopenharmony_ci * @since 9 105561847f8eSopenharmony_ci */ 105661847f8eSopenharmony_ci /** 105761847f8eSopenharmony_ci * Obtains the array of character strings corresponding to a specified resource object in Promise mode. 105861847f8eSopenharmony_ci * 105961847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 106061847f8eSopenharmony_ci * @returns { Promise<Array<string>> } The array of character strings corresponding to the specified resource object. 106161847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 106261847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 106361847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 106461847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 106561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 106661847f8eSopenharmony_ci * @stagemodelonly 106761847f8eSopenharmony_ci * @crossplatform 106861847f8eSopenharmony_ci * @since 10 106961847f8eSopenharmony_ci */ 107061847f8eSopenharmony_ci /** 107161847f8eSopenharmony_ci * Obtains the array of character strings corresponding to a specified resource object in Promise mode. 107261847f8eSopenharmony_ci * 107361847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 107461847f8eSopenharmony_ci * @returns { Promise<Array<string>> } The array of character strings corresponding to the specified resource object. 107561847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 107661847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 107761847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 107861847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 107961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 108061847f8eSopenharmony_ci * @stagemodelonly 108161847f8eSopenharmony_ci * @crossplatform 108261847f8eSopenharmony_ci * @atomicservice 108361847f8eSopenharmony_ci * @since 11 108461847f8eSopenharmony_ci */ 108561847f8eSopenharmony_ci getStringArrayValue(resource: Resource): Promise<Array<string>>; 108661847f8eSopenharmony_ci 108761847f8eSopenharmony_ci /** 108861847f8eSopenharmony_ci * Obtains the content of the media file corresponding to a specified resource ID in callback mode. 108961847f8eSopenharmony_ci * 109061847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 109161847f8eSopenharmony_ci * @param { AsyncCallback<Uint8Array> } callback - Indicates the asynchronous callback used to return the obtained media file content. 109261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 109361847f8eSopenharmony_ci * @since 6 109461847f8eSopenharmony_ci * @deprecated since 9 109561847f8eSopenharmony_ci * @useinstead ohos.resourceManager.getMediaContent 109661847f8eSopenharmony_ci */ 109761847f8eSopenharmony_ci getMedia(resId: number, callback: AsyncCallback<Uint8Array>): void; 109861847f8eSopenharmony_ci 109961847f8eSopenharmony_ci /** 110061847f8eSopenharmony_ci * Obtains the content of the media file corresponding to a specified resource ID in Promise mode. 110161847f8eSopenharmony_ci * 110261847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 110361847f8eSopenharmony_ci * @returns { Promise<Uint8Array> } The content of the media file corresponding to the specified resource ID. 110461847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 110561847f8eSopenharmony_ci * @since 6 110661847f8eSopenharmony_ci * @deprecated since 9 110761847f8eSopenharmony_ci * @useinstead ohos.resourceManager.getMediaContent 110861847f8eSopenharmony_ci */ 110961847f8eSopenharmony_ci getMedia(resId: number): Promise<Uint8Array>; 111061847f8eSopenharmony_ci 111161847f8eSopenharmony_ci /** 111261847f8eSopenharmony_ci * Obtains the content of the media file corresponding to a specified resource object in callback mode. 111361847f8eSopenharmony_ci * 111461847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 111561847f8eSopenharmony_ci * @param { _AsyncCallback<Uint8Array> } callback - Indicates the asynchronous callback used to return the obtained media file content. 111661847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 111761847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 111861847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 111961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 112061847f8eSopenharmony_ci * @stagemodelonly 112161847f8eSopenharmony_ci * @since 9 112261847f8eSopenharmony_ci */ 112361847f8eSopenharmony_ci /** 112461847f8eSopenharmony_ci * Obtains the content of the media file corresponding to a specified resource object in callback mode. 112561847f8eSopenharmony_ci * 112661847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 112761847f8eSopenharmony_ci * @param { _AsyncCallback<Uint8Array> } callback - Indicates the asynchronous callback used to return the obtained media file content. 112861847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 112961847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 113061847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 113161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 113261847f8eSopenharmony_ci * @stagemodelonly 113361847f8eSopenharmony_ci * @crossplatform 113461847f8eSopenharmony_ci * @since 10 113561847f8eSopenharmony_ci */ 113661847f8eSopenharmony_ci /** 113761847f8eSopenharmony_ci * Obtains the content of the media file corresponding to a specified resource object in callback mode. 113861847f8eSopenharmony_ci * 113961847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 114061847f8eSopenharmony_ci * @param { _AsyncCallback<Uint8Array> } callback - Indicates the asynchronous callback used to return the obtained media file content. 114161847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 114261847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 114361847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 114461847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 114561847f8eSopenharmony_ci * @stagemodelonly 114661847f8eSopenharmony_ci * @crossplatform 114761847f8eSopenharmony_ci * @atomicservice 114861847f8eSopenharmony_ci * @since 11 114961847f8eSopenharmony_ci */ 115061847f8eSopenharmony_ci getMediaContent(resource: Resource, callback: _AsyncCallback<Uint8Array>): void; 115161847f8eSopenharmony_ci 115261847f8eSopenharmony_ci /** 115361847f8eSopenharmony_ci * Obtains the content of the specified screen density media file corresponding to a specified resource object in callback mode. 115461847f8eSopenharmony_ci * 115561847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 115661847f8eSopenharmony_ci * @param { number } density - The parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 115761847f8eSopenharmony_ci * to use the density of current system dpi. 115861847f8eSopenharmony_ci * @param { _AsyncCallback<Uint8Array> } callback - Indicates the asynchronous callback used to return the obtained 115961847f8eSopenharmony_ci * specified screen density media file content. 116061847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 116161847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 116261847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 116361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 116461847f8eSopenharmony_ci * @stagemodelonly 116561847f8eSopenharmony_ci * @since 10 116661847f8eSopenharmony_ci */ 116761847f8eSopenharmony_ci /** 116861847f8eSopenharmony_ci * Obtains the content of the specified screen density media file corresponding to a specified resource object in callback mode. 116961847f8eSopenharmony_ci * 117061847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 117161847f8eSopenharmony_ci * @param { number } density - The parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 117261847f8eSopenharmony_ci * to use the density of current system dpi. 117361847f8eSopenharmony_ci * @param { _AsyncCallback<Uint8Array> } callback - Indicates the asynchronous callback used to return the obtained 117461847f8eSopenharmony_ci * specified screen density media file content. 117561847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 117661847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 117761847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 117861847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 117961847f8eSopenharmony_ci * @stagemodelonly 118061847f8eSopenharmony_ci * @crossplatform 118161847f8eSopenharmony_ci * @atomicservice 118261847f8eSopenharmony_ci * @since 11 118361847f8eSopenharmony_ci */ 118461847f8eSopenharmony_ci getMediaContent(resource: Resource, density: number, callback: _AsyncCallback<Uint8Array>): void; 118561847f8eSopenharmony_ci 118661847f8eSopenharmony_ci /** 118761847f8eSopenharmony_ci * Obtains the content of the media file corresponding to a specified resource object in Promise mode. 118861847f8eSopenharmony_ci * 118961847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 119061847f8eSopenharmony_ci * @returns { Promise<Uint8Array> } The content of the media file corresponding to the specified resource object. 119161847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 119261847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 119361847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 119461847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 119561847f8eSopenharmony_ci * @stagemodelonly 119661847f8eSopenharmony_ci * @since 9 119761847f8eSopenharmony_ci */ 119861847f8eSopenharmony_ci /** 119961847f8eSopenharmony_ci * Obtains the content of the media file corresponding to a specified resource object in Promise mode. 120061847f8eSopenharmony_ci * 120161847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 120261847f8eSopenharmony_ci * @returns { Promise<Uint8Array> } The content of the media file corresponding to the specified resource object. 120361847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 120461847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 120561847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 120661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 120761847f8eSopenharmony_ci * @stagemodelonly 120861847f8eSopenharmony_ci * @crossplatform 120961847f8eSopenharmony_ci * @since 10 121061847f8eSopenharmony_ci */ 121161847f8eSopenharmony_ci /** 121261847f8eSopenharmony_ci * Obtains the content of the media file corresponding to a specified resource object in Promise mode. 121361847f8eSopenharmony_ci * 121461847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 121561847f8eSopenharmony_ci * @returns { Promise<Uint8Array> } The content of the media file corresponding to the specified resource object. 121661847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 121761847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 121861847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 121961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 122061847f8eSopenharmony_ci * @stagemodelonly 122161847f8eSopenharmony_ci * @crossplatform 122261847f8eSopenharmony_ci * @atomicservice 122361847f8eSopenharmony_ci * @since 11 122461847f8eSopenharmony_ci */ 122561847f8eSopenharmony_ci getMediaContent(resource: Resource): Promise<Uint8Array>; 122661847f8eSopenharmony_ci 122761847f8eSopenharmony_ci /** 122861847f8eSopenharmony_ci * Obtains the content of the specified screen density media file corresponding to a specified resource object in Promise mode. 122961847f8eSopenharmony_ci * 123061847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 123161847f8eSopenharmony_ci * @param { number } density - The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 123261847f8eSopenharmony_ci * to use the density of current system dpi. 123361847f8eSopenharmony_ci * @returns { Promise<Uint8Array> } The content of the specified screen density media file corresponding to the 123461847f8eSopenharmony_ci * specified resource object. 123561847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 123661847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 123761847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 123861847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 123961847f8eSopenharmony_ci * @stagemodelonly 124061847f8eSopenharmony_ci * @since 10 124161847f8eSopenharmony_ci */ 124261847f8eSopenharmony_ci /** 124361847f8eSopenharmony_ci * Obtains the content of the specified screen density media file corresponding to a specified resource object in Promise mode. 124461847f8eSopenharmony_ci * 124561847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 124661847f8eSopenharmony_ci * @param { number } density - The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 124761847f8eSopenharmony_ci * to use the density of current system dpi. 124861847f8eSopenharmony_ci * @returns { Promise<Uint8Array> } The content of the specified screen density media file corresponding to the 124961847f8eSopenharmony_ci * specified resource object. 125061847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 125161847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 125261847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 125361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 125461847f8eSopenharmony_ci * @stagemodelonly 125561847f8eSopenharmony_ci * @crossplatform 125661847f8eSopenharmony_ci * @atomicservice 125761847f8eSopenharmony_ci * @since 11 125861847f8eSopenharmony_ci */ 125961847f8eSopenharmony_ci getMediaContent(resource: Resource, density: number): Promise<Uint8Array>; 126061847f8eSopenharmony_ci 126161847f8eSopenharmony_ci /** 126261847f8eSopenharmony_ci * Obtains the Base64 code of the image resource corresponding to the specified resource ID in callback mode. 126361847f8eSopenharmony_ci * 126461847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 126561847f8eSopenharmony_ci * @param { AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the obtained Base64 code of the image 126661847f8eSopenharmony_ci * resource. 126761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 126861847f8eSopenharmony_ci * @since 6 126961847f8eSopenharmony_ci * @deprecated since 9 127061847f8eSopenharmony_ci * @useinstead ohos.resourceManager.getMediaContentBase64 127161847f8eSopenharmony_ci */ 127261847f8eSopenharmony_ci getMediaBase64(resId: number, callback: AsyncCallback<string>): void; 127361847f8eSopenharmony_ci 127461847f8eSopenharmony_ci /** 127561847f8eSopenharmony_ci * Obtains the Base64 code of the image resource corresponding to the specified resource ID in Promise mode. 127661847f8eSopenharmony_ci * 127761847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 127861847f8eSopenharmony_ci * @returns { Promise<string> } The Base64 code of the image resource corresponding to the specified resource ID. 127961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 128061847f8eSopenharmony_ci * @since 6 128161847f8eSopenharmony_ci * @deprecated since 9 128261847f8eSopenharmony_ci * @useinstead ohos.resourceManager.getMediaContentBase64 128361847f8eSopenharmony_ci */ 128461847f8eSopenharmony_ci getMediaBase64(resId: number): Promise<string>; 128561847f8eSopenharmony_ci 128661847f8eSopenharmony_ci /** 128761847f8eSopenharmony_ci * Obtains the Base64 code of the image resource corresponding to the specified resource object in callback mode. 128861847f8eSopenharmony_ci * 128961847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 129061847f8eSopenharmony_ci * @param { _AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the obtained Base64 code of the image 129161847f8eSopenharmony_ci * resource. 129261847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 129361847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 129461847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 129561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 129661847f8eSopenharmony_ci * @stagemodelonly 129761847f8eSopenharmony_ci * @since 9 129861847f8eSopenharmony_ci */ 129961847f8eSopenharmony_ci /** 130061847f8eSopenharmony_ci * Obtains the Base64 code of the image resource corresponding to the specified resource object in callback mode. 130161847f8eSopenharmony_ci * 130261847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 130361847f8eSopenharmony_ci * @param { _AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the obtained Base64 code of the image 130461847f8eSopenharmony_ci * resource. 130561847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 130661847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 130761847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 130861847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 130961847f8eSopenharmony_ci * @stagemodelonly 131061847f8eSopenharmony_ci * @crossplatform 131161847f8eSopenharmony_ci * @since 10 131261847f8eSopenharmony_ci */ 131361847f8eSopenharmony_ci /** 131461847f8eSopenharmony_ci * Obtains the Base64 code of the image resource corresponding to the specified resource object in callback mode. 131561847f8eSopenharmony_ci * 131661847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 131761847f8eSopenharmony_ci * @param { _AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the obtained Base64 code of the image 131861847f8eSopenharmony_ci * resource. 131961847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 132061847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 132161847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 132261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 132361847f8eSopenharmony_ci * @stagemodelonly 132461847f8eSopenharmony_ci * @crossplatform 132561847f8eSopenharmony_ci * @atomicservice 132661847f8eSopenharmony_ci * @since 11 132761847f8eSopenharmony_ci */ 132861847f8eSopenharmony_ci getMediaContentBase64(resource: Resource, callback: _AsyncCallback<string>): void; 132961847f8eSopenharmony_ci 133061847f8eSopenharmony_ci /** 133161847f8eSopenharmony_ci * Obtains the Base64 code of the specified screen density image resource corresponding to the specified resource object in callback mode. 133261847f8eSopenharmony_ci * 133361847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 133461847f8eSopenharmony_ci * @param { number } density - The parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 133561847f8eSopenharmony_ci * to use the density of current system dpi. 133661847f8eSopenharmony_ci * @param { _AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the obtained Base64 code of the 133761847f8eSopenharmony_ci * specified screen density image resource. 133861847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 133961847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 134061847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 134161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 134261847f8eSopenharmony_ci * @stagemodelonly 134361847f8eSopenharmony_ci * @since 10 134461847f8eSopenharmony_ci */ 134561847f8eSopenharmony_ci /** 134661847f8eSopenharmony_ci * Obtains the Base64 code of the specified screen density image resource corresponding to the specified resource object in callback mode. 134761847f8eSopenharmony_ci * 134861847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 134961847f8eSopenharmony_ci * @param { number } density - The parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 135061847f8eSopenharmony_ci * to use the density of current system dpi. 135161847f8eSopenharmony_ci * @param { _AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the obtained Base64 code of the 135261847f8eSopenharmony_ci * specified screen density image resource. 135361847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 135461847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 135561847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 135661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 135761847f8eSopenharmony_ci * @stagemodelonly 135861847f8eSopenharmony_ci * @crossplatform 135961847f8eSopenharmony_ci * @atomicservice 136061847f8eSopenharmony_ci * @since 11 136161847f8eSopenharmony_ci */ 136261847f8eSopenharmony_ci getMediaContentBase64(resource: Resource, density: number, callback: _AsyncCallback<string>): void; 136361847f8eSopenharmony_ci 136461847f8eSopenharmony_ci /** 136561847f8eSopenharmony_ci * Obtains the Base64 code of the image resource corresponding to the specified resource object in Promise mode. 136661847f8eSopenharmony_ci * 136761847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 136861847f8eSopenharmony_ci * @returns { Promise<string> } The Base64 code of the image resource corresponding to the specified resource object. 136961847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 137061847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 137161847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 137261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 137361847f8eSopenharmony_ci * @stagemodelonly 137461847f8eSopenharmony_ci * @since 9 137561847f8eSopenharmony_ci */ 137661847f8eSopenharmony_ci /** 137761847f8eSopenharmony_ci * Obtains the Base64 code of the image resource corresponding to the specified resource object in Promise mode. 137861847f8eSopenharmony_ci * 137961847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 138061847f8eSopenharmony_ci * @returns { Promise<string> } The Base64 code of the image resource corresponding to the specified resource object. 138161847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 138261847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 138361847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 138461847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 138561847f8eSopenharmony_ci * @stagemodelonly 138661847f8eSopenharmony_ci * @crossplatform 138761847f8eSopenharmony_ci * @since 10 138861847f8eSopenharmony_ci */ 138961847f8eSopenharmony_ci /** 139061847f8eSopenharmony_ci * Obtains the Base64 code of the image resource corresponding to the specified resource object in Promise mode. 139161847f8eSopenharmony_ci * 139261847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 139361847f8eSopenharmony_ci * @returns { Promise<string> } The Base64 code of the image resource corresponding to the specified resource object. 139461847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 139561847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 139661847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 139761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 139861847f8eSopenharmony_ci * @stagemodelonly 139961847f8eSopenharmony_ci * @crossplatform 140061847f8eSopenharmony_ci * @atomicservice 140161847f8eSopenharmony_ci * @since 11 140261847f8eSopenharmony_ci */ 140361847f8eSopenharmony_ci getMediaContentBase64(resource: Resource): Promise<string>; 140461847f8eSopenharmony_ci 140561847f8eSopenharmony_ci /** 140661847f8eSopenharmony_ci * Obtains the Base64 code of the specified screen density image resource corresponding to the specified resource object in Promise mode. 140761847f8eSopenharmony_ci * 140861847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 140961847f8eSopenharmony_ci * @param { number } density - The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 141061847f8eSopenharmony_ci * to use the density of current system dpi. 141161847f8eSopenharmony_ci * @returns { Promise<string> } The Base64 code of the specified screen density image resource corresponding to the specified resource object. 141261847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 141361847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 141461847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 141561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 141661847f8eSopenharmony_ci * @stagemodelonly 141761847f8eSopenharmony_ci * @since 10 141861847f8eSopenharmony_ci */ 141961847f8eSopenharmony_ci /** 142061847f8eSopenharmony_ci * Obtains the Base64 code of the specified screen density image resource corresponding to the specified resource object in Promise mode. 142161847f8eSopenharmony_ci * 142261847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 142361847f8eSopenharmony_ci * @param { number } density - The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 142461847f8eSopenharmony_ci * to use the density of current system dpi. 142561847f8eSopenharmony_ci * @returns { Promise<string> } The Base64 code of the specified screen density image resource corresponding to the specified resource object. 142661847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 142761847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 142861847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 142961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 143061847f8eSopenharmony_ci * @stagemodelonly 143161847f8eSopenharmony_ci * @crossplatform 143261847f8eSopenharmony_ci * @atomicservice 143361847f8eSopenharmony_ci * @since 11 143461847f8eSopenharmony_ci */ 143561847f8eSopenharmony_ci getMediaContentBase64(resource: Resource, density: number): Promise<string>; 143661847f8eSopenharmony_ci 143761847f8eSopenharmony_ci /** 143861847f8eSopenharmony_ci * Obtains the device capability in callback mode. 143961847f8eSopenharmony_ci * 144061847f8eSopenharmony_ci * @param { _AsyncCallback<DeviceCapability> } callback - Indicates the asynchronous callback used to return the obtained device capability. 144161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 144261847f8eSopenharmony_ci * @since 6 144361847f8eSopenharmony_ci */ 144461847f8eSopenharmony_ci /** 144561847f8eSopenharmony_ci * Obtains the device capability in callback mode. 144661847f8eSopenharmony_ci * 144761847f8eSopenharmony_ci * @param { _AsyncCallback<DeviceCapability> } callback - Indicates the asynchronous callback used to return the obtained device capability. 144861847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 144961847f8eSopenharmony_ci * @crossplatform 145061847f8eSopenharmony_ci * @since 10 145161847f8eSopenharmony_ci */ 145261847f8eSopenharmony_ci /** 145361847f8eSopenharmony_ci * Obtains the device capability in callback mode. 145461847f8eSopenharmony_ci * 145561847f8eSopenharmony_ci * @param { _AsyncCallback<DeviceCapability> } callback - Indicates the asynchronous callback used to return the obtained device capability. 145661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 145761847f8eSopenharmony_ci * @crossplatform 145861847f8eSopenharmony_ci * @atomicservice 145961847f8eSopenharmony_ci * @since 11 146061847f8eSopenharmony_ci */ 146161847f8eSopenharmony_ci getDeviceCapability(callback: _AsyncCallback<DeviceCapability>): void; 146261847f8eSopenharmony_ci 146361847f8eSopenharmony_ci /** 146461847f8eSopenharmony_ci * Obtains the device capability in Promise mode. 146561847f8eSopenharmony_ci * 146661847f8eSopenharmony_ci * @returns { Promise<DeviceCapability> } the device capability. 146761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 146861847f8eSopenharmony_ci * @since 6 146961847f8eSopenharmony_ci */ 147061847f8eSopenharmony_ci /** 147161847f8eSopenharmony_ci * Obtains the device capability in Promise mode. 147261847f8eSopenharmony_ci * 147361847f8eSopenharmony_ci * @returns { Promise<DeviceCapability> } the device capability. 147461847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 147561847f8eSopenharmony_ci * @crossplatform 147661847f8eSopenharmony_ci * @since 10 147761847f8eSopenharmony_ci */ 147861847f8eSopenharmony_ci /** 147961847f8eSopenharmony_ci * Obtains the device capability in Promise mode. 148061847f8eSopenharmony_ci * 148161847f8eSopenharmony_ci * @returns { Promise<DeviceCapability> } the device capability. 148261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 148361847f8eSopenharmony_ci * @crossplatform 148461847f8eSopenharmony_ci * @atomicservice 148561847f8eSopenharmony_ci * @since 11 148661847f8eSopenharmony_ci */ 148761847f8eSopenharmony_ci getDeviceCapability(): Promise<DeviceCapability>; 148861847f8eSopenharmony_ci 148961847f8eSopenharmony_ci /** 149061847f8eSopenharmony_ci * Obtains the device configuration in callback mode. 149161847f8eSopenharmony_ci * 149261847f8eSopenharmony_ci * @param { _AsyncCallback<Configuration> } callback - Indicates the asynchronous callback used to return the obtained device 149361847f8eSopenharmony_ci * configuration. 149461847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 149561847f8eSopenharmony_ci * @since 6 149661847f8eSopenharmony_ci */ 149761847f8eSopenharmony_ci /** 149861847f8eSopenharmony_ci * Obtains the device configuration in callback mode. 149961847f8eSopenharmony_ci * 150061847f8eSopenharmony_ci * @param { _AsyncCallback<Configuration> } callback - Indicates the asynchronous callback used to return the obtained device 150161847f8eSopenharmony_ci * configuration. 150261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 150361847f8eSopenharmony_ci * @crossplatform 150461847f8eSopenharmony_ci * @since 10 150561847f8eSopenharmony_ci */ 150661847f8eSopenharmony_ci /** 150761847f8eSopenharmony_ci * Obtains the device configuration in callback mode. 150861847f8eSopenharmony_ci * 150961847f8eSopenharmony_ci * @param { _AsyncCallback<Configuration> } callback - Indicates the asynchronous callback used to return the obtained device 151061847f8eSopenharmony_ci * configuration. 151161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 151261847f8eSopenharmony_ci * @crossplatform 151361847f8eSopenharmony_ci * @atomicservice 151461847f8eSopenharmony_ci * @since 11 151561847f8eSopenharmony_ci */ 151661847f8eSopenharmony_ci getConfiguration(callback: _AsyncCallback<Configuration>): void; 151761847f8eSopenharmony_ci 151861847f8eSopenharmony_ci /** 151961847f8eSopenharmony_ci * Obtains the device configuration in Promise mode. 152061847f8eSopenharmony_ci * 152161847f8eSopenharmony_ci * @returns { Promise<Configuration> } the device configuration. 152261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 152361847f8eSopenharmony_ci * @since 6 152461847f8eSopenharmony_ci */ 152561847f8eSopenharmony_ci /** 152661847f8eSopenharmony_ci * Obtains the device configuration in Promise mode. 152761847f8eSopenharmony_ci * 152861847f8eSopenharmony_ci * @returns { Promise<Configuration> } the device configuration. 152961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 153061847f8eSopenharmony_ci * @crossplatform 153161847f8eSopenharmony_ci * @since 10 153261847f8eSopenharmony_ci */ 153361847f8eSopenharmony_ci /** 153461847f8eSopenharmony_ci * Obtains the device configuration in Promise mode. 153561847f8eSopenharmony_ci * 153661847f8eSopenharmony_ci * @returns { Promise<Configuration> } the device configuration. 153761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 153861847f8eSopenharmony_ci * @crossplatform 153961847f8eSopenharmony_ci * @atomicservice 154061847f8eSopenharmony_ci * @since 11 154161847f8eSopenharmony_ci */ 154261847f8eSopenharmony_ci getConfiguration(): Promise<Configuration>; 154361847f8eSopenharmony_ci 154461847f8eSopenharmony_ci /** 154561847f8eSopenharmony_ci * Obtains the singular-plural character string represented by the ID string corresponding to the 154661847f8eSopenharmony_ci * specified number in callback mode. 154761847f8eSopenharmony_ci * 154861847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 154961847f8eSopenharmony_ci * @param { number } num - Indicates the number. 155061847f8eSopenharmony_ci * @param { AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the singular-plural character 155161847f8eSopenharmony_ci * string represented by the ID string corresponding to the specified number. 155261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 155361847f8eSopenharmony_ci * @since 6 155461847f8eSopenharmony_ci * @deprecated since 9 155561847f8eSopenharmony_ci * @useinstead ohos.resourceManager.getPluralStringValue 155661847f8eSopenharmony_ci */ 155761847f8eSopenharmony_ci getPluralString(resId: number, num: number, callback: AsyncCallback<string>): void; 155861847f8eSopenharmony_ci 155961847f8eSopenharmony_ci /** 156061847f8eSopenharmony_ci * Obtains the singular-plural character string represented by the ID string corresponding to 156161847f8eSopenharmony_ci * the specified number in Promise mode. 156261847f8eSopenharmony_ci * 156361847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 156461847f8eSopenharmony_ci * @param { number } num - Indicates the number. 156561847f8eSopenharmony_ci * @returns { Promise<string> } The singular-plural character string represented by the ID string 156661847f8eSopenharmony_ci * corresponding to the specified number. 156761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 156861847f8eSopenharmony_ci * @since 6 156961847f8eSopenharmony_ci * @deprecated since 9 157061847f8eSopenharmony_ci * @useinstead ohos.resourceManager.getPluralStringValue 157161847f8eSopenharmony_ci */ 157261847f8eSopenharmony_ci getPluralString(resId: number, num: number): Promise<string>; 157361847f8eSopenharmony_ci 157461847f8eSopenharmony_ci /** 157561847f8eSopenharmony_ci * Obtains the singular-plural character string represented by the resource object string corresponding to the 157661847f8eSopenharmony_ci * specified number in callback mode. 157761847f8eSopenharmony_ci * 157861847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 157961847f8eSopenharmony_ci * @param { number } num - Indicates the number. 158061847f8eSopenharmony_ci * @param { _AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the singular-plural character 158161847f8eSopenharmony_ci * string represented by the resource object string corresponding to the specified number. 158261847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 158361847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 158461847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 158561847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 158661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 158761847f8eSopenharmony_ci * @stagemodelonly 158861847f8eSopenharmony_ci * @since 9 158961847f8eSopenharmony_ci */ 159061847f8eSopenharmony_ci /** 159161847f8eSopenharmony_ci * Obtains the singular-plural character string represented by the resource object string corresponding to the 159261847f8eSopenharmony_ci * specified number in callback mode. 159361847f8eSopenharmony_ci * 159461847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 159561847f8eSopenharmony_ci * @param { number } num - Indicates the number. 159661847f8eSopenharmony_ci * @param { _AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the singular-plural character 159761847f8eSopenharmony_ci * string represented by the resource object string corresponding to the specified number. 159861847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 159961847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 160061847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 160161847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 160261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 160361847f8eSopenharmony_ci * @stagemodelonly 160461847f8eSopenharmony_ci * @crossplatform 160561847f8eSopenharmony_ci * @since 10 160661847f8eSopenharmony_ci */ 160761847f8eSopenharmony_ci /** 160861847f8eSopenharmony_ci * Obtains the singular-plural character string represented by the resource object string corresponding to the 160961847f8eSopenharmony_ci * specified number in callback mode. 161061847f8eSopenharmony_ci * 161161847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 161261847f8eSopenharmony_ci * @param { number } num - Indicates the number. 161361847f8eSopenharmony_ci * @param { _AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the singular-plural character 161461847f8eSopenharmony_ci * string represented by the resource object string corresponding to the specified number. 161561847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 161661847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 161761847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 161861847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 161961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 162061847f8eSopenharmony_ci * @stagemodelonly 162161847f8eSopenharmony_ci * @crossplatform 162261847f8eSopenharmony_ci * @atomicservice 162361847f8eSopenharmony_ci * @since 11 162461847f8eSopenharmony_ci */ 162561847f8eSopenharmony_ci getPluralStringValue(resource: Resource, num: number, callback: _AsyncCallback<string>): void; 162661847f8eSopenharmony_ci 162761847f8eSopenharmony_ci /** 162861847f8eSopenharmony_ci * Obtains the singular-plural character string represented by the resource object string corresponding to 162961847f8eSopenharmony_ci * the specified number in Promise mode. 163061847f8eSopenharmony_ci * 163161847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 163261847f8eSopenharmony_ci * @param { number } num - Indicates the number. 163361847f8eSopenharmony_ci * @returns { Promise<string> } The singular-plural character string represented by the resource object string 163461847f8eSopenharmony_ci * corresponding to the specified number. 163561847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 163661847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 163761847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 163861847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 163961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 164061847f8eSopenharmony_ci * @stagemodelonly 164161847f8eSopenharmony_ci * @since 9 164261847f8eSopenharmony_ci */ 164361847f8eSopenharmony_ci /** 164461847f8eSopenharmony_ci * Obtains the singular-plural character string represented by the resource object string corresponding to 164561847f8eSopenharmony_ci * the specified number in Promise mode. 164661847f8eSopenharmony_ci * 164761847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 164861847f8eSopenharmony_ci * @param { number } num - Indicates the number. 164961847f8eSopenharmony_ci * @returns { Promise<string> } The singular-plural character string represented by the resource object string 165061847f8eSopenharmony_ci * corresponding to the specified number. 165161847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 165261847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 165361847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 165461847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 165561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 165661847f8eSopenharmony_ci * @stagemodelonly 165761847f8eSopenharmony_ci * @crossplatform 165861847f8eSopenharmony_ci * @since 10 165961847f8eSopenharmony_ci */ 166061847f8eSopenharmony_ci /** 166161847f8eSopenharmony_ci * Obtains the singular-plural character string represented by the resource object string corresponding to 166261847f8eSopenharmony_ci * the specified number in Promise mode. 166361847f8eSopenharmony_ci * 166461847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 166561847f8eSopenharmony_ci * @param { number } num - Indicates the number. 166661847f8eSopenharmony_ci * @returns { Promise<string> } The singular-plural character string represented by the resource object string 166761847f8eSopenharmony_ci * corresponding to the specified number. 166861847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 166961847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 167061847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 167161847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 167261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 167361847f8eSopenharmony_ci * @stagemodelonly 167461847f8eSopenharmony_ci * @crossplatform 167561847f8eSopenharmony_ci * @atomicservice 167661847f8eSopenharmony_ci * @since 11 167761847f8eSopenharmony_ci */ 167861847f8eSopenharmony_ci getPluralStringValue(resource: Resource, num: number): Promise<string>; 167961847f8eSopenharmony_ci 168061847f8eSopenharmony_ci /** 168161847f8eSopenharmony_ci * Obtains the raw file resource corresponding to the specified resource path in callback mode. 168261847f8eSopenharmony_ci * 168361847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 168461847f8eSopenharmony_ci * @param { AsyncCallback<Uint8Array> } callback - Indicates the asynchronous callback used to return the raw file resource. 168561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 168661847f8eSopenharmony_ci * @since 8 168761847f8eSopenharmony_ci * @deprecated since 9 168861847f8eSopenharmony_ci * @useinstead ohos.resourceManager.getRawFileContent 168961847f8eSopenharmony_ci */ 169061847f8eSopenharmony_ci getRawFile(path: string, callback: AsyncCallback<Uint8Array>): void; 169161847f8eSopenharmony_ci 169261847f8eSopenharmony_ci /** 169361847f8eSopenharmony_ci * Obtains the raw file resource corresponding to the specified resource path in Promise mode. 169461847f8eSopenharmony_ci * 169561847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 169661847f8eSopenharmony_ci * @returns { Promise<Uint8Array> } The raw file resource corresponding to the specified resource path. 169761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 169861847f8eSopenharmony_ci * @since 8 169961847f8eSopenharmony_ci * @deprecated since 9 170061847f8eSopenharmony_ci * @useinstead ohos.resourceManager.getRawFileContent 170161847f8eSopenharmony_ci */ 170261847f8eSopenharmony_ci getRawFile(path: string): Promise<Uint8Array>; 170361847f8eSopenharmony_ci 170461847f8eSopenharmony_ci /** 170561847f8eSopenharmony_ci * Obtains the raw file resource descriptor corresponding to the specified resource path in callback mode. 170661847f8eSopenharmony_ci * 170761847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 170861847f8eSopenharmony_ci * @param { AsyncCallback<RawFileDescriptor> } callback - Indicates the asynchronous callback used to return the raw file resource descriptor. 170961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 171061847f8eSopenharmony_ci * @since 8 171161847f8eSopenharmony_ci * @deprecated since 9 171261847f8eSopenharmony_ci * @useinstead ohos.resourceManager.getRawFd 171361847f8eSopenharmony_ci */ 171461847f8eSopenharmony_ci getRawFileDescriptor(path: string, callback: AsyncCallback<RawFileDescriptor>): void; 171561847f8eSopenharmony_ci 171661847f8eSopenharmony_ci /** 171761847f8eSopenharmony_ci * Obtains the raw file resource descriptor corresponding to the specified resource path in Promise mode. 171861847f8eSopenharmony_ci * 171961847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 172061847f8eSopenharmony_ci * @returns { Promise<RawFileDescriptor> } The raw file resource descriptor corresponding to the specified resource path. 172161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 172261847f8eSopenharmony_ci * @since 8 172361847f8eSopenharmony_ci * @deprecated since 9 172461847f8eSopenharmony_ci * @useinstead ohos.resourceManager.getRawFd 172561847f8eSopenharmony_ci */ 172661847f8eSopenharmony_ci getRawFileDescriptor(path: string): Promise<RawFileDescriptor>; 172761847f8eSopenharmony_ci 172861847f8eSopenharmony_ci /** 172961847f8eSopenharmony_ci * Obtains close raw file resource descriptor corresponding to the specified resource path in callback mode. 173061847f8eSopenharmony_ci * 173161847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 173261847f8eSopenharmony_ci * @param { AsyncCallback<void> } callback - Indicates the asynchronous callback used to return result close raw file resource descriptor. 173361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 173461847f8eSopenharmony_ci * @since 8 173561847f8eSopenharmony_ci * @deprecated since 9 173661847f8eSopenharmony_ci * @useinstead ohos.resourceManager.closeRawFd 173761847f8eSopenharmony_ci */ 173861847f8eSopenharmony_ci closeRawFileDescriptor(path: string, callback: AsyncCallback<void>): void; 173961847f8eSopenharmony_ci 174061847f8eSopenharmony_ci /** 174161847f8eSopenharmony_ci * Obtains close raw file resource descriptor corresponding to the specified resource path in Promise mode. 174261847f8eSopenharmony_ci * 174361847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 174461847f8eSopenharmony_ci * @returns { Promise<void> } The result close raw file resource descriptor corresponding to the specified resource path. 174561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 174661847f8eSopenharmony_ci * @since 8 174761847f8eSopenharmony_ci * @deprecated since 9 174861847f8eSopenharmony_ci * @useinstead ohos.resourceManager.closeRawFd 174961847f8eSopenharmony_ci */ 175061847f8eSopenharmony_ci closeRawFileDescriptor(path: string): Promise<void>; 175161847f8eSopenharmony_ci 175261847f8eSopenharmony_ci /** 175361847f8eSopenharmony_ci * Obtains the character string corresponding to a specified resource name in callback mode. 175461847f8eSopenharmony_ci * 175561847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 175661847f8eSopenharmony_ci * @param { _AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the obtained character string. 175761847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 175861847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 175961847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 176061847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 176161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 176261847f8eSopenharmony_ci * @since 9 176361847f8eSopenharmony_ci */ 176461847f8eSopenharmony_ci /** 176561847f8eSopenharmony_ci * Obtains the character string corresponding to a specified resource name in callback mode. 176661847f8eSopenharmony_ci * 176761847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 176861847f8eSopenharmony_ci * @param { _AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the obtained character string. 176961847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 177061847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 177161847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 177261847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 177361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 177461847f8eSopenharmony_ci * @crossplatform 177561847f8eSopenharmony_ci * @since 10 177661847f8eSopenharmony_ci */ 177761847f8eSopenharmony_ci /** 177861847f8eSopenharmony_ci * Obtains the character string corresponding to a specified resource name in callback mode. 177961847f8eSopenharmony_ci * 178061847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 178161847f8eSopenharmony_ci * @param { _AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the obtained character string. 178261847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 178361847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 178461847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 178561847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 178661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 178761847f8eSopenharmony_ci * @crossplatform 178861847f8eSopenharmony_ci * @atomicservice 178961847f8eSopenharmony_ci * @since 11 179061847f8eSopenharmony_ci */ 179161847f8eSopenharmony_ci getStringByName(resName: string, callback: _AsyncCallback<string>): void; 179261847f8eSopenharmony_ci 179361847f8eSopenharmony_ci /** 179461847f8eSopenharmony_ci * Obtains string resources associated with a specified resource name in Promise mode. 179561847f8eSopenharmony_ci * 179661847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 179761847f8eSopenharmony_ci * @returns { Promise<string> } The character string corresponding to the resource name. 179861847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 179961847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 180061847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 180161847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 180261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 180361847f8eSopenharmony_ci * @since 9 180461847f8eSopenharmony_ci */ 180561847f8eSopenharmony_ci /** 180661847f8eSopenharmony_ci * Obtains string resources associated with a specified resource name in Promise mode. 180761847f8eSopenharmony_ci * 180861847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 180961847f8eSopenharmony_ci * @returns { Promise<string> } The character string corresponding to the resource name. 181061847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 181161847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 181261847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 181361847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 181461847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 181561847f8eSopenharmony_ci * @crossplatform 181661847f8eSopenharmony_ci * @since 10 181761847f8eSopenharmony_ci */ 181861847f8eSopenharmony_ci /** 181961847f8eSopenharmony_ci * Obtains string resources associated with a specified resource name in Promise mode. 182061847f8eSopenharmony_ci * 182161847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 182261847f8eSopenharmony_ci * @returns { Promise<string> } The character string corresponding to the resource name. 182361847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 182461847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 182561847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 182661847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 182761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 182861847f8eSopenharmony_ci * @crossplatform 182961847f8eSopenharmony_ci * @atomicservice 183061847f8eSopenharmony_ci * @since 11 183161847f8eSopenharmony_ci */ 183261847f8eSopenharmony_ci getStringByName(resName: string): Promise<string>; 183361847f8eSopenharmony_ci 183461847f8eSopenharmony_ci /** 183561847f8eSopenharmony_ci * Obtains the array of character strings corresponding to a specified resource name in callback mode. 183661847f8eSopenharmony_ci * 183761847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 183861847f8eSopenharmony_ci * @param { _AsyncCallback<Array<string>> } callback - Indicates the asynchronous callback used to return the obtained array of character strings. 183961847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 184061847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 184161847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 184261847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 184361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 184461847f8eSopenharmony_ci * @since 9 184561847f8eSopenharmony_ci */ 184661847f8eSopenharmony_ci /** 184761847f8eSopenharmony_ci * Obtains the array of character strings corresponding to a specified resource name in callback mode. 184861847f8eSopenharmony_ci * 184961847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 185061847f8eSopenharmony_ci * @param { _AsyncCallback<Array<string>> } callback - Indicates the asynchronous callback used to return the obtained array of character strings. 185161847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 185261847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 185361847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 185461847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 185561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 185661847f8eSopenharmony_ci * @crossplatform 185761847f8eSopenharmony_ci * @since 10 185861847f8eSopenharmony_ci */ 185961847f8eSopenharmony_ci /** 186061847f8eSopenharmony_ci * Obtains the array of character strings corresponding to a specified resource name in callback mode. 186161847f8eSopenharmony_ci * 186261847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 186361847f8eSopenharmony_ci * @param { _AsyncCallback<Array<string>> } callback - Indicates the asynchronous callback used to return the obtained array of character strings. 186461847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 186561847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 186661847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 186761847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 186861847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 186961847f8eSopenharmony_ci * @crossplatform 187061847f8eSopenharmony_ci * @atomicservice 187161847f8eSopenharmony_ci * @since 11 187261847f8eSopenharmony_ci */ 187361847f8eSopenharmony_ci getStringArrayByName(resName: string, callback: _AsyncCallback<Array<string>>): void; 187461847f8eSopenharmony_ci 187561847f8eSopenharmony_ci /** 187661847f8eSopenharmony_ci * Obtains the array of character strings corresponding to a specified resource name in Promise mode. 187761847f8eSopenharmony_ci * 187861847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 187961847f8eSopenharmony_ci * @returns { Promise<Array<string>> } the array of character strings corresponding to the specified resource name. 188061847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 188161847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 188261847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 188361847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 188461847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 188561847f8eSopenharmony_ci * @since 9 188661847f8eSopenharmony_ci */ 188761847f8eSopenharmony_ci /** 188861847f8eSopenharmony_ci * Obtains the array of character strings corresponding to a specified resource name in Promise mode. 188961847f8eSopenharmony_ci * 189061847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 189161847f8eSopenharmony_ci * @returns { Promise<Array<string>> } the array of character strings corresponding to the specified resource name. 189261847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 189361847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 189461847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 189561847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 189661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 189761847f8eSopenharmony_ci * @crossplatform 189861847f8eSopenharmony_ci * @since 10 189961847f8eSopenharmony_ci */ 190061847f8eSopenharmony_ci /** 190161847f8eSopenharmony_ci * Obtains the array of character strings corresponding to a specified resource name in Promise mode. 190261847f8eSopenharmony_ci * 190361847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 190461847f8eSopenharmony_ci * @returns { Promise<Array<string>> } the array of character strings corresponding to the specified resource name. 190561847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 190661847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 190761847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 190861847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 190961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 191061847f8eSopenharmony_ci * @crossplatform 191161847f8eSopenharmony_ci * @atomicservice 191261847f8eSopenharmony_ci * @since 11 191361847f8eSopenharmony_ci */ 191461847f8eSopenharmony_ci getStringArrayByName(resName: string): Promise<Array<string>>; 191561847f8eSopenharmony_ci 191661847f8eSopenharmony_ci /** 191761847f8eSopenharmony_ci * Obtains the content of the media file corresponding to a specified resource name in callback mode. 191861847f8eSopenharmony_ci * 191961847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 192061847f8eSopenharmony_ci * @param { _AsyncCallback<Uint8Array> } callback - Indicates the asynchronous callback used to return the obtained media file content. 192161847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 192261847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 192361847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 192461847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 192561847f8eSopenharmony_ci * @since 9 192661847f8eSopenharmony_ci */ 192761847f8eSopenharmony_ci /** 192861847f8eSopenharmony_ci * Obtains the content of the media file corresponding to a specified resource name in callback mode. 192961847f8eSopenharmony_ci * 193061847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 193161847f8eSopenharmony_ci * @param { _AsyncCallback<Uint8Array> } callback - Indicates the asynchronous callback used to return the obtained media file content. 193261847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 193361847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 193461847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 193561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 193661847f8eSopenharmony_ci * @crossplatform 193761847f8eSopenharmony_ci * @since 10 193861847f8eSopenharmony_ci */ 193961847f8eSopenharmony_ci /** 194061847f8eSopenharmony_ci * Obtains the content of the media file corresponding to a specified resource name in callback mode. 194161847f8eSopenharmony_ci * 194261847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 194361847f8eSopenharmony_ci * @param { _AsyncCallback<Uint8Array> } callback - Indicates the asynchronous callback used to return the obtained media file content. 194461847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 194561847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 194661847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 194761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 194861847f8eSopenharmony_ci * @crossplatform 194961847f8eSopenharmony_ci * @atomicservice 195061847f8eSopenharmony_ci * @since 11 195161847f8eSopenharmony_ci */ 195261847f8eSopenharmony_ci getMediaByName(resName: string, callback: _AsyncCallback<Uint8Array>): void; 195361847f8eSopenharmony_ci 195461847f8eSopenharmony_ci /** 195561847f8eSopenharmony_ci * Obtains the content of the specified screen density media file corresponding to a specified resource name in callback mode. 195661847f8eSopenharmony_ci * 195761847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 195861847f8eSopenharmony_ci * @param { number } density - The parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 195961847f8eSopenharmony_ci * to use the density of current system dpi. 196061847f8eSopenharmony_ci * @param { _AsyncCallback<Uint8Array> } callback - Indicates the asynchronous callback used to return the obtained 196161847f8eSopenharmony_ci * specified screen density media file content. 196261847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 196361847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 196461847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 196561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 196661847f8eSopenharmony_ci * @since 10 196761847f8eSopenharmony_ci */ 196861847f8eSopenharmony_ci /** 196961847f8eSopenharmony_ci * Obtains the content of the specified screen density media file corresponding to a specified resource name in callback mode. 197061847f8eSopenharmony_ci * 197161847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 197261847f8eSopenharmony_ci * @param { number } density - The parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 197361847f8eSopenharmony_ci * to use the density of current system dpi. 197461847f8eSopenharmony_ci * @param { _AsyncCallback<Uint8Array> } callback - Indicates the asynchronous callback used to return the obtained 197561847f8eSopenharmony_ci * specified screen density media file content. 197661847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 197761847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 197861847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 197961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 198061847f8eSopenharmony_ci * @crossplatform 198161847f8eSopenharmony_ci * @atomicservice 198261847f8eSopenharmony_ci * @since 11 198361847f8eSopenharmony_ci */ 198461847f8eSopenharmony_ci getMediaByName(resName: string, density: number, callback: _AsyncCallback<Uint8Array>): void; 198561847f8eSopenharmony_ci 198661847f8eSopenharmony_ci /** 198761847f8eSopenharmony_ci * Obtains the content of the media file corresponding to a specified resource name in Promise mode. 198861847f8eSopenharmony_ci * 198961847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 199061847f8eSopenharmony_ci * @returns { Promise<Uint8Array> } The content of the media file corresponding to the specified resource name. 199161847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 199261847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 199361847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 199461847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 199561847f8eSopenharmony_ci * @since 9 199661847f8eSopenharmony_ci */ 199761847f8eSopenharmony_ci /** 199861847f8eSopenharmony_ci * Obtains the content of the media file corresponding to a specified resource name in Promise mode. 199961847f8eSopenharmony_ci * 200061847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 200161847f8eSopenharmony_ci * @returns { Promise<Uint8Array> } The content of the media file corresponding to the specified resource name. 200261847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 200361847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 200461847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 200561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 200661847f8eSopenharmony_ci * @crossplatform 200761847f8eSopenharmony_ci * @since 10 200861847f8eSopenharmony_ci */ 200961847f8eSopenharmony_ci /** 201061847f8eSopenharmony_ci * Obtains the content of the media file corresponding to a specified resource name in Promise mode. 201161847f8eSopenharmony_ci * 201261847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 201361847f8eSopenharmony_ci * @returns { Promise<Uint8Array> } The content of the media file corresponding to the specified resource name. 201461847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 201561847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 201661847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 201761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 201861847f8eSopenharmony_ci * @crossplatform 201961847f8eSopenharmony_ci * @atomicservice 202061847f8eSopenharmony_ci * @since 11 202161847f8eSopenharmony_ci */ 202261847f8eSopenharmony_ci getMediaByName(resName: string): Promise<Uint8Array>; 202361847f8eSopenharmony_ci 202461847f8eSopenharmony_ci /** 202561847f8eSopenharmony_ci * Obtains the content of the specified screen density media file corresponding to a specified resource name in Promise mode. 202661847f8eSopenharmony_ci * 202761847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 202861847f8eSopenharmony_ci * @param { number } density - The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 202961847f8eSopenharmony_ci * to use the density of current system dpi. 203061847f8eSopenharmony_ci * @returns { Promise<Uint8Array> } The content of the specified screen density media file corresponding to the 203161847f8eSopenharmony_ci * specified resource name. 203261847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 203361847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 203461847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 203561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 203661847f8eSopenharmony_ci * @since 10 203761847f8eSopenharmony_ci */ 203861847f8eSopenharmony_ci /** 203961847f8eSopenharmony_ci * Obtains the content of the specified screen density media file corresponding to a specified resource name in Promise mode. 204061847f8eSopenharmony_ci * 204161847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 204261847f8eSopenharmony_ci * @param { number } density - The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 204361847f8eSopenharmony_ci * to use the density of current system dpi. 204461847f8eSopenharmony_ci * @returns { Promise<Uint8Array> } The content of the specified screen density media file corresponding to the 204561847f8eSopenharmony_ci * specified resource name. 204661847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 204761847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 204861847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 204961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 205061847f8eSopenharmony_ci * @crossplatform 205161847f8eSopenharmony_ci * @atomicservice 205261847f8eSopenharmony_ci * @since 11 205361847f8eSopenharmony_ci */ 205461847f8eSopenharmony_ci getMediaByName(resName: string, density: number): Promise<Uint8Array>; 205561847f8eSopenharmony_ci 205661847f8eSopenharmony_ci /** 205761847f8eSopenharmony_ci * Obtains the Base64 code of the image resource corresponding to the specified resource name in callback mode. 205861847f8eSopenharmony_ci * 205961847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 206061847f8eSopenharmony_ci * @param { _AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the obtained Base64 code of the image 206161847f8eSopenharmony_ci * resource. 206261847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 206361847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 206461847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 206561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 206661847f8eSopenharmony_ci * @since 9 206761847f8eSopenharmony_ci */ 206861847f8eSopenharmony_ci /** 206961847f8eSopenharmony_ci * Obtains the Base64 code of the image resource corresponding to the specified resource name in callback mode. 207061847f8eSopenharmony_ci * 207161847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 207261847f8eSopenharmony_ci * @param { _AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the obtained Base64 code of the image 207361847f8eSopenharmony_ci * resource. 207461847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 207561847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 207661847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 207761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 207861847f8eSopenharmony_ci * @crossplatform 207961847f8eSopenharmony_ci * @since 10 208061847f8eSopenharmony_ci */ 208161847f8eSopenharmony_ci /** 208261847f8eSopenharmony_ci * Obtains the Base64 code of the image resource corresponding to the specified resource name in callback mode. 208361847f8eSopenharmony_ci * 208461847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 208561847f8eSopenharmony_ci * @param { _AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the obtained Base64 code of the image 208661847f8eSopenharmony_ci * resource. 208761847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 208861847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 208961847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 209061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 209161847f8eSopenharmony_ci * @crossplatform 209261847f8eSopenharmony_ci * @atomicservice 209361847f8eSopenharmony_ci * @since 11 209461847f8eSopenharmony_ci */ 209561847f8eSopenharmony_ci getMediaBase64ByName(resName: string, callback: _AsyncCallback<string>): void; 209661847f8eSopenharmony_ci 209761847f8eSopenharmony_ci /** 209861847f8eSopenharmony_ci * Obtains the Base64 code of the specified screen density image resource corresponding to the specified resource name in callback mode. 209961847f8eSopenharmony_ci * 210061847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 210161847f8eSopenharmony_ci * @param { number } density - The parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 210261847f8eSopenharmony_ci * to use the density of current system dpi. 210361847f8eSopenharmony_ci * @param { _AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the obtained Base64 code of the 210461847f8eSopenharmony_ci * specified screen density image resource. 210561847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 210661847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 210761847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 210861847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 210961847f8eSopenharmony_ci * @since 10 211061847f8eSopenharmony_ci */ 211161847f8eSopenharmony_ci /** 211261847f8eSopenharmony_ci * Obtains the Base64 code of the specified screen density image resource corresponding to the specified resource name in callback mode. 211361847f8eSopenharmony_ci * 211461847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 211561847f8eSopenharmony_ci * @param { number } density - The parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 211661847f8eSopenharmony_ci * to use the density of current system dpi. 211761847f8eSopenharmony_ci * @param { _AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the obtained Base64 code of the 211861847f8eSopenharmony_ci * specified screen density image resource. 211961847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 212061847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 212161847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 212261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 212361847f8eSopenharmony_ci * @crossplatform 212461847f8eSopenharmony_ci * @atomicservice 212561847f8eSopenharmony_ci * @since 11 212661847f8eSopenharmony_ci */ 212761847f8eSopenharmony_ci getMediaBase64ByName(resName: string, density: number, callback: _AsyncCallback<string>): void; 212861847f8eSopenharmony_ci 212961847f8eSopenharmony_ci /** 213061847f8eSopenharmony_ci * Obtains the Base64 code of the image resource corresponding to the specified resource name in Promise mode. 213161847f8eSopenharmony_ci * 213261847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 213361847f8eSopenharmony_ci * @returns { Promise<string> } The Base64 code of the image resource corresponding to the specified resource name. 213461847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 213561847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 213661847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 213761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 213861847f8eSopenharmony_ci * @since 9 213961847f8eSopenharmony_ci */ 214061847f8eSopenharmony_ci /** 214161847f8eSopenharmony_ci * Obtains the Base64 code of the image resource corresponding to the specified resource name in Promise mode. 214261847f8eSopenharmony_ci * 214361847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 214461847f8eSopenharmony_ci * @returns { Promise<string> } The Base64 code of the image resource corresponding to the specified resource name. 214561847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 214661847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 214761847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 214861847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 214961847f8eSopenharmony_ci * @crossplatform 215061847f8eSopenharmony_ci * @since 10 215161847f8eSopenharmony_ci */ 215261847f8eSopenharmony_ci /** 215361847f8eSopenharmony_ci * Obtains the Base64 code of the image resource corresponding to the specified resource name in Promise mode. 215461847f8eSopenharmony_ci * 215561847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 215661847f8eSopenharmony_ci * @returns { Promise<string> } The Base64 code of the image resource corresponding to the specified resource name. 215761847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 215861847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 215961847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 216061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 216161847f8eSopenharmony_ci * @crossplatform 216261847f8eSopenharmony_ci * @atomicservice 216361847f8eSopenharmony_ci * @since 11 216461847f8eSopenharmony_ci */ 216561847f8eSopenharmony_ci getMediaBase64ByName(resName: string): Promise<string>; 216661847f8eSopenharmony_ci 216761847f8eSopenharmony_ci /** 216861847f8eSopenharmony_ci * Obtains the Base64 code of the specified screen density image resource corresponding to the specified resource name in Promise mode. 216961847f8eSopenharmony_ci * 217061847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 217161847f8eSopenharmony_ci * @param { number } density - The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 217261847f8eSopenharmony_ci * to use the density of current system dpi. 217361847f8eSopenharmony_ci * @returns { Promise<string> } The Base64 code of the specified screen density image resource corresponding to the specified resource name. 217461847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 217561847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 217661847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 217761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 217861847f8eSopenharmony_ci * @since 10 217961847f8eSopenharmony_ci */ 218061847f8eSopenharmony_ci /** 218161847f8eSopenharmony_ci * Obtains the Base64 code of the specified screen density image resource corresponding to the specified resource name in Promise mode. 218261847f8eSopenharmony_ci * 218361847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 218461847f8eSopenharmony_ci * @param { number } density - The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 218561847f8eSopenharmony_ci * to use the density of current system dpi. 218661847f8eSopenharmony_ci * @returns { Promise<string> } The Base64 code of the specified screen density image resource corresponding to the specified resource name. 218761847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 218861847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 218961847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 219061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 219161847f8eSopenharmony_ci * @crossplatform 219261847f8eSopenharmony_ci * @atomicservice 219361847f8eSopenharmony_ci * @since 11 219461847f8eSopenharmony_ci */ 219561847f8eSopenharmony_ci getMediaBase64ByName(resName: string, density: number): Promise<string>; 219661847f8eSopenharmony_ci 219761847f8eSopenharmony_ci /** 219861847f8eSopenharmony_ci * Obtains the singular-plural character string represented by the name string corresponding to the 219961847f8eSopenharmony_ci * specified number in callback mode. 220061847f8eSopenharmony_ci * 220161847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 220261847f8eSopenharmony_ci * @param { number } num - Indicates the number. 220361847f8eSopenharmony_ci * @param { _AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the singular-plural character 220461847f8eSopenharmony_ci * string represented by the name string corresponding to the specified number. 220561847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 220661847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 220761847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 220861847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 220961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 221061847f8eSopenharmony_ci * @since 9 221161847f8eSopenharmony_ci */ 221261847f8eSopenharmony_ci /** 221361847f8eSopenharmony_ci * Obtains the singular-plural character string represented by the name string corresponding to the 221461847f8eSopenharmony_ci * specified number in callback mode. 221561847f8eSopenharmony_ci * 221661847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 221761847f8eSopenharmony_ci * @param { number } num - Indicates the number. 221861847f8eSopenharmony_ci * @param { _AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the singular-plural character 221961847f8eSopenharmony_ci * string represented by the name string corresponding to the specified number. 222061847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 222161847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 222261847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 222361847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 222461847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 222561847f8eSopenharmony_ci * @crossplatform 222661847f8eSopenharmony_ci * @since 10 222761847f8eSopenharmony_ci */ 222861847f8eSopenharmony_ci /** 222961847f8eSopenharmony_ci * Obtains the singular-plural character string represented by the name string corresponding to the 223061847f8eSopenharmony_ci * specified number in callback mode. 223161847f8eSopenharmony_ci * 223261847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 223361847f8eSopenharmony_ci * @param { number } num - Indicates the number. 223461847f8eSopenharmony_ci * @param { _AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the singular-plural character 223561847f8eSopenharmony_ci * string represented by the name string corresponding to the specified number. 223661847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 223761847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 223861847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 223961847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 224061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 224161847f8eSopenharmony_ci * @crossplatform 224261847f8eSopenharmony_ci * @atomicservice 224361847f8eSopenharmony_ci * @since 11 224461847f8eSopenharmony_ci */ 224561847f8eSopenharmony_ci getPluralStringByName(resName: string, num: number, callback: _AsyncCallback<string>): void; 224661847f8eSopenharmony_ci 224761847f8eSopenharmony_ci /** 224861847f8eSopenharmony_ci * Obtains the singular-plural character string represented by the name string corresponding to 224961847f8eSopenharmony_ci * the specified number in Promise mode. 225061847f8eSopenharmony_ci * 225161847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 225261847f8eSopenharmony_ci * @param { number } num - Indicates the number. 225361847f8eSopenharmony_ci * @returns { Promise<string> } the singular-plural character string represented by the name string 225461847f8eSopenharmony_ci * corresponding to the specified number. 225561847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 225661847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 225761847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 225861847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 225961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 226061847f8eSopenharmony_ci * @since 9 226161847f8eSopenharmony_ci */ 226261847f8eSopenharmony_ci /** 226361847f8eSopenharmony_ci * Obtains the singular-plural character string represented by the name string corresponding to 226461847f8eSopenharmony_ci * the specified number in Promise mode. 226561847f8eSopenharmony_ci * 226661847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 226761847f8eSopenharmony_ci * @param { number } num - Indicates the number. 226861847f8eSopenharmony_ci * @returns { Promise<string> } the singular-plural character string represented by the name string 226961847f8eSopenharmony_ci * corresponding to the specified number. 227061847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 227161847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 227261847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 227361847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 227461847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 227561847f8eSopenharmony_ci * @crossplatform 227661847f8eSopenharmony_ci * @since 10 227761847f8eSopenharmony_ci */ 227861847f8eSopenharmony_ci /** 227961847f8eSopenharmony_ci * Obtains the singular-plural character string represented by the name string corresponding to 228061847f8eSopenharmony_ci * the specified number in Promise mode. 228161847f8eSopenharmony_ci * 228261847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 228361847f8eSopenharmony_ci * @param { number } num - Indicates the number. 228461847f8eSopenharmony_ci * @returns { Promise<string> } the singular-plural character string represented by the name string 228561847f8eSopenharmony_ci * corresponding to the specified number. 228661847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 228761847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 228861847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 228961847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 229061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 229161847f8eSopenharmony_ci * @crossplatform 229261847f8eSopenharmony_ci * @atomicservice 229361847f8eSopenharmony_ci * @since 11 229461847f8eSopenharmony_ci */ 229561847f8eSopenharmony_ci getPluralStringByName(resName: string, num: number): Promise<string>; 229661847f8eSopenharmony_ci 229761847f8eSopenharmony_ci /** 229861847f8eSopenharmony_ci * Obtains string resources associated with a specified resource ID. 229961847f8eSopenharmony_ci * 230061847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 230161847f8eSopenharmony_ci * @returns { string } The character string corresponding to the resource ID. 230261847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 230361847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 230461847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 230561847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 230661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 230761847f8eSopenharmony_ci * @since 9 230861847f8eSopenharmony_ci */ 230961847f8eSopenharmony_ci /** 231061847f8eSopenharmony_ci * Obtains string resources associated with a specified resource ID. 231161847f8eSopenharmony_ci * 231261847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 231361847f8eSopenharmony_ci * @returns { string } The character string corresponding to the resource ID. 231461847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 231561847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 231661847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 231761847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 231861847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 231961847f8eSopenharmony_ci * @crossplatform 232061847f8eSopenharmony_ci * @since 10 232161847f8eSopenharmony_ci */ 232261847f8eSopenharmony_ci /** 232361847f8eSopenharmony_ci * Obtains string resources associated with a specified resource ID. 232461847f8eSopenharmony_ci * 232561847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 232661847f8eSopenharmony_ci * @returns { string } The character string corresponding to the resource ID. 232761847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 232861847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 232961847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 233061847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 233161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 233261847f8eSopenharmony_ci * @crossplatform 233361847f8eSopenharmony_ci * @atomicservice 233461847f8eSopenharmony_ci * @since 11 233561847f8eSopenharmony_ci */ 233661847f8eSopenharmony_ci getStringSync(resId: number): string; 233761847f8eSopenharmony_ci 233861847f8eSopenharmony_ci /** 233961847f8eSopenharmony_ci * Obtains string resources associated with a specified resource ID. 234061847f8eSopenharmony_ci * 234161847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 234261847f8eSopenharmony_ci * @param { Array<string | number> } args - Indicates the formatting string resource parameters. 234361847f8eSopenharmony_ci * @returns { string } The character string corresponding to the resource ID. 234461847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 234561847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 234661847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 234761847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 234861847f8eSopenharmony_ci * @throws { BusinessError } 9001007 - Failed to format the resource obtained based on the resource ID. 234961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 235061847f8eSopenharmony_ci * @crossplatform 235161847f8eSopenharmony_ci * @since 10 235261847f8eSopenharmony_ci */ 235361847f8eSopenharmony_ci /** 235461847f8eSopenharmony_ci * Obtains string resources associated with a specified resource ID. 235561847f8eSopenharmony_ci * 235661847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 235761847f8eSopenharmony_ci * @param { Array<string | number> } args - Indicates the formatting string resource parameters. 235861847f8eSopenharmony_ci * @returns { string } The character string corresponding to the resource ID. 235961847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 236061847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 236161847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 236261847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 236361847f8eSopenharmony_ci * @throws { BusinessError } 9001007 - Failed to format the resource obtained based on the resource ID. 236461847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 236561847f8eSopenharmony_ci * @crossplatform 236661847f8eSopenharmony_ci * @atomicservice 236761847f8eSopenharmony_ci * @since 11 236861847f8eSopenharmony_ci */ 236961847f8eSopenharmony_ci getStringSync(resId: number, ...args: Array<string | number>): string; 237061847f8eSopenharmony_ci 237161847f8eSopenharmony_ci /** 237261847f8eSopenharmony_ci * Obtains string resources associated with a specified resource object. 237361847f8eSopenharmony_ci * 237461847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 237561847f8eSopenharmony_ci * @returns { string } The character string corresponding to the resource object. 237661847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 237761847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 237861847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 237961847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 238061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 238161847f8eSopenharmony_ci * @stagemodelonly 238261847f8eSopenharmony_ci * @since 9 238361847f8eSopenharmony_ci */ 238461847f8eSopenharmony_ci /** 238561847f8eSopenharmony_ci * Obtains string resources associated with a specified resource object. 238661847f8eSopenharmony_ci * 238761847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 238861847f8eSopenharmony_ci * @returns { string } The character string corresponding to the resource object. 238961847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 239061847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 239161847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 239261847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 239361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 239461847f8eSopenharmony_ci * @stagemodelonly 239561847f8eSopenharmony_ci * @crossplatform 239661847f8eSopenharmony_ci * @since 10 239761847f8eSopenharmony_ci */ 239861847f8eSopenharmony_ci /** 239961847f8eSopenharmony_ci * Obtains string resources associated with a specified resource object. 240061847f8eSopenharmony_ci * 240161847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 240261847f8eSopenharmony_ci * @returns { string } The character string corresponding to the resource object. 240361847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 240461847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 240561847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 240661847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 240761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 240861847f8eSopenharmony_ci * @stagemodelonly 240961847f8eSopenharmony_ci * @crossplatform 241061847f8eSopenharmony_ci * @atomicservice 241161847f8eSopenharmony_ci * @since 11 241261847f8eSopenharmony_ci */ 241361847f8eSopenharmony_ci getStringSync(resource: Resource): string; 241461847f8eSopenharmony_ci 241561847f8eSopenharmony_ci /** 241661847f8eSopenharmony_ci * Obtains string resources associated with a specified resource object. 241761847f8eSopenharmony_ci * 241861847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 241961847f8eSopenharmony_ci * @param { Array<string | number> } args - Indicates the formatting string resource parameters. 242061847f8eSopenharmony_ci * @returns { string } The character string corresponding to the resource object. 242161847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 242261847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 242361847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 242461847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 242561847f8eSopenharmony_ci * @throws { BusinessError } 9001007 - Failed to format the resource obtained based on the resource ID. 242661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 242761847f8eSopenharmony_ci * @stagemodelonly 242861847f8eSopenharmony_ci * @crossplatform 242961847f8eSopenharmony_ci * @since 10 243061847f8eSopenharmony_ci */ 243161847f8eSopenharmony_ci /** 243261847f8eSopenharmony_ci * Obtains string resources associated with a specified resource object. 243361847f8eSopenharmony_ci * 243461847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 243561847f8eSopenharmony_ci * @param { Array<string | number> } args - Indicates the formatting string resource parameters. 243661847f8eSopenharmony_ci * @returns { string } The character string corresponding to the resource object. 243761847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 243861847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 243961847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 244061847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 244161847f8eSopenharmony_ci * @throws { BusinessError } 9001007 - Failed to format the resource obtained based on the resource ID. 244261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 244361847f8eSopenharmony_ci * @stagemodelonly 244461847f8eSopenharmony_ci * @crossplatform 244561847f8eSopenharmony_ci * @atomicservice 244661847f8eSopenharmony_ci * @since 11 244761847f8eSopenharmony_ci */ 244861847f8eSopenharmony_ci getStringSync(resource: Resource, ...args: Array<string | number>): string; 244961847f8eSopenharmony_ci 245061847f8eSopenharmony_ci /** 245161847f8eSopenharmony_ci * Obtains string resources associated with a specified resource name. 245261847f8eSopenharmony_ci * 245361847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 245461847f8eSopenharmony_ci * @returns { string } The character string corresponding to the resource name. 245561847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 245661847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 245761847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 245861847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 245961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 246061847f8eSopenharmony_ci * @since 9 246161847f8eSopenharmony_ci */ 246261847f8eSopenharmony_ci /** 246361847f8eSopenharmony_ci * Obtains string resources associated with a specified resource name. 246461847f8eSopenharmony_ci * 246561847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 246661847f8eSopenharmony_ci * @returns { string } The character string corresponding to the resource name. 246761847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 246861847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 246961847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 247061847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 247161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 247261847f8eSopenharmony_ci * @crossplatform 247361847f8eSopenharmony_ci * @since 10 247461847f8eSopenharmony_ci */ 247561847f8eSopenharmony_ci /** 247661847f8eSopenharmony_ci * Obtains string resources associated with a specified resource name. 247761847f8eSopenharmony_ci * 247861847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 247961847f8eSopenharmony_ci * @returns { string } The character string corresponding to the resource name. 248061847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 248161847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 248261847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 248361847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 248461847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 248561847f8eSopenharmony_ci * @crossplatform 248661847f8eSopenharmony_ci * @atomicservice 248761847f8eSopenharmony_ci * @since 11 248861847f8eSopenharmony_ci */ 248961847f8eSopenharmony_ci getStringByNameSync(resName: string): string; 249061847f8eSopenharmony_ci 249161847f8eSopenharmony_ci /** 249261847f8eSopenharmony_ci * Obtains string resources associated with a specified resource name. 249361847f8eSopenharmony_ci * 249461847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 249561847f8eSopenharmony_ci * @param { Array<string | number> } args - Indicates the formatting string resource parameters. 249661847f8eSopenharmony_ci * @returns { string } The character string corresponding to the resource name. 249761847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 249861847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 249961847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 250061847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 250161847f8eSopenharmony_ci * @throws { BusinessError } 9001008 - Failed to format the resource obtained based on the resource Name. 250261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 250361847f8eSopenharmony_ci * @crossplatform 250461847f8eSopenharmony_ci * @since 10 250561847f8eSopenharmony_ci */ 250661847f8eSopenharmony_ci /** 250761847f8eSopenharmony_ci * Obtains string resources associated with a specified resource name. 250861847f8eSopenharmony_ci * 250961847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 251061847f8eSopenharmony_ci * @param { Array<string | number> } args - Indicates the formatting string resource parameters. 251161847f8eSopenharmony_ci * @returns { string } The character string corresponding to the resource name. 251261847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 251361847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 251461847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 251561847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 251661847f8eSopenharmony_ci * @throws { BusinessError } 9001008 - Failed to format the resource obtained based on the resource Name. 251761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 251861847f8eSopenharmony_ci * @crossplatform 251961847f8eSopenharmony_ci * @atomicservice 252061847f8eSopenharmony_ci * @since 11 252161847f8eSopenharmony_ci */ 252261847f8eSopenharmony_ci getStringByNameSync(resName: string, ...args: Array<string | number>): string; 252361847f8eSopenharmony_ci 252461847f8eSopenharmony_ci /** 252561847f8eSopenharmony_ci * Obtains the boolean result with a specified resource ID. 252661847f8eSopenharmony_ci * 252761847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 252861847f8eSopenharmony_ci * @returns { boolean } The boolean resource corresponding to the resource ID. 252961847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 253061847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 253161847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 253261847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 253361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 253461847f8eSopenharmony_ci * @since 9 253561847f8eSopenharmony_ci */ 253661847f8eSopenharmony_ci /** 253761847f8eSopenharmony_ci * Obtains the boolean result with a specified resource ID. 253861847f8eSopenharmony_ci * 253961847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 254061847f8eSopenharmony_ci * @returns { boolean } The boolean resource corresponding to the resource ID. 254161847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 254261847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 254361847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 254461847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 254561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 254661847f8eSopenharmony_ci * @crossplatform 254761847f8eSopenharmony_ci * @since 10 254861847f8eSopenharmony_ci */ 254961847f8eSopenharmony_ci /** 255061847f8eSopenharmony_ci * Obtains the boolean result with a specified resource ID. 255161847f8eSopenharmony_ci * 255261847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 255361847f8eSopenharmony_ci * @returns { boolean } The boolean resource corresponding to the resource ID. 255461847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 255561847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 255661847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 255761847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 255861847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 255961847f8eSopenharmony_ci * @crossplatform 256061847f8eSopenharmony_ci * @atomicservice 256161847f8eSopenharmony_ci * @since 11 256261847f8eSopenharmony_ci */ 256361847f8eSopenharmony_ci getBoolean(resId: number): boolean; 256461847f8eSopenharmony_ci 256561847f8eSopenharmony_ci /** 256661847f8eSopenharmony_ci * Obtains the boolean result with a specified resource object. 256761847f8eSopenharmony_ci * 256861847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 256961847f8eSopenharmony_ci * @returns { boolean } The boolean resource corresponding to the resource object. 257061847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 257161847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 257261847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 257361847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 257461847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 257561847f8eSopenharmony_ci * @stagemodelonly 257661847f8eSopenharmony_ci * @since 9 257761847f8eSopenharmony_ci */ 257861847f8eSopenharmony_ci /** 257961847f8eSopenharmony_ci * Obtains the boolean result with a specified resource object. 258061847f8eSopenharmony_ci * 258161847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 258261847f8eSopenharmony_ci * @returns { boolean } The boolean resource corresponding to the resource object. 258361847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 258461847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 258561847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 258661847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 258761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 258861847f8eSopenharmony_ci * @stagemodelonly 258961847f8eSopenharmony_ci * @crossplatform 259061847f8eSopenharmony_ci * @since 10 259161847f8eSopenharmony_ci */ 259261847f8eSopenharmony_ci /** 259361847f8eSopenharmony_ci * Obtains the boolean result with a specified resource object. 259461847f8eSopenharmony_ci * 259561847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 259661847f8eSopenharmony_ci * @returns { boolean } The boolean resource corresponding to the resource object. 259761847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 259861847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 259961847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 260061847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 260161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 260261847f8eSopenharmony_ci * @stagemodelonly 260361847f8eSopenharmony_ci * @crossplatform 260461847f8eSopenharmony_ci * @atomicservice 260561847f8eSopenharmony_ci * @since 11 260661847f8eSopenharmony_ci */ 260761847f8eSopenharmony_ci getBoolean(resource: Resource): boolean; 260861847f8eSopenharmony_ci 260961847f8eSopenharmony_ci /** 261061847f8eSopenharmony_ci * Obtains the boolean result with a specified resource name. 261161847f8eSopenharmony_ci * 261261847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 261361847f8eSopenharmony_ci * @returns { boolean } The boolean resource corresponding to the resource name. 261461847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 261561847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 261661847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 261761847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 261861847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 261961847f8eSopenharmony_ci * @since 9 262061847f8eSopenharmony_ci */ 262161847f8eSopenharmony_ci /** 262261847f8eSopenharmony_ci * Obtains the boolean result with a specified resource name. 262361847f8eSopenharmony_ci * 262461847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 262561847f8eSopenharmony_ci * @returns { boolean } The boolean resource corresponding to the resource name. 262661847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 262761847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 262861847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 262961847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 263061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 263161847f8eSopenharmony_ci * @crossplatform 263261847f8eSopenharmony_ci * @since 10 263361847f8eSopenharmony_ci */ 263461847f8eSopenharmony_ci /** 263561847f8eSopenharmony_ci * Obtains the boolean result with a specified resource name. 263661847f8eSopenharmony_ci * 263761847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 263861847f8eSopenharmony_ci * @returns { boolean } The boolean resource corresponding to the resource name. 263961847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 264061847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 264161847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 264261847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 264361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 264461847f8eSopenharmony_ci * @crossplatform 264561847f8eSopenharmony_ci * @atomicservice 264661847f8eSopenharmony_ci * @since 11 264761847f8eSopenharmony_ci */ 264861847f8eSopenharmony_ci getBooleanByName(resName: string): boolean; 264961847f8eSopenharmony_ci 265061847f8eSopenharmony_ci /** 265161847f8eSopenharmony_ci * Obtains the number result with a specified resource ID. 265261847f8eSopenharmony_ci * 265361847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 265461847f8eSopenharmony_ci * @returns { number } The number resource corresponding to the resource ID. 265561847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 265661847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 265761847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 265861847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 265961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 266061847f8eSopenharmony_ci * @since 9 266161847f8eSopenharmony_ci */ 266261847f8eSopenharmony_ci /** 266361847f8eSopenharmony_ci * Obtains the number result with a specified resource ID. 266461847f8eSopenharmony_ci * 266561847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 266661847f8eSopenharmony_ci * @returns { number } The number resource corresponding to the resource ID. 266761847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 266861847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 266961847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 267061847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 267161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 267261847f8eSopenharmony_ci * @crossplatform 267361847f8eSopenharmony_ci * @since 10 267461847f8eSopenharmony_ci */ 267561847f8eSopenharmony_ci /** 267661847f8eSopenharmony_ci * Obtains the number result with a specified resource ID. 267761847f8eSopenharmony_ci * 267861847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 267961847f8eSopenharmony_ci * @returns { number } The number resource corresponding to the resource ID. 268061847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 268161847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 268261847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 268361847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 268461847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 268561847f8eSopenharmony_ci * @crossplatform 268661847f8eSopenharmony_ci * @atomicservice 268761847f8eSopenharmony_ci * @since 11 268861847f8eSopenharmony_ci */ 268961847f8eSopenharmony_ci getNumber(resId: number): number; 269061847f8eSopenharmony_ci 269161847f8eSopenharmony_ci /** 269261847f8eSopenharmony_ci * Obtains the number result with a specified resource object. 269361847f8eSopenharmony_ci * 269461847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 269561847f8eSopenharmony_ci * @returns { number } The number resource corresponding to the resource object. 269661847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 269761847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 269861847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 269961847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 270061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 270161847f8eSopenharmony_ci * @stagemodelonly 270261847f8eSopenharmony_ci * @since 9 270361847f8eSopenharmony_ci */ 270461847f8eSopenharmony_ci /** 270561847f8eSopenharmony_ci * Obtains the number result with a specified resource object. 270661847f8eSopenharmony_ci * 270761847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 270861847f8eSopenharmony_ci * @returns { number } The number resource corresponding to the resource object. 270961847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 271061847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 271161847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 271261847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 271361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 271461847f8eSopenharmony_ci * @stagemodelonly 271561847f8eSopenharmony_ci * @crossplatform 271661847f8eSopenharmony_ci * @since 10 271761847f8eSopenharmony_ci */ 271861847f8eSopenharmony_ci /** 271961847f8eSopenharmony_ci * Obtains the number result with a specified resource object. 272061847f8eSopenharmony_ci * 272161847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 272261847f8eSopenharmony_ci * @returns { number } The number resource corresponding to the resource object. 272361847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 272461847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 272561847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 272661847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 272761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 272861847f8eSopenharmony_ci * @stagemodelonly 272961847f8eSopenharmony_ci * @crossplatform 273061847f8eSopenharmony_ci * @atomicservice 273161847f8eSopenharmony_ci * @since 11 273261847f8eSopenharmony_ci */ 273361847f8eSopenharmony_ci getNumber(resource: Resource): number; 273461847f8eSopenharmony_ci 273561847f8eSopenharmony_ci /** 273661847f8eSopenharmony_ci * Obtains the number result with a specified resource name. 273761847f8eSopenharmony_ci * 273861847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 273961847f8eSopenharmony_ci * @returns { number } The number resource corresponding to the resource name. 274061847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 274161847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 274261847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 274361847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 274461847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 274561847f8eSopenharmony_ci * @since 9 274661847f8eSopenharmony_ci */ 274761847f8eSopenharmony_ci /** 274861847f8eSopenharmony_ci * Obtains the number result with a specified resource name. 274961847f8eSopenharmony_ci * 275061847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 275161847f8eSopenharmony_ci * @returns { number } The number resource corresponding to the resource name. 275261847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 275361847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 275461847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 275561847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 275661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 275761847f8eSopenharmony_ci * @crossplatform 275861847f8eSopenharmony_ci * @since 10 275961847f8eSopenharmony_ci */ 276061847f8eSopenharmony_ci /** 276161847f8eSopenharmony_ci * Obtains the number result with a specified resource name. 276261847f8eSopenharmony_ci * 276361847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 276461847f8eSopenharmony_ci * @returns { number } The number resource corresponding to the resource name. 276561847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 276661847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 276761847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 276861847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 276961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 277061847f8eSopenharmony_ci * @crossplatform 277161847f8eSopenharmony_ci * @atomicservice 277261847f8eSopenharmony_ci * @since 11 277361847f8eSopenharmony_ci */ 277461847f8eSopenharmony_ci getNumberByName(resName: string): number; 277561847f8eSopenharmony_ci 277661847f8eSopenharmony_ci /** 277761847f8eSopenharmony_ci * Obtains release resourceManager. 277861847f8eSopenharmony_ci * 277961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 278061847f8eSopenharmony_ci * @since 7 278161847f8eSopenharmony_ci */ 278261847f8eSopenharmony_ci /** 278361847f8eSopenharmony_ci * Obtains release resourceManager. 278461847f8eSopenharmony_ci * 278561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 278661847f8eSopenharmony_ci * @crossplatform 278761847f8eSopenharmony_ci * @since 10 278861847f8eSopenharmony_ci */ 278961847f8eSopenharmony_ci /** 279061847f8eSopenharmony_ci * Obtains release resourceManager. 279161847f8eSopenharmony_ci * 279261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 279361847f8eSopenharmony_ci * @crossplatform 279461847f8eSopenharmony_ci * @atomicservice 279561847f8eSopenharmony_ci * @since 11 279661847f8eSopenharmony_ci * @deprecated since 12 279761847f8eSopenharmony_ci */ 279861847f8eSopenharmony_ci release(); 279961847f8eSopenharmony_ci 280061847f8eSopenharmony_ci /** 280161847f8eSopenharmony_ci * Obtains the character string corresponding to a specified resource ID in callback mode. 280261847f8eSopenharmony_ci * 280361847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 280461847f8eSopenharmony_ci * @param { _AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the obtained character string. 280561847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 280661847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 280761847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 280861847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 280961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 281061847f8eSopenharmony_ci * @since 9 281161847f8eSopenharmony_ci */ 281261847f8eSopenharmony_ci /** 281361847f8eSopenharmony_ci * Obtains the character string corresponding to a specified resource ID in callback mode. 281461847f8eSopenharmony_ci * 281561847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 281661847f8eSopenharmony_ci * @param { _AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the obtained character string. 281761847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 281861847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 281961847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 282061847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 282161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 282261847f8eSopenharmony_ci * @crossplatform 282361847f8eSopenharmony_ci * @since 10 282461847f8eSopenharmony_ci */ 282561847f8eSopenharmony_ci /** 282661847f8eSopenharmony_ci * Obtains the character string corresponding to a specified resource ID in callback mode. 282761847f8eSopenharmony_ci * 282861847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 282961847f8eSopenharmony_ci * @param { _AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the obtained character string. 283061847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 283161847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 283261847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 283361847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 283461847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 283561847f8eSopenharmony_ci * @crossplatform 283661847f8eSopenharmony_ci * @atomicservice 283761847f8eSopenharmony_ci * @since 11 283861847f8eSopenharmony_ci */ 283961847f8eSopenharmony_ci getStringValue(resId: number, callback: _AsyncCallback<string>): void; 284061847f8eSopenharmony_ci 284161847f8eSopenharmony_ci /** 284261847f8eSopenharmony_ci * Obtains string resources associated with a specified resource ID in Promise mode. 284361847f8eSopenharmony_ci * 284461847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 284561847f8eSopenharmony_ci * @returns { Promise<string> } The character string corresponding to the resource ID. 284661847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 284761847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 284861847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 284961847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 285061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 285161847f8eSopenharmony_ci * @since 9 285261847f8eSopenharmony_ci */ 285361847f8eSopenharmony_ci /** 285461847f8eSopenharmony_ci * Obtains string resources associated with a specified resource ID in Promise mode. 285561847f8eSopenharmony_ci * 285661847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 285761847f8eSopenharmony_ci * @returns { Promise<string> } The character string corresponding to the resource ID. 285861847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 285961847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 286061847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 286161847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 286261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 286361847f8eSopenharmony_ci * @crossplatform 286461847f8eSopenharmony_ci * @since 10 286561847f8eSopenharmony_ci */ 286661847f8eSopenharmony_ci /** 286761847f8eSopenharmony_ci * Obtains string resources associated with a specified resource ID in Promise mode. 286861847f8eSopenharmony_ci * 286961847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 287061847f8eSopenharmony_ci * @returns { Promise<string> } The character string corresponding to the resource ID. 287161847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 287261847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 287361847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 287461847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 287561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 287661847f8eSopenharmony_ci * @crossplatform 287761847f8eSopenharmony_ci * @atomicservice 287861847f8eSopenharmony_ci * @since 11 287961847f8eSopenharmony_ci */ 288061847f8eSopenharmony_ci getStringValue(resId: number): Promise<string>; 288161847f8eSopenharmony_ci 288261847f8eSopenharmony_ci /** 288361847f8eSopenharmony_ci * Obtains the array of character strings corresponding to a specified resource ID in callback mode. 288461847f8eSopenharmony_ci * 288561847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 288661847f8eSopenharmony_ci * @param { _AsyncCallback<Array<string>> } callback - Indicates the asynchronous callback used to return the obtained array of character strings. 288761847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 288861847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 288961847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 289061847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 289161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 289261847f8eSopenharmony_ci * @since 9 289361847f8eSopenharmony_ci */ 289461847f8eSopenharmony_ci /** 289561847f8eSopenharmony_ci * Obtains the array of character strings corresponding to a specified resource ID in callback mode. 289661847f8eSopenharmony_ci * 289761847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 289861847f8eSopenharmony_ci * @param { _AsyncCallback<Array<string>> } callback - Indicates the asynchronous callback used to return the obtained array of character strings. 289961847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 290061847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 290161847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 290261847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 290361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 290461847f8eSopenharmony_ci * @crossplatform 290561847f8eSopenharmony_ci * @since 10 290661847f8eSopenharmony_ci */ 290761847f8eSopenharmony_ci /** 290861847f8eSopenharmony_ci * Obtains the array of character strings corresponding to a specified resource ID in callback mode. 290961847f8eSopenharmony_ci * 291061847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 291161847f8eSopenharmony_ci * @param { _AsyncCallback<Array<string>> } callback - Indicates the asynchronous callback used to return the obtained array of character strings. 291261847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 291361847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 291461847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 291561847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 291661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 291761847f8eSopenharmony_ci * @crossplatform 291861847f8eSopenharmony_ci * @atomicservice 291961847f8eSopenharmony_ci * @since 11 292061847f8eSopenharmony_ci */ 292161847f8eSopenharmony_ci getStringArrayValue(resId: number, callback: _AsyncCallback<Array<string>>): void; 292261847f8eSopenharmony_ci 292361847f8eSopenharmony_ci /** 292461847f8eSopenharmony_ci * Obtains the array of character strings corresponding to a specified resource ID in Promise mode. 292561847f8eSopenharmony_ci * 292661847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 292761847f8eSopenharmony_ci * @returns { Promise<Array<string>> } The array of character strings corresponding to the specified resource ID. 292861847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 292961847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 293061847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 293161847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 293261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 293361847f8eSopenharmony_ci * @since 9 293461847f8eSopenharmony_ci */ 293561847f8eSopenharmony_ci /** 293661847f8eSopenharmony_ci * Obtains the array of character strings corresponding to a specified resource ID in Promise mode. 293761847f8eSopenharmony_ci * 293861847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 293961847f8eSopenharmony_ci * @returns { Promise<Array<string>> } The array of character strings corresponding to the specified resource ID. 294061847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 294161847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 294261847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 294361847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 294461847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 294561847f8eSopenharmony_ci * @crossplatform 294661847f8eSopenharmony_ci * @since 10 294761847f8eSopenharmony_ci */ 294861847f8eSopenharmony_ci /** 294961847f8eSopenharmony_ci * Obtains the array of character strings corresponding to a specified resource ID in Promise mode. 295061847f8eSopenharmony_ci * 295161847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 295261847f8eSopenharmony_ci * @returns { Promise<Array<string>> } The array of character strings corresponding to the specified resource ID. 295361847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 295461847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 295561847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 295661847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 295761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 295861847f8eSopenharmony_ci * @crossplatform 295961847f8eSopenharmony_ci * @atomicservice 296061847f8eSopenharmony_ci * @since 11 296161847f8eSopenharmony_ci */ 296261847f8eSopenharmony_ci getStringArrayValue(resId: number): Promise<Array<string>>; 296361847f8eSopenharmony_ci 296461847f8eSopenharmony_ci /** 296561847f8eSopenharmony_ci * Obtains the singular-plural character string represented by the ID string corresponding to the 296661847f8eSopenharmony_ci * specified number in callback mode. 296761847f8eSopenharmony_ci * 296861847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 296961847f8eSopenharmony_ci * @param { number } num - Indicates the number. 297061847f8eSopenharmony_ci * @param { _AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the singular-plural character 297161847f8eSopenharmony_ci * string represented by the ID string corresponding to the specified number. 297261847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 297361847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 297461847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 297561847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 297661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 297761847f8eSopenharmony_ci * @since 9 297861847f8eSopenharmony_ci */ 297961847f8eSopenharmony_ci /** 298061847f8eSopenharmony_ci * Obtains the singular-plural character string represented by the ID string corresponding to the 298161847f8eSopenharmony_ci * specified number in callback mode. 298261847f8eSopenharmony_ci * 298361847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 298461847f8eSopenharmony_ci * @param { number } num - Indicates the number. 298561847f8eSopenharmony_ci * @param { _AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the singular-plural character 298661847f8eSopenharmony_ci * string represented by the ID string corresponding to the specified number. 298761847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 298861847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 298961847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 299061847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 299161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 299261847f8eSopenharmony_ci * @crossplatform 299361847f8eSopenharmony_ci * @since 10 299461847f8eSopenharmony_ci */ 299561847f8eSopenharmony_ci /** 299661847f8eSopenharmony_ci * Obtains the singular-plural character string represented by the ID string corresponding to the 299761847f8eSopenharmony_ci * specified number in callback mode. 299861847f8eSopenharmony_ci * 299961847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 300061847f8eSopenharmony_ci * @param { number } num - Indicates the number. 300161847f8eSopenharmony_ci * @param { _AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the singular-plural character 300261847f8eSopenharmony_ci * string represented by the ID string corresponding to the specified number. 300361847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 300461847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 300561847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 300661847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 300761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 300861847f8eSopenharmony_ci * @crossplatform 300961847f8eSopenharmony_ci * @atomicservice 301061847f8eSopenharmony_ci * @since 11 301161847f8eSopenharmony_ci */ 301261847f8eSopenharmony_ci getPluralStringValue(resId: number, num: number, callback: _AsyncCallback<string>): void; 301361847f8eSopenharmony_ci 301461847f8eSopenharmony_ci /** 301561847f8eSopenharmony_ci * Obtains the singular-plural character string represented by the ID string corresponding to 301661847f8eSopenharmony_ci * the specified number in Promise mode. 301761847f8eSopenharmony_ci * 301861847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 301961847f8eSopenharmony_ci * @param { number } num - Indicates the number. 302061847f8eSopenharmony_ci * @returns { Promise<string> } The singular-plural character string represented by the ID string 302161847f8eSopenharmony_ci * corresponding to the specified number. 302261847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 302361847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 302461847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 302561847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 302661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 302761847f8eSopenharmony_ci * @since 9 302861847f8eSopenharmony_ci */ 302961847f8eSopenharmony_ci /** 303061847f8eSopenharmony_ci * Obtains the singular-plural character string represented by the ID string corresponding to 303161847f8eSopenharmony_ci * the specified number in Promise mode. 303261847f8eSopenharmony_ci * 303361847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 303461847f8eSopenharmony_ci * @param { number } num - Indicates the number. 303561847f8eSopenharmony_ci * @returns { Promise<string> } The singular-plural character string represented by the ID string 303661847f8eSopenharmony_ci * corresponding to the specified number. 303761847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 303861847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 303961847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 304061847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 304161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 304261847f8eSopenharmony_ci * @crossplatform 304361847f8eSopenharmony_ci * @since 10 304461847f8eSopenharmony_ci */ 304561847f8eSopenharmony_ci /** 304661847f8eSopenharmony_ci * Obtains the singular-plural character string represented by the ID string corresponding to 304761847f8eSopenharmony_ci * the specified number in Promise mode. 304861847f8eSopenharmony_ci * 304961847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 305061847f8eSopenharmony_ci * @param { number } num - Indicates the number. 305161847f8eSopenharmony_ci * @returns { Promise<string> } The singular-plural character string represented by the ID string 305261847f8eSopenharmony_ci * corresponding to the specified number. 305361847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 305461847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 305561847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 305661847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 305761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 305861847f8eSopenharmony_ci * @crossplatform 305961847f8eSopenharmony_ci * @atomicservice 306061847f8eSopenharmony_ci * @since 11 306161847f8eSopenharmony_ci */ 306261847f8eSopenharmony_ci getPluralStringValue(resId: number, num: number): Promise<string>; 306361847f8eSopenharmony_ci 306461847f8eSopenharmony_ci /** 306561847f8eSopenharmony_ci * Obtains the content of the media file corresponding to a specified resource ID in callback mode. 306661847f8eSopenharmony_ci * 306761847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 306861847f8eSopenharmony_ci * @param { _AsyncCallback<Uint8Array> } callback - Indicates the asynchronous callback used to return the obtained media file content. 306961847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 307061847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 307161847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 307261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 307361847f8eSopenharmony_ci * @since 9 307461847f8eSopenharmony_ci */ 307561847f8eSopenharmony_ci /** 307661847f8eSopenharmony_ci * Obtains the content of the media file corresponding to a specified resource ID in callback mode. 307761847f8eSopenharmony_ci * 307861847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 307961847f8eSopenharmony_ci * @param { _AsyncCallback<Uint8Array> } callback - Indicates the asynchronous callback used to return the obtained media file content. 308061847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 308161847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 308261847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 308361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 308461847f8eSopenharmony_ci * @crossplatform 308561847f8eSopenharmony_ci * @since 10 308661847f8eSopenharmony_ci */ 308761847f8eSopenharmony_ci /** 308861847f8eSopenharmony_ci * Obtains the content of the media file corresponding to a specified resource ID in callback mode. 308961847f8eSopenharmony_ci * 309061847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 309161847f8eSopenharmony_ci * @param { _AsyncCallback<Uint8Array> } callback - Indicates the asynchronous callback used to return the obtained media file content. 309261847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 309361847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 309461847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 309561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 309661847f8eSopenharmony_ci * @crossplatform 309761847f8eSopenharmony_ci * @atomicservice 309861847f8eSopenharmony_ci * @since 11 309961847f8eSopenharmony_ci */ 310061847f8eSopenharmony_ci getMediaContent(resId: number, callback: _AsyncCallback<Uint8Array>): void; 310161847f8eSopenharmony_ci 310261847f8eSopenharmony_ci /** 310361847f8eSopenharmony_ci * Obtains the content of the specified screen density media file corresponding to a specified resource ID in callback mode. 310461847f8eSopenharmony_ci * 310561847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 310661847f8eSopenharmony_ci * @param { number } density - The parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 310761847f8eSopenharmony_ci * to use the density of current system dpi. 310861847f8eSopenharmony_ci * @param { _AsyncCallback<Uint8Array> } callback - Indicates the asynchronous callback used to return the obtained 310961847f8eSopenharmony_ci * specified screen density media file content. 311061847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 311161847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 311261847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 311361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 311461847f8eSopenharmony_ci * @since 10 311561847f8eSopenharmony_ci */ 311661847f8eSopenharmony_ci /** 311761847f8eSopenharmony_ci * Obtains the content of the specified screen density media file corresponding to a specified resource ID in callback mode. 311861847f8eSopenharmony_ci * 311961847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 312061847f8eSopenharmony_ci * @param { number } density - The parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 312161847f8eSopenharmony_ci * to use the density of current system dpi. 312261847f8eSopenharmony_ci * @param { _AsyncCallback<Uint8Array> } callback - Indicates the asynchronous callback used to return the obtained 312361847f8eSopenharmony_ci * specified screen density media file content. 312461847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 312561847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 312661847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 312761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 312861847f8eSopenharmony_ci * @crossplatform 312961847f8eSopenharmony_ci * @atomicservice 313061847f8eSopenharmony_ci * @since 11 313161847f8eSopenharmony_ci */ 313261847f8eSopenharmony_ci getMediaContent(resId: number, density: number, callback: _AsyncCallback<Uint8Array>): void; 313361847f8eSopenharmony_ci 313461847f8eSopenharmony_ci /** 313561847f8eSopenharmony_ci * Obtains the content of the media file corresponding to a specified resource ID in Promise mode. 313661847f8eSopenharmony_ci * 313761847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 313861847f8eSopenharmony_ci * @returns { Promise<Uint8Array> } The content of the media file corresponding to the specified resource ID. 313961847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 314061847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 314161847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 314261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 314361847f8eSopenharmony_ci * @since 9 314461847f8eSopenharmony_ci */ 314561847f8eSopenharmony_ci /** 314661847f8eSopenharmony_ci * Obtains the content of the media file corresponding to a specified resource ID in Promise mode. 314761847f8eSopenharmony_ci * 314861847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 314961847f8eSopenharmony_ci * @returns { Promise<Uint8Array> } The content of the media file corresponding to the specified resource ID. 315061847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 315161847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 315261847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 315361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 315461847f8eSopenharmony_ci * @crossplatform 315561847f8eSopenharmony_ci * @since 10 315661847f8eSopenharmony_ci */ 315761847f8eSopenharmony_ci /** 315861847f8eSopenharmony_ci * Obtains the content of the media file corresponding to a specified resource ID in Promise mode. 315961847f8eSopenharmony_ci * 316061847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 316161847f8eSopenharmony_ci * @returns { Promise<Uint8Array> } The content of the media file corresponding to the specified resource ID. 316261847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 316361847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 316461847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 316561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 316661847f8eSopenharmony_ci * @crossplatform 316761847f8eSopenharmony_ci * @atomicservice 316861847f8eSopenharmony_ci * @since 11 316961847f8eSopenharmony_ci */ 317061847f8eSopenharmony_ci getMediaContent(resId: number): Promise<Uint8Array>; 317161847f8eSopenharmony_ci 317261847f8eSopenharmony_ci /** 317361847f8eSopenharmony_ci * Obtains the content of the specified screen density media file corresponding to a specified resource ID in Promise mode. 317461847f8eSopenharmony_ci * 317561847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 317661847f8eSopenharmony_ci * @param { number } density - The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 317761847f8eSopenharmony_ci * to use the density of current system dpi. 317861847f8eSopenharmony_ci * @returns { Promise<Uint8Array> } The content of the specified screen density media file corresponding to the specified resource ID. 317961847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 318061847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 318161847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 318261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 318361847f8eSopenharmony_ci * @since 10 318461847f8eSopenharmony_ci */ 318561847f8eSopenharmony_ci /** 318661847f8eSopenharmony_ci * Obtains the content of the specified screen density media file corresponding to a specified resource ID in Promise mode. 318761847f8eSopenharmony_ci * 318861847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 318961847f8eSopenharmony_ci * @param { number } density - The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 319061847f8eSopenharmony_ci * to use the density of current system dpi. 319161847f8eSopenharmony_ci * @returns { Promise<Uint8Array> } The content of the specified screen density media file corresponding to the specified resource ID. 319261847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 319361847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 319461847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 319561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 319661847f8eSopenharmony_ci * @crossplatform 319761847f8eSopenharmony_ci * @atomicservice 319861847f8eSopenharmony_ci * @since 11 319961847f8eSopenharmony_ci */ 320061847f8eSopenharmony_ci getMediaContent(resId: number, density: number): Promise<Uint8Array>; 320161847f8eSopenharmony_ci 320261847f8eSopenharmony_ci /** 320361847f8eSopenharmony_ci * Obtains the Base64 code of the image resource corresponding to the specified resource ID in callback mode. 320461847f8eSopenharmony_ci * 320561847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 320661847f8eSopenharmony_ci * @param { _AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the obtained Base64 code of the image 320761847f8eSopenharmony_ci * resource. 320861847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 320961847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 321061847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 321161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 321261847f8eSopenharmony_ci * @since 9 321361847f8eSopenharmony_ci */ 321461847f8eSopenharmony_ci /** 321561847f8eSopenharmony_ci * Obtains the Base64 code of the image resource corresponding to the specified resource ID in callback mode. 321661847f8eSopenharmony_ci * 321761847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 321861847f8eSopenharmony_ci * @param { _AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the obtained Base64 code of the image 321961847f8eSopenharmony_ci * resource. 322061847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 322161847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 322261847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 322361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 322461847f8eSopenharmony_ci * @crossplatform 322561847f8eSopenharmony_ci * @since 10 322661847f8eSopenharmony_ci */ 322761847f8eSopenharmony_ci /** 322861847f8eSopenharmony_ci * Obtains the Base64 code of the image resource corresponding to the specified resource ID in callback mode. 322961847f8eSopenharmony_ci * 323061847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 323161847f8eSopenharmony_ci * @param { _AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the obtained Base64 code of the image 323261847f8eSopenharmony_ci * resource. 323361847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 323461847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 323561847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 323661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 323761847f8eSopenharmony_ci * @crossplatform 323861847f8eSopenharmony_ci * @atomicservice 323961847f8eSopenharmony_ci * @since 11 324061847f8eSopenharmony_ci */ 324161847f8eSopenharmony_ci getMediaContentBase64(resId: number, callback: _AsyncCallback<string>): void; 324261847f8eSopenharmony_ci 324361847f8eSopenharmony_ci /** 324461847f8eSopenharmony_ci * Obtains the Base64 code of the specified screen density image resource corresponding to the specified resource ID in callback mode. 324561847f8eSopenharmony_ci * 324661847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 324761847f8eSopenharmony_ci * @param { number } density - The parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 324861847f8eSopenharmony_ci * to use the density of current system dpi. 324961847f8eSopenharmony_ci * @param { _AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the obtained Base64 code of the 325061847f8eSopenharmony_ci * specified screen density image resource. 325161847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 325261847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 325361847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 325461847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 325561847f8eSopenharmony_ci * @since 10 325661847f8eSopenharmony_ci */ 325761847f8eSopenharmony_ci /** 325861847f8eSopenharmony_ci * Obtains the Base64 code of the specified screen density image resource corresponding to the specified resource ID in callback mode. 325961847f8eSopenharmony_ci * 326061847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 326161847f8eSopenharmony_ci * @param { number } density - The parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 326261847f8eSopenharmony_ci * to use the density of current system dpi. 326361847f8eSopenharmony_ci * @param { _AsyncCallback<string> } callback - Indicates the asynchronous callback used to return the obtained Base64 code of the 326461847f8eSopenharmony_ci * specified screen density image resource. 326561847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 326661847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 326761847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 326861847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 326961847f8eSopenharmony_ci * @crossplatform 327061847f8eSopenharmony_ci * @atomicservice 327161847f8eSopenharmony_ci * @since 11 327261847f8eSopenharmony_ci */ 327361847f8eSopenharmony_ci getMediaContentBase64(resId: number, density: number, callback: _AsyncCallback<string>): void; 327461847f8eSopenharmony_ci 327561847f8eSopenharmony_ci /** 327661847f8eSopenharmony_ci * Obtains the Base64 code of the image resource corresponding to the specified resource ID in Promise mode. 327761847f8eSopenharmony_ci * 327861847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 327961847f8eSopenharmony_ci * @returns { Promise<string> } the Base64 code of the image resource corresponding to the specified resource ID. 328061847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 328161847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 328261847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 328361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 328461847f8eSopenharmony_ci * @since 9 328561847f8eSopenharmony_ci */ 328661847f8eSopenharmony_ci /** 328761847f8eSopenharmony_ci * Obtains the Base64 code of the image resource corresponding to the specified resource ID in Promise mode. 328861847f8eSopenharmony_ci * 328961847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 329061847f8eSopenharmony_ci * @returns { Promise<string> } the Base64 code of the image resource corresponding to the specified resource ID. 329161847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 329261847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 329361847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 329461847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 329561847f8eSopenharmony_ci * @crossplatform 329661847f8eSopenharmony_ci * @since 10 329761847f8eSopenharmony_ci */ 329861847f8eSopenharmony_ci /** 329961847f8eSopenharmony_ci * Obtains the Base64 code of the image resource corresponding to the specified resource ID in Promise mode. 330061847f8eSopenharmony_ci * 330161847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 330261847f8eSopenharmony_ci * @returns { Promise<string> } the Base64 code of the image resource corresponding to the specified resource ID. 330361847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 330461847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 330561847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 330661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 330761847f8eSopenharmony_ci * @crossplatform 330861847f8eSopenharmony_ci * @atomicservice 330961847f8eSopenharmony_ci * @since 11 331061847f8eSopenharmony_ci */ 331161847f8eSopenharmony_ci getMediaContentBase64(resId: number): Promise<string>; 331261847f8eSopenharmony_ci 331361847f8eSopenharmony_ci /** 331461847f8eSopenharmony_ci * Obtains the Base64 code of the specified screen density image resource corresponding to the specified resource ID in Promise mode. 331561847f8eSopenharmony_ci * 331661847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 331761847f8eSopenharmony_ci * @param { number } density - The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 331861847f8eSopenharmony_ci * to use the density of current system dpi. 331961847f8eSopenharmony_ci * @returns { Promise<string> } the Base64 code of the specified screen density image resource corresponding to the specified resource ID. 332061847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 332161847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 332261847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 332361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 332461847f8eSopenharmony_ci * @since 10 332561847f8eSopenharmony_ci */ 332661847f8eSopenharmony_ci /** 332761847f8eSopenharmony_ci * Obtains the Base64 code of the specified screen density image resource corresponding to the specified resource ID in Promise mode. 332861847f8eSopenharmony_ci * 332961847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 333061847f8eSopenharmony_ci * @param { number } density - The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 333161847f8eSopenharmony_ci * to use the density of current system dpi. 333261847f8eSopenharmony_ci * @returns { Promise<string> } the Base64 code of the specified screen density image resource corresponding to the specified resource ID. 333361847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 333461847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 333561847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 333661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 333761847f8eSopenharmony_ci * @crossplatform 333861847f8eSopenharmony_ci * @atomicservice 333961847f8eSopenharmony_ci * @since 11 334061847f8eSopenharmony_ci */ 334161847f8eSopenharmony_ci getMediaContentBase64(resId: number, density: number): Promise<string>; 334261847f8eSopenharmony_ci 334361847f8eSopenharmony_ci /** 334461847f8eSopenharmony_ci * Obtains the raw file resource corresponding to the specified resource path in callback mode. 334561847f8eSopenharmony_ci * 334661847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 334761847f8eSopenharmony_ci * @param { _AsyncCallback<Uint8Array> } callback - Indicates the asynchronous callback used to return the raw file resource. 334861847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 334961847f8eSopenharmony_ci * @throws { BusinessError } 9001005 - Invalid relative path. 335061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 335161847f8eSopenharmony_ci * @since 9 335261847f8eSopenharmony_ci */ 335361847f8eSopenharmony_ci /** 335461847f8eSopenharmony_ci * Obtains the raw file resource corresponding to the specified resource path in callback mode. 335561847f8eSopenharmony_ci * 335661847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 335761847f8eSopenharmony_ci * @param { _AsyncCallback<Uint8Array> } callback - Indicates the asynchronous callback used to return the raw file resource. 335861847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 335961847f8eSopenharmony_ci * @throws { BusinessError } 9001005 - Invalid relative path. 336061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 336161847f8eSopenharmony_ci * @crossplatform 336261847f8eSopenharmony_ci * @since 10 336361847f8eSopenharmony_ci */ 336461847f8eSopenharmony_ci /** 336561847f8eSopenharmony_ci * Obtains the raw file resource corresponding to the specified resource path in callback mode. 336661847f8eSopenharmony_ci * 336761847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 336861847f8eSopenharmony_ci * @param { _AsyncCallback<Uint8Array> } callback - Indicates the asynchronous callback used to return the raw file resource. 336961847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 337061847f8eSopenharmony_ci * @throws { BusinessError } 9001005 - Invalid relative path. 337161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 337261847f8eSopenharmony_ci * @crossplatform 337361847f8eSopenharmony_ci * @atomicservice 337461847f8eSopenharmony_ci * @since 11 337561847f8eSopenharmony_ci */ 337661847f8eSopenharmony_ci getRawFileContent(path: string, callback: _AsyncCallback<Uint8Array>): void; 337761847f8eSopenharmony_ci 337861847f8eSopenharmony_ci /** 337961847f8eSopenharmony_ci * Obtains the raw file resource corresponding to the specified resource path in Promise mode. 338061847f8eSopenharmony_ci * 338161847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 338261847f8eSopenharmony_ci * @returns { Promise<Uint8Array> } the raw file resource corresponding to the specified resource path. 338361847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 338461847f8eSopenharmony_ci * @throws { BusinessError } 9001005 - Invalid relative path. 338561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 338661847f8eSopenharmony_ci * @since 9 338761847f8eSopenharmony_ci */ 338861847f8eSopenharmony_ci /** 338961847f8eSopenharmony_ci * Obtains the raw file resource corresponding to the specified resource path in Promise mode. 339061847f8eSopenharmony_ci * 339161847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 339261847f8eSopenharmony_ci * @returns { Promise<Uint8Array> } the raw file resource corresponding to the specified resource path. 339361847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 339461847f8eSopenharmony_ci * @throws { BusinessError } 9001005 - Invalid relative path. 339561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 339661847f8eSopenharmony_ci * @crossplatform 339761847f8eSopenharmony_ci * @since 10 339861847f8eSopenharmony_ci */ 339961847f8eSopenharmony_ci /** 340061847f8eSopenharmony_ci * Obtains the raw file resource corresponding to the specified resource path in Promise mode. 340161847f8eSopenharmony_ci * 340261847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 340361847f8eSopenharmony_ci * @returns { Promise<Uint8Array> } the raw file resource corresponding to the specified resource path. 340461847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 340561847f8eSopenharmony_ci * @throws { BusinessError } 9001005 - Invalid relative path. 340661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 340761847f8eSopenharmony_ci * @crossplatform 340861847f8eSopenharmony_ci * @atomicservice 340961847f8eSopenharmony_ci * @since 11 341061847f8eSopenharmony_ci */ 341161847f8eSopenharmony_ci getRawFileContent(path: string): Promise<Uint8Array>; 341261847f8eSopenharmony_ci 341361847f8eSopenharmony_ci /** 341461847f8eSopenharmony_ci * Obtains the raw file resource descriptor corresponding to the specified resource path in callback mode. 341561847f8eSopenharmony_ci * 341661847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 341761847f8eSopenharmony_ci * @param { _AsyncCallback<RawFileDescriptor> } callback - Indicates the asynchronous callback used to return the raw file resource descriptor. 341861847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 341961847f8eSopenharmony_ci * @throws { BusinessError } 9001005 - Invalid relative path. 342061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 342161847f8eSopenharmony_ci * @since 9 342261847f8eSopenharmony_ci */ 342361847f8eSopenharmony_ci /** 342461847f8eSopenharmony_ci * Obtains the raw file resource descriptor corresponding to the specified resource path in callback mode. 342561847f8eSopenharmony_ci * 342661847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 342761847f8eSopenharmony_ci * @param { _AsyncCallback<RawFileDescriptor> } callback - Indicates the asynchronous callback used to return the raw file resource descriptor. 342861847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 342961847f8eSopenharmony_ci * @throws { BusinessError } 9001005 - Invalid relative path. 343061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 343161847f8eSopenharmony_ci * @crossplatform 343261847f8eSopenharmony_ci * @since 10 343361847f8eSopenharmony_ci */ 343461847f8eSopenharmony_ci /** 343561847f8eSopenharmony_ci * Obtains the raw file resource descriptor corresponding to the specified resource path in callback mode. 343661847f8eSopenharmony_ci * 343761847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 343861847f8eSopenharmony_ci * @param { _AsyncCallback<RawFileDescriptor> } callback - Indicates the asynchronous callback used to return the raw file resource descriptor. 343961847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 344061847f8eSopenharmony_ci * @throws { BusinessError } 9001005 - Invalid relative path. 344161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 344261847f8eSopenharmony_ci * @crossplatform 344361847f8eSopenharmony_ci * @atomicservice 344461847f8eSopenharmony_ci * @since 11 344561847f8eSopenharmony_ci */ 344661847f8eSopenharmony_ci getRawFd(path: string, callback: _AsyncCallback<RawFileDescriptor>): void; 344761847f8eSopenharmony_ci 344861847f8eSopenharmony_ci /** 344961847f8eSopenharmony_ci * Obtains the raw file resource descriptor corresponding to the specified resource path in Promise mode. 345061847f8eSopenharmony_ci * 345161847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 345261847f8eSopenharmony_ci * @returns { Promise<RawFileDescriptor> } The raw file resource descriptor corresponding to the specified resource path. 345361847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 345461847f8eSopenharmony_ci * @throws { BusinessError } 9001005 - Invalid relative path. 345561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 345661847f8eSopenharmony_ci * @since 9 345761847f8eSopenharmony_ci */ 345861847f8eSopenharmony_ci /** 345961847f8eSopenharmony_ci * Obtains the raw file resource descriptor corresponding to the specified resource path in Promise mode. 346061847f8eSopenharmony_ci * 346161847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 346261847f8eSopenharmony_ci * @returns { Promise<RawFileDescriptor> } The raw file resource descriptor corresponding to the specified resource path. 346361847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 346461847f8eSopenharmony_ci * @throws { BusinessError } 9001005 - Invalid relative path. 346561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 346661847f8eSopenharmony_ci * @crossplatform 346761847f8eSopenharmony_ci * @since 10 346861847f8eSopenharmony_ci */ 346961847f8eSopenharmony_ci /** 347061847f8eSopenharmony_ci * Obtains the raw file resource descriptor corresponding to the specified resource path in Promise mode. 347161847f8eSopenharmony_ci * 347261847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 347361847f8eSopenharmony_ci * @returns { Promise<RawFileDescriptor> } The raw file resource descriptor corresponding to the specified resource path. 347461847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 347561847f8eSopenharmony_ci * @throws { BusinessError } 9001005 - Invalid relative path. 347661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 347761847f8eSopenharmony_ci * @crossplatform 347861847f8eSopenharmony_ci * @atomicservice 347961847f8eSopenharmony_ci * @since 11 348061847f8eSopenharmony_ci */ 348161847f8eSopenharmony_ci getRawFd(path: string): Promise<RawFileDescriptor>; 348261847f8eSopenharmony_ci 348361847f8eSopenharmony_ci /** 348461847f8eSopenharmony_ci * Obtains close raw file resource descriptor corresponding to the specified resource path in callback mode. 348561847f8eSopenharmony_ci * 348661847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 348761847f8eSopenharmony_ci * @param { _AsyncCallback<void> } callback - Indicates the asynchronous callback used to return result close raw file resource descriptor. 348861847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 348961847f8eSopenharmony_ci * @throws { BusinessError } 9001005 - Invalid relative path. 349061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 349161847f8eSopenharmony_ci * @since 9 349261847f8eSopenharmony_ci */ 349361847f8eSopenharmony_ci /** 349461847f8eSopenharmony_ci * Obtains close raw file resource descriptor corresponding to the specified resource path in callback mode. 349561847f8eSopenharmony_ci * 349661847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 349761847f8eSopenharmony_ci * @param { _AsyncCallback<void> } callback - Indicates the asynchronous callback used to return result close raw file resource descriptor. 349861847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 349961847f8eSopenharmony_ci * @throws { BusinessError } 9001005 - Invalid relative path. 350061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 350161847f8eSopenharmony_ci * @crossplatform 350261847f8eSopenharmony_ci * @since 10 350361847f8eSopenharmony_ci */ 350461847f8eSopenharmony_ci /** 350561847f8eSopenharmony_ci * Obtains close raw file resource descriptor corresponding to the specified resource path in callback mode. 350661847f8eSopenharmony_ci * 350761847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 350861847f8eSopenharmony_ci * @param { _AsyncCallback<void> } callback - Indicates the asynchronous callback used to return result close raw file resource descriptor. 350961847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 351061847f8eSopenharmony_ci * @throws { BusinessError } 9001005 - Invalid relative path. 351161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 351261847f8eSopenharmony_ci * @crossplatform 351361847f8eSopenharmony_ci * @atomicservice 351461847f8eSopenharmony_ci * @since 11 351561847f8eSopenharmony_ci */ 351661847f8eSopenharmony_ci closeRawFd(path: string, callback: _AsyncCallback<void>): void; 351761847f8eSopenharmony_ci 351861847f8eSopenharmony_ci /** 351961847f8eSopenharmony_ci * Obtains close raw file resource descriptor corresponding to the specified resource path in Promise mode. 352061847f8eSopenharmony_ci * 352161847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 352261847f8eSopenharmony_ci * @returns { Promise<void> } The result close raw file resource descriptor corresponding to the specified resource path. 352361847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 352461847f8eSopenharmony_ci * @throws { BusinessError } 9001005 - Invalid relative path. 352561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 352661847f8eSopenharmony_ci * @since 9 352761847f8eSopenharmony_ci */ 352861847f8eSopenharmony_ci /** 352961847f8eSopenharmony_ci * Obtains close raw file resource descriptor corresponding to the specified resource path in Promise mode. 353061847f8eSopenharmony_ci * 353161847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 353261847f8eSopenharmony_ci * @returns { Promise<void> } The result close raw file resource descriptor corresponding to the specified resource path. 353361847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 353461847f8eSopenharmony_ci * @throws { BusinessError } 9001005 - Invalid relative path. 353561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 353661847f8eSopenharmony_ci * @crossplatform 353761847f8eSopenharmony_ci * @since 10 353861847f8eSopenharmony_ci */ 353961847f8eSopenharmony_ci /** 354061847f8eSopenharmony_ci * Obtains close raw file resource descriptor corresponding to the specified resource path in Promise mode. 354161847f8eSopenharmony_ci * 354261847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 354361847f8eSopenharmony_ci * @returns { Promise<void> } The result close raw file resource descriptor corresponding to the specified resource path. 354461847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 354561847f8eSopenharmony_ci * @throws { BusinessError } 9001005 - Invalid relative path. 354661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 354761847f8eSopenharmony_ci * @crossplatform 354861847f8eSopenharmony_ci * @atomicservice 354961847f8eSopenharmony_ci * @since 11 355061847f8eSopenharmony_ci */ 355161847f8eSopenharmony_ci closeRawFd(path: string): Promise<void>; 355261847f8eSopenharmony_ci 355361847f8eSopenharmony_ci /** 355461847f8eSopenharmony_ci * Obtains the DrawableDescriptor of the media file corresponding to a specified resource ID. 355561847f8eSopenharmony_ci * 355661847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 355761847f8eSopenharmony_ci * @param { number } [density] - The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 355861847f8eSopenharmony_ci * to use the density of current system dpi. 355961847f8eSopenharmony_ci * @returns { DrawableDescriptor } The DrawableDescriptor class to get drawable image. 356061847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 356161847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 356261847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 356361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 356461847f8eSopenharmony_ci * @since 10 356561847f8eSopenharmony_ci */ 356661847f8eSopenharmony_ci /** 356761847f8eSopenharmony_ci * Obtains the DrawableDescriptor of the media file corresponding to a specified resource ID. 356861847f8eSopenharmony_ci * 356961847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 357061847f8eSopenharmony_ci * @param { number } [density] - The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 357161847f8eSopenharmony_ci * to use the density of current system dpi. 357261847f8eSopenharmony_ci * @param { number } [type] - The optional parameter means the media type, the default value 0 means 357361847f8eSopenharmony_ci * the normal media. 357461847f8eSopenharmony_ci * @returns { DrawableDescriptor } The DrawableDescriptor class to get drawable image. 357561847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 357661847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 357761847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 357861847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 357961847f8eSopenharmony_ci * @atomicservice 358061847f8eSopenharmony_ci * @since 11 358161847f8eSopenharmony_ci */ 358261847f8eSopenharmony_ci /** 358361847f8eSopenharmony_ci * Obtains the DrawableDescriptor of the media file corresponding to a specified resource ID. 358461847f8eSopenharmony_ci * 358561847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 358661847f8eSopenharmony_ci * @param { number } [density] - The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 358761847f8eSopenharmony_ci * to use the density of current system dpi. 358861847f8eSopenharmony_ci * @param { number } [type] - The optional parameter means the media type, the default value 0 means 358961847f8eSopenharmony_ci * the normal media. 359061847f8eSopenharmony_ci * @returns { DrawableDescriptor } The DrawableDescriptor class to get drawable image. 359161847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 359261847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 359361847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 359461847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 359561847f8eSopenharmony_ci * @crossplatform 359661847f8eSopenharmony_ci * @atomicservice 359761847f8eSopenharmony_ci * @since 12 359861847f8eSopenharmony_ci */ 359961847f8eSopenharmony_ci getDrawableDescriptor(resId: number, density?: number, type?: number): DrawableDescriptor; 360061847f8eSopenharmony_ci 360161847f8eSopenharmony_ci /** 360261847f8eSopenharmony_ci * Obtains the DrawableDescriptor of the media file corresponding to a specified resource Name. 360361847f8eSopenharmony_ci * 360461847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 360561847f8eSopenharmony_ci * @param { number } [density] - The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 360661847f8eSopenharmony_ci * to use the density of current system dpi. 360761847f8eSopenharmony_ci * @returns { DrawableDescriptor } The DrawableDescriptor class to get drawable image. 360861847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 360961847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 361061847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 361161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 361261847f8eSopenharmony_ci * @since 10 361361847f8eSopenharmony_ci */ 361461847f8eSopenharmony_ci /** 361561847f8eSopenharmony_ci * Obtains the DrawableDescriptor of the media file corresponding to a specified resource Name. 361661847f8eSopenharmony_ci * 361761847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 361861847f8eSopenharmony_ci * @param { number } [density] - The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 361961847f8eSopenharmony_ci * to use the density of current system dpi. 362061847f8eSopenharmony_ci * @param { number } [type] - The optional parameter means the media type, the default value 0 means 362161847f8eSopenharmony_ci * the normal media. 362261847f8eSopenharmony_ci * @returns { DrawableDescriptor } The DrawableDescriptor class to get drawable image. 362361847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 362461847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 362561847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 362661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 362761847f8eSopenharmony_ci * @atomicservice 362861847f8eSopenharmony_ci * @since 11 362961847f8eSopenharmony_ci */ 363061847f8eSopenharmony_ci /** 363161847f8eSopenharmony_ci * Obtains the DrawableDescriptor of the media file corresponding to a specified resource Name. 363261847f8eSopenharmony_ci * 363361847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 363461847f8eSopenharmony_ci * @param { number } [density] - The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 363561847f8eSopenharmony_ci * to use the density of current system dpi. 363661847f8eSopenharmony_ci * @param { number } [type] - The optional parameter means the media type, the default value 0 means 363761847f8eSopenharmony_ci * the normal media. 363861847f8eSopenharmony_ci * @returns { DrawableDescriptor } The DrawableDescriptor class to get drawable image. 363961847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 364061847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 364161847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 364261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 364361847f8eSopenharmony_ci * @crossplatform 364461847f8eSopenharmony_ci * @atomicservice 364561847f8eSopenharmony_ci * @since 12 364661847f8eSopenharmony_ci */ 364761847f8eSopenharmony_ci getDrawableDescriptorByName(resName: string, density?: number, type?: number): DrawableDescriptor; 364861847f8eSopenharmony_ci 364961847f8eSopenharmony_ci /** 365061847f8eSopenharmony_ci * Obtains the DrawableDescriptor of the media file corresponding to a specified resource. 365161847f8eSopenharmony_ci * 365261847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 365361847f8eSopenharmony_ci * @param { number } [density] - The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 365461847f8eSopenharmony_ci * to use the density of current system dpi. 365561847f8eSopenharmony_ci * @returns { DrawableDescriptor } The DrawableDescriptor class to get drawable image. 365661847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 365761847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 365861847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 365961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 366061847f8eSopenharmony_ci * @stagemodelonly 366161847f8eSopenharmony_ci * @since 10 366261847f8eSopenharmony_ci */ 366361847f8eSopenharmony_ci /** 366461847f8eSopenharmony_ci * Obtains the DrawableDescriptor of the media file corresponding to a specified resource. 366561847f8eSopenharmony_ci * 366661847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 366761847f8eSopenharmony_ci * @param { number } [density] - The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 366861847f8eSopenharmony_ci * to use the density of current system dpi. 366961847f8eSopenharmony_ci * @param { number } [type] - The optional parameter means the media type, the default value 0 means 367061847f8eSopenharmony_ci * the normal media. 367161847f8eSopenharmony_ci * @returns { DrawableDescriptor } The DrawableDescriptor class to get drawable image. 367261847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 367361847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 367461847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 367561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 367661847f8eSopenharmony_ci * @stagemodelonly 367761847f8eSopenharmony_ci * @atomicservice 367861847f8eSopenharmony_ci * @since 11 367961847f8eSopenharmony_ci */ 368061847f8eSopenharmony_ci /** 368161847f8eSopenharmony_ci * Obtains the DrawableDescriptor of the media file corresponding to a specified resource. 368261847f8eSopenharmony_ci * 368361847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 368461847f8eSopenharmony_ci * @param { number } [density] - The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 368561847f8eSopenharmony_ci * to use the density of current system dpi. 368661847f8eSopenharmony_ci * @param { number } [type] - The optional parameter means the media type, the default value 0 means 368761847f8eSopenharmony_ci * the normal media. 368861847f8eSopenharmony_ci * @returns { DrawableDescriptor } The DrawableDescriptor class to get drawable image. 368961847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 369061847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 369161847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 369261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 369361847f8eSopenharmony_ci * @stagemodelonly 369461847f8eSopenharmony_ci * @crossplatform 369561847f8eSopenharmony_ci * @atomicservice 369661847f8eSopenharmony_ci * @since 12 369761847f8eSopenharmony_ci */ 369861847f8eSopenharmony_ci getDrawableDescriptor(resource: Resource, density?: number, type?: number): DrawableDescriptor; 369961847f8eSopenharmony_ci 370061847f8eSopenharmony_ci /** 370161847f8eSopenharmony_ci * Obtains the rawfile resource list corresponding to the specified resource path in callback mode. 370261847f8eSopenharmony_ci * 370361847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 370461847f8eSopenharmony_ci * @param { _AsyncCallback<Array<string>> } callback - Indicates the asynchronous callback used to return the raw file list. 370561847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 370661847f8eSopenharmony_ci * @throws { BusinessError } 9001005 - Invalid relative path. 370761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 370861847f8eSopenharmony_ci * @since 10 370961847f8eSopenharmony_ci */ 371061847f8eSopenharmony_ci /** 371161847f8eSopenharmony_ci * Obtains the rawfile resource list corresponding to the specified resource path in callback mode. 371261847f8eSopenharmony_ci * 371361847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 371461847f8eSopenharmony_ci * @param { _AsyncCallback<Array<string>> } callback - Indicates the asynchronous callback used to return the raw file list. 371561847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 371661847f8eSopenharmony_ci * @throws { BusinessError } 9001005 - Invalid relative path. 371761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 371861847f8eSopenharmony_ci * @crossplatform 371961847f8eSopenharmony_ci * @atomicservice 372061847f8eSopenharmony_ci * @since 11 372161847f8eSopenharmony_ci */ 372261847f8eSopenharmony_ci getRawFileList(path: string, callback: _AsyncCallback<Array<string>>): void; 372361847f8eSopenharmony_ci 372461847f8eSopenharmony_ci /** 372561847f8eSopenharmony_ci * Obtains the rawfile resource list corresponding to the specified resource path in Promise mode. 372661847f8eSopenharmony_ci * 372761847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 372861847f8eSopenharmony_ci * @returns { Promise<Array<string>> } The rawfile list corresponding to the specified resource path. 372961847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 373061847f8eSopenharmony_ci * @throws { BusinessError } 9001005 - Invalid relative path. 373161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 373261847f8eSopenharmony_ci * @since 10 373361847f8eSopenharmony_ci */ 373461847f8eSopenharmony_ci /** 373561847f8eSopenharmony_ci * Obtains the rawfile resource list corresponding to the specified resource path in Promise mode. 373661847f8eSopenharmony_ci * 373761847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 373861847f8eSopenharmony_ci * @returns { Promise<Array<string>> } The rawfile list corresponding to the specified resource path. 373961847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 374061847f8eSopenharmony_ci * @throws { BusinessError } 9001005 - Invalid relative path. 374161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 374261847f8eSopenharmony_ci * @crossplatform 374361847f8eSopenharmony_ci * @atomicservice 374461847f8eSopenharmony_ci * @since 11 374561847f8eSopenharmony_ci */ 374661847f8eSopenharmony_ci getRawFileList(path: string): Promise<Array<string>>; 374761847f8eSopenharmony_ci 374861847f8eSopenharmony_ci /** 374961847f8eSopenharmony_ci * Obtains the color resource corresponding to the specified resource ID in callback mode. 375061847f8eSopenharmony_ci * 375161847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 375261847f8eSopenharmony_ci * @param { _AsyncCallback<number> } callback - Indicates the asynchronous callback used to 375361847f8eSopenharmony_ci * return the integer reference value representing the color data. 375461847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 375561847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 375661847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 375761847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 375861847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 375961847f8eSopenharmony_ci * @since 10 376061847f8eSopenharmony_ci */ 376161847f8eSopenharmony_ci /** 376261847f8eSopenharmony_ci * Obtains the color resource corresponding to the specified resource ID in callback mode. 376361847f8eSopenharmony_ci * 376461847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 376561847f8eSopenharmony_ci * @param { _AsyncCallback<number> } callback - Indicates the asynchronous callback used to 376661847f8eSopenharmony_ci * return the integer reference value representing the color data. 376761847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 376861847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 376961847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 377061847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 377161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 377261847f8eSopenharmony_ci * @crossplatform 377361847f8eSopenharmony_ci * @atomicservice 377461847f8eSopenharmony_ci * @since 11 377561847f8eSopenharmony_ci */ 377661847f8eSopenharmony_ci getColor(resId: number, callback: _AsyncCallback<number>): void; 377761847f8eSopenharmony_ci 377861847f8eSopenharmony_ci /** 377961847f8eSopenharmony_ci * Obtains the color resource corresponding to the specified resource ID in promise mode. 378061847f8eSopenharmony_ci * 378161847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 378261847f8eSopenharmony_ci * @returns { Promise<number> } Indicates return the integer reference value representing the color data. 378361847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 378461847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 378561847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 378661847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 378761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 378861847f8eSopenharmony_ci * @since 10 378961847f8eSopenharmony_ci */ 379061847f8eSopenharmony_ci /** 379161847f8eSopenharmony_ci * Obtains the color resource corresponding to the specified resource ID in promise mode. 379261847f8eSopenharmony_ci * 379361847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 379461847f8eSopenharmony_ci * @returns { Promise<number> } Indicates return the integer reference value representing the color data. 379561847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 379661847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 379761847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 379861847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 379961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 380061847f8eSopenharmony_ci * @crossplatform 380161847f8eSopenharmony_ci * @atomicservice 380261847f8eSopenharmony_ci * @since 11 380361847f8eSopenharmony_ci */ 380461847f8eSopenharmony_ci getColor(resId: number): Promise<number>; 380561847f8eSopenharmony_ci 380661847f8eSopenharmony_ci /** 380761847f8eSopenharmony_ci * Obtains the color resource corresponding to the specified resource object in callback mode. 380861847f8eSopenharmony_ci * 380961847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 381061847f8eSopenharmony_ci * @param { _AsyncCallback<number> } callback - Indicates the asynchronous callback used to 381161847f8eSopenharmony_ci * return the integer reference value representing the color data. 381261847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 381361847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 381461847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 381561847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 381661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 381761847f8eSopenharmony_ci * @stagemodelonly 381861847f8eSopenharmony_ci * @since 10 381961847f8eSopenharmony_ci */ 382061847f8eSopenharmony_ci /** 382161847f8eSopenharmony_ci * Obtains the color resource corresponding to the specified resource object in callback mode. 382261847f8eSopenharmony_ci * 382361847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 382461847f8eSopenharmony_ci * @param { _AsyncCallback<number> } callback - Indicates the asynchronous callback used to 382561847f8eSopenharmony_ci * return the integer reference value representing the color data. 382661847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 382761847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 382861847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 382961847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 383061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 383161847f8eSopenharmony_ci * @stagemodelonly 383261847f8eSopenharmony_ci * @crossplatform 383361847f8eSopenharmony_ci * @atomicservice 383461847f8eSopenharmony_ci * @since 11 383561847f8eSopenharmony_ci */ 383661847f8eSopenharmony_ci getColor(resource: Resource, callback: _AsyncCallback<number>): void; 383761847f8eSopenharmony_ci 383861847f8eSopenharmony_ci /** 383961847f8eSopenharmony_ci * Obtains the color resource corresponding to the specified resource object in promise mode. 384061847f8eSopenharmony_ci * 384161847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 384261847f8eSopenharmony_ci * @returns { Promise<number> } Indicates return the integer reference value representing the color data. 384361847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 384461847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 384561847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 384661847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 384761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 384861847f8eSopenharmony_ci * @stagemodelonly 384961847f8eSopenharmony_ci * @since 10 385061847f8eSopenharmony_ci */ 385161847f8eSopenharmony_ci /** 385261847f8eSopenharmony_ci * Obtains the color resource corresponding to the specified resource object in promise mode. 385361847f8eSopenharmony_ci * 385461847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 385561847f8eSopenharmony_ci * @returns { Promise<number> } Indicates return the integer reference value representing the color data. 385661847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 385761847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 385861847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 385961847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 386061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 386161847f8eSopenharmony_ci * @stagemodelonly 386261847f8eSopenharmony_ci * @crossplatform 386361847f8eSopenharmony_ci * @atomicservice 386461847f8eSopenharmony_ci * @since 11 386561847f8eSopenharmony_ci */ 386661847f8eSopenharmony_ci getColor(resource: Resource): Promise<number>; 386761847f8eSopenharmony_ci 386861847f8eSopenharmony_ci /** 386961847f8eSopenharmony_ci * Obtains the color resource corresponding to the specified resource object in callback mode. 387061847f8eSopenharmony_ci * 387161847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 387261847f8eSopenharmony_ci * @param { _AsyncCallback<number> } callback - Indicates the asynchronous callback used to 387361847f8eSopenharmony_ci * return the integer reference value representing the color data. 387461847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 387561847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 387661847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 387761847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 387861847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 387961847f8eSopenharmony_ci * @since 10 388061847f8eSopenharmony_ci */ 388161847f8eSopenharmony_ci /** 388261847f8eSopenharmony_ci * Obtains the color resource corresponding to the specified resource object in callback mode. 388361847f8eSopenharmony_ci * 388461847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 388561847f8eSopenharmony_ci * @param { _AsyncCallback<number> } callback - Indicates the asynchronous callback used to 388661847f8eSopenharmony_ci * return the integer reference value representing the color data. 388761847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 388861847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 388961847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 389061847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 389161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 389261847f8eSopenharmony_ci * @crossplatform 389361847f8eSopenharmony_ci * @atomicservice 389461847f8eSopenharmony_ci * @since 11 389561847f8eSopenharmony_ci */ 389661847f8eSopenharmony_ci getColorByName(resName: string, callback: _AsyncCallback<number>): void; 389761847f8eSopenharmony_ci 389861847f8eSopenharmony_ci /** 389961847f8eSopenharmony_ci * Obtains the color resource corresponding to the specified resource object in promise mode. 390061847f8eSopenharmony_ci * 390161847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 390261847f8eSopenharmony_ci * @returns { Promise<number> } Indicates return the integer reference value representing the color data. 390361847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 390461847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 390561847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 390661847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 390761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 390861847f8eSopenharmony_ci * @since 10 390961847f8eSopenharmony_ci */ 391061847f8eSopenharmony_ci /** 391161847f8eSopenharmony_ci * Obtains the color resource corresponding to the specified resource object in promise mode. 391261847f8eSopenharmony_ci * 391361847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 391461847f8eSopenharmony_ci * @returns { Promise<number> } Indicates return the integer reference value representing the color data. 391561847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 391661847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 391761847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 391861847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 391961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 392061847f8eSopenharmony_ci * @crossplatform 392161847f8eSopenharmony_ci * @atomicservice 392261847f8eSopenharmony_ci * @since 11 392361847f8eSopenharmony_ci */ 392461847f8eSopenharmony_ci getColorByName(resName: string): Promise<number>; 392561847f8eSopenharmony_ci 392661847f8eSopenharmony_ci /** 392761847f8eSopenharmony_ci * Obtains the color resource corresponding to the specified resource ID. 392861847f8eSopenharmony_ci * 392961847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 393061847f8eSopenharmony_ci * @returns { number } Indicates the integer reference value representing the color data. 393161847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 393261847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 393361847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 393461847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 393561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 393661847f8eSopenharmony_ci * @since 10 393761847f8eSopenharmony_ci */ 393861847f8eSopenharmony_ci /** 393961847f8eSopenharmony_ci * Obtains the color resource corresponding to the specified resource ID. 394061847f8eSopenharmony_ci * 394161847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 394261847f8eSopenharmony_ci * @returns { number } Indicates the integer reference value representing the color data. 394361847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 394461847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 394561847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 394661847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 394761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 394861847f8eSopenharmony_ci * @crossplatform 394961847f8eSopenharmony_ci * @atomicservice 395061847f8eSopenharmony_ci * @since 11 395161847f8eSopenharmony_ci */ 395261847f8eSopenharmony_ci getColorSync(resId: number) : number; 395361847f8eSopenharmony_ci 395461847f8eSopenharmony_ci /** 395561847f8eSopenharmony_ci * Obtains the color resource corresponding to the specified resource object. 395661847f8eSopenharmony_ci * 395761847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 395861847f8eSopenharmony_ci * @returns { number } Indicates the integer reference value representing the color data. 395961847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 396061847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 396161847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 396261847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 396361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 396461847f8eSopenharmony_ci * @stagemodelonly 396561847f8eSopenharmony_ci * @since 10 396661847f8eSopenharmony_ci */ 396761847f8eSopenharmony_ci /** 396861847f8eSopenharmony_ci * Obtains the color resource corresponding to the specified resource object. 396961847f8eSopenharmony_ci * 397061847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 397161847f8eSopenharmony_ci * @returns { number } Indicates the integer reference value representing the color data. 397261847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 397361847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 397461847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 397561847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 397661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 397761847f8eSopenharmony_ci * @stagemodelonly 397861847f8eSopenharmony_ci * @crossplatform 397961847f8eSopenharmony_ci * @atomicservice 398061847f8eSopenharmony_ci * @since 11 398161847f8eSopenharmony_ci */ 398261847f8eSopenharmony_ci getColorSync(resource: Resource) : number; 398361847f8eSopenharmony_ci 398461847f8eSopenharmony_ci /** 398561847f8eSopenharmony_ci * Obtains the color resource corresponding to the specified resource name. 398661847f8eSopenharmony_ci * 398761847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 398861847f8eSopenharmony_ci * @returns { number } Indicates the integer reference value representing the color data. 398961847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 399061847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 399161847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 399261847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 399361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 399461847f8eSopenharmony_ci * @since 10 399561847f8eSopenharmony_ci */ 399661847f8eSopenharmony_ci /** 399761847f8eSopenharmony_ci * Obtains the color resource corresponding to the specified resource name. 399861847f8eSopenharmony_ci * 399961847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 400061847f8eSopenharmony_ci * @returns { number } Indicates the integer reference value representing the color data. 400161847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 400261847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 400361847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 400461847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 400561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 400661847f8eSopenharmony_ci * @crossplatform 400761847f8eSopenharmony_ci * @atomicservice 400861847f8eSopenharmony_ci * @since 11 400961847f8eSopenharmony_ci */ 401061847f8eSopenharmony_ci getColorByNameSync(resName: string) : number; 401161847f8eSopenharmony_ci 401261847f8eSopenharmony_ci /** 401361847f8eSopenharmony_ci * Add overlay resources during application runtime. 401461847f8eSopenharmony_ci * 401561847f8eSopenharmony_ci * @param { string } path - Indicates the application overlay path. 401661847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 401761847f8eSopenharmony_ci * @throws { BusinessError } 9001010 - Invalid overlay path. 401861847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 401961847f8eSopenharmony_ci * @since 10 402061847f8eSopenharmony_ci */ 402161847f8eSopenharmony_ci /** 402261847f8eSopenharmony_ci * Add overlay resources during application runtime. 402361847f8eSopenharmony_ci * 402461847f8eSopenharmony_ci * @param { string } path - Indicates the application overlay path. 402561847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 402661847f8eSopenharmony_ci * @throws { BusinessError } 9001010 - Invalid overlay path. 402761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 402861847f8eSopenharmony_ci * @crossplatform 402961847f8eSopenharmony_ci * @atomicservice 403061847f8eSopenharmony_ci * @since 11 403161847f8eSopenharmony_ci */ 403261847f8eSopenharmony_ci addResource(path: string) : void; 403361847f8eSopenharmony_ci 403461847f8eSopenharmony_ci /** 403561847f8eSopenharmony_ci * Remove overlay resources during application runtime. 403661847f8eSopenharmony_ci * 403761847f8eSopenharmony_ci * @param { string } path - Indicates the application overlay path. 403861847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 403961847f8eSopenharmony_ci * @throws { BusinessError } 9001010 - Invalid overlay path. 404061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 404161847f8eSopenharmony_ci * @since 10 404261847f8eSopenharmony_ci */ 404361847f8eSopenharmony_ci /** 404461847f8eSopenharmony_ci * Remove overlay resources during application runtime. 404561847f8eSopenharmony_ci * 404661847f8eSopenharmony_ci * @param { string } path - Indicates the application overlay path. 404761847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 404861847f8eSopenharmony_ci * @throws { BusinessError } 9001010 - Invalid overlay path. 404961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 405061847f8eSopenharmony_ci * @crossplatform 405161847f8eSopenharmony_ci * @atomicservice 405261847f8eSopenharmony_ci * @since 11 405361847f8eSopenharmony_ci */ 405461847f8eSopenharmony_ci removeResource(path: string) : void; 405561847f8eSopenharmony_ci 405661847f8eSopenharmony_ci /** 405761847f8eSopenharmony_ci * Obtains the raw file resource descriptor corresponding to the specified resource path. 405861847f8eSopenharmony_ci * 405961847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 406061847f8eSopenharmony_ci * @returns { RawFileDescriptor } The raw file resource descriptor. 406161847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 406261847f8eSopenharmony_ci * @throws { BusinessError } 9001005 - Invalid relative path. 406361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 406461847f8eSopenharmony_ci * @since 10 406561847f8eSopenharmony_ci */ 406661847f8eSopenharmony_ci /** 406761847f8eSopenharmony_ci * Obtains the raw file resource descriptor corresponding to the specified resource path. 406861847f8eSopenharmony_ci * 406961847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 407061847f8eSopenharmony_ci * @returns { RawFileDescriptor } The raw file resource descriptor. 407161847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 407261847f8eSopenharmony_ci * @throws { BusinessError } 9001005 - Invalid relative path. 407361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 407461847f8eSopenharmony_ci * @crossplatform 407561847f8eSopenharmony_ci * @atomicservice 407661847f8eSopenharmony_ci * @since 11 407761847f8eSopenharmony_ci */ 407861847f8eSopenharmony_ci getRawFdSync(path: string): RawFileDescriptor; 407961847f8eSopenharmony_ci 408061847f8eSopenharmony_ci /** 408161847f8eSopenharmony_ci * Close the raw file resource descriptor corresponding to the specified resource path. 408261847f8eSopenharmony_ci * 408361847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 408461847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 408561847f8eSopenharmony_ci * @throws { BusinessError } 9001005 - Invalid relative path. 408661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 408761847f8eSopenharmony_ci * @since 10 408861847f8eSopenharmony_ci */ 408961847f8eSopenharmony_ci /** 409061847f8eSopenharmony_ci * Close the raw file resource descriptor corresponding to the specified resource path. 409161847f8eSopenharmony_ci * 409261847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 409361847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 409461847f8eSopenharmony_ci * @throws { BusinessError } 9001005 - Invalid relative path. 409561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 409661847f8eSopenharmony_ci * @crossplatform 409761847f8eSopenharmony_ci * @atomicservice 409861847f8eSopenharmony_ci * @since 11 409961847f8eSopenharmony_ci */ 410061847f8eSopenharmony_ci closeRawFdSync(path: string): void; 410161847f8eSopenharmony_ci 410261847f8eSopenharmony_ci /** 410361847f8eSopenharmony_ci * Obtains the rawfile resource list corresponding to the specified resource path. 410461847f8eSopenharmony_ci * 410561847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 410661847f8eSopenharmony_ci * @returns { Array<string> } The rawfile resource list. 410761847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 410861847f8eSopenharmony_ci * @throws { BusinessError } 9001005 - Invalid relative path. 410961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 411061847f8eSopenharmony_ci * @since 10 411161847f8eSopenharmony_ci */ 411261847f8eSopenharmony_ci /** 411361847f8eSopenharmony_ci * Obtains the rawfile resource list corresponding to the specified resource path. 411461847f8eSopenharmony_ci * 411561847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 411661847f8eSopenharmony_ci * @returns { Array<string> } The rawfile resource list. 411761847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 411861847f8eSopenharmony_ci * @throws { BusinessError } 9001005 - Invalid relative path. 411961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 412061847f8eSopenharmony_ci * @crossplatform 412161847f8eSopenharmony_ci * @atomicservice 412261847f8eSopenharmony_ci * @since 11 412361847f8eSopenharmony_ci */ 412461847f8eSopenharmony_ci getRawFileListSync(path: string): Array<string>; 412561847f8eSopenharmony_ci 412661847f8eSopenharmony_ci /** 412761847f8eSopenharmony_ci * Obtains the raw file resource corresponding to the specified resource path. 412861847f8eSopenharmony_ci * 412961847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 413061847f8eSopenharmony_ci * @returns { Uint8Array } the raw file resource corresponding to the specified resource path. 413161847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 413261847f8eSopenharmony_ci * @throws { BusinessError } 9001005 - Invalid relative path. 413361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 413461847f8eSopenharmony_ci * @since 10 413561847f8eSopenharmony_ci */ 413661847f8eSopenharmony_ci /** 413761847f8eSopenharmony_ci * Obtains the raw file resource corresponding to the specified resource path. 413861847f8eSopenharmony_ci * 413961847f8eSopenharmony_ci * @param { string } path - Indicates the resource relative path. 414061847f8eSopenharmony_ci * @returns { Uint8Array } the raw file resource corresponding to the specified resource path. 414161847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 414261847f8eSopenharmony_ci * @throws { BusinessError } 9001005 - Invalid relative path. 414361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 414461847f8eSopenharmony_ci * @crossplatform 414561847f8eSopenharmony_ci * @atomicservice 414661847f8eSopenharmony_ci * @since 11 414761847f8eSopenharmony_ci */ 414861847f8eSopenharmony_ci getRawFileContentSync(path: string): Uint8Array; 414961847f8eSopenharmony_ci 415061847f8eSopenharmony_ci /** 415161847f8eSopenharmony_ci * Obtains the content of the specified screen density media file corresponding to a specified resource ID. 415261847f8eSopenharmony_ci * 415361847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 415461847f8eSopenharmony_ci * @param { number } [density] - The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 415561847f8eSopenharmony_ci * to use the density of current system dpi. 415661847f8eSopenharmony_ci * @returns { Uint8Array } Indicates the obtained media file content. 415761847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 415861847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 415961847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 416061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 416161847f8eSopenharmony_ci * @since 10 416261847f8eSopenharmony_ci */ 416361847f8eSopenharmony_ci /** 416461847f8eSopenharmony_ci * Obtains the content of the specified screen density media file corresponding to a specified resource ID. 416561847f8eSopenharmony_ci * 416661847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 416761847f8eSopenharmony_ci * @param { number } [density] - The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 416861847f8eSopenharmony_ci * to use the density of current system dpi. 416961847f8eSopenharmony_ci * @returns { Uint8Array } Indicates the obtained media file content. 417061847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 417161847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 417261847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 417361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 417461847f8eSopenharmony_ci * @crossplatform 417561847f8eSopenharmony_ci * @atomicservice 417661847f8eSopenharmony_ci * @since 11 417761847f8eSopenharmony_ci */ 417861847f8eSopenharmony_ci getMediaContentSync(resId: number, density?: number): Uint8Array; 417961847f8eSopenharmony_ci 418061847f8eSopenharmony_ci /** 418161847f8eSopenharmony_ci * Obtains the content of the specified screen density media file corresponding to a specified resource object. 418261847f8eSopenharmony_ci * 418361847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 418461847f8eSopenharmony_ci * @param { number } [density] - The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 418561847f8eSopenharmony_ci * to use the density of current system dpi. 418661847f8eSopenharmony_ci * @returns { Uint8Array } Indicates the obtained media file content. 418761847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 418861847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 418961847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 419061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 419161847f8eSopenharmony_ci * @stagemodelonly 419261847f8eSopenharmony_ci * @since 10 419361847f8eSopenharmony_ci */ 419461847f8eSopenharmony_ci /** 419561847f8eSopenharmony_ci * Obtains the content of the specified screen density media file corresponding to a specified resource object. 419661847f8eSopenharmony_ci * 419761847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 419861847f8eSopenharmony_ci * @param { number } [density] - The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 419961847f8eSopenharmony_ci * to use the density of current system dpi. 420061847f8eSopenharmony_ci * @returns { Uint8Array } Indicates the obtained media file content. 420161847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 420261847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 420361847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 420461847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 420561847f8eSopenharmony_ci * @stagemodelonly 420661847f8eSopenharmony_ci * @crossplatform 420761847f8eSopenharmony_ci * @atomicservice 420861847f8eSopenharmony_ci * @since 11 420961847f8eSopenharmony_ci */ 421061847f8eSopenharmony_ci getMediaContentSync(resource: Resource, density?: number): Uint8Array; 421161847f8eSopenharmony_ci 421261847f8eSopenharmony_ci /** 421361847f8eSopenharmony_ci * Obtains the Base64 code of the specified screen density media file corresponding to the specified resource ID. 421461847f8eSopenharmony_ci * 421561847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 421661847f8eSopenharmony_ci * @param { number } [density] - The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 421761847f8eSopenharmony_ci * to use the density of current system dpi. 421861847f8eSopenharmony_ci * @returns { string } Indicates the obtained Base64 code of the media file. 421961847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 422061847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 422161847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 422261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 422361847f8eSopenharmony_ci * @since 10 422461847f8eSopenharmony_ci */ 422561847f8eSopenharmony_ci /** 422661847f8eSopenharmony_ci * Obtains the Base64 code of the specified screen density media file corresponding to the specified resource ID. 422761847f8eSopenharmony_ci * 422861847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 422961847f8eSopenharmony_ci * @param { number } [density] - The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 423061847f8eSopenharmony_ci * to use the density of current system dpi. 423161847f8eSopenharmony_ci * @returns { string } Indicates the obtained Base64 code of the media file. 423261847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 423361847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 423461847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 423561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 423661847f8eSopenharmony_ci * @crossplatform 423761847f8eSopenharmony_ci * @atomicservice 423861847f8eSopenharmony_ci * @since 11 423961847f8eSopenharmony_ci */ 424061847f8eSopenharmony_ci getMediaContentBase64Sync(resId: number, density?: number): string; 424161847f8eSopenharmony_ci 424261847f8eSopenharmony_ci /** 424361847f8eSopenharmony_ci * Obtains the content of the specified screen density media file corresponding to the specified resource object. 424461847f8eSopenharmony_ci * 424561847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 424661847f8eSopenharmony_ci * @param { number } [density] - The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 424761847f8eSopenharmony_ci * to use the density of current system dpi. 424861847f8eSopenharmony_ci * @returns { string } Indicates the obtained Base64 code of the media file. 424961847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 425061847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 425161847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 425261847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 425361847f8eSopenharmony_ci * @stagemodelonly 425461847f8eSopenharmony_ci * @since 10 425561847f8eSopenharmony_ci */ 425661847f8eSopenharmony_ci /** 425761847f8eSopenharmony_ci * Obtains the content of the specified screen density media file corresponding to the specified resource object. 425861847f8eSopenharmony_ci * 425961847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 426061847f8eSopenharmony_ci * @param { number } [density] - The optional parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 426161847f8eSopenharmony_ci * to use the density of current system dpi. 426261847f8eSopenharmony_ci * @returns { string } Indicates the obtained Base64 code of the media file. 426361847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 426461847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 426561847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 426661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 426761847f8eSopenharmony_ci * @stagemodelonly 426861847f8eSopenharmony_ci * @crossplatform 426961847f8eSopenharmony_ci * @atomicservice 427061847f8eSopenharmony_ci * @since 11 427161847f8eSopenharmony_ci */ 427261847f8eSopenharmony_ci getMediaContentBase64Sync(resource: Resource, density?: number): string; 427361847f8eSopenharmony_ci 427461847f8eSopenharmony_ci /** 427561847f8eSopenharmony_ci * Obtains the singular-plural character string represented by the ID string corresponding to 427661847f8eSopenharmony_ci * the specified number. 427761847f8eSopenharmony_ci * 427861847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 427961847f8eSopenharmony_ci * @param { number } num - Indicates the number. 428061847f8eSopenharmony_ci * @returns { string } The singular-plural character string represented by the ID string 428161847f8eSopenharmony_ci * corresponding to the specified number. 428261847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 428361847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 428461847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 428561847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 428661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 428761847f8eSopenharmony_ci * @since 10 428861847f8eSopenharmony_ci */ 428961847f8eSopenharmony_ci /** 429061847f8eSopenharmony_ci * Obtains the singular-plural character string represented by the ID string corresponding to 429161847f8eSopenharmony_ci * the specified number. 429261847f8eSopenharmony_ci * 429361847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 429461847f8eSopenharmony_ci * @param { number } num - Indicates the number. 429561847f8eSopenharmony_ci * @returns { string } The singular-plural character string represented by the ID string 429661847f8eSopenharmony_ci * corresponding to the specified number. 429761847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 429861847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 429961847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 430061847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 430161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 430261847f8eSopenharmony_ci * @crossplatform 430361847f8eSopenharmony_ci * @atomicservice 430461847f8eSopenharmony_ci * @since 11 430561847f8eSopenharmony_ci */ 430661847f8eSopenharmony_ci getPluralStringValueSync(resId: number, num: number): string; 430761847f8eSopenharmony_ci 430861847f8eSopenharmony_ci /** 430961847f8eSopenharmony_ci * Obtains the singular-plural character string represented by the resource object string corresponding to the 431061847f8eSopenharmony_ci * specified number. 431161847f8eSopenharmony_ci * 431261847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 431361847f8eSopenharmony_ci * @param { number } num - Indicates the number. 431461847f8eSopenharmony_ci * @returns { string } The singular-plural character string represented by the ID string 431561847f8eSopenharmony_ci * corresponding to the specified number. 431661847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 431761847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 431861847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 431961847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 432061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 432161847f8eSopenharmony_ci * @stagemodelonly 432261847f8eSopenharmony_ci * @since 10 432361847f8eSopenharmony_ci */ 432461847f8eSopenharmony_ci /** 432561847f8eSopenharmony_ci * Obtains the singular-plural character string represented by the resource object string corresponding to the 432661847f8eSopenharmony_ci * specified number. 432761847f8eSopenharmony_ci * 432861847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 432961847f8eSopenharmony_ci * @param { number } num - Indicates the number. 433061847f8eSopenharmony_ci * @returns { string } The singular-plural character string represented by the ID string 433161847f8eSopenharmony_ci * corresponding to the specified number. 433261847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 433361847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 433461847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 433561847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 433661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 433761847f8eSopenharmony_ci * @stagemodelonly 433861847f8eSopenharmony_ci * @crossplatform 433961847f8eSopenharmony_ci * @atomicservice 434061847f8eSopenharmony_ci * @since 11 434161847f8eSopenharmony_ci */ 434261847f8eSopenharmony_ci getPluralStringValueSync(resource: Resource, num: number): string; 434361847f8eSopenharmony_ci 434461847f8eSopenharmony_ci /** 434561847f8eSopenharmony_ci * Obtains the array of character strings corresponding to a specified resource ID. 434661847f8eSopenharmony_ci * 434761847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 434861847f8eSopenharmony_ci * @returns { Array<string> } The array of character strings corresponding to the specified resource ID. 434961847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 435061847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 435161847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 435261847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 435361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 435461847f8eSopenharmony_ci * @since 10 435561847f8eSopenharmony_ci */ 435661847f8eSopenharmony_ci /** 435761847f8eSopenharmony_ci * Obtains the array of character strings corresponding to a specified resource ID. 435861847f8eSopenharmony_ci * 435961847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 436061847f8eSopenharmony_ci * @returns { Array<string> } The array of character strings corresponding to the specified resource ID. 436161847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 436261847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 436361847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 436461847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 436561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 436661847f8eSopenharmony_ci * @crossplatform 436761847f8eSopenharmony_ci * @atomicservice 436861847f8eSopenharmony_ci * @since 11 436961847f8eSopenharmony_ci */ 437061847f8eSopenharmony_ci getStringArrayValueSync(resId: number): Array<string>; 437161847f8eSopenharmony_ci 437261847f8eSopenharmony_ci /** 437361847f8eSopenharmony_ci * Obtains the array of character strings corresponding to a specified resource object. 437461847f8eSopenharmony_ci * 437561847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 437661847f8eSopenharmony_ci * @returns { Array<string> } The array of character strings corresponding to the specified resource object. 437761847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 437861847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 437961847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 438061847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 438161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 438261847f8eSopenharmony_ci * @stagemodelonly 438361847f8eSopenharmony_ci * @since 10 438461847f8eSopenharmony_ci */ 438561847f8eSopenharmony_ci /** 438661847f8eSopenharmony_ci * Obtains the array of character strings corresponding to a specified resource object. 438761847f8eSopenharmony_ci * 438861847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 438961847f8eSopenharmony_ci * @returns { Array<string> } The array of character strings corresponding to the specified resource object. 439061847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 439161847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 439261847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 439361847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 439461847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 439561847f8eSopenharmony_ci * @stagemodelonly 439661847f8eSopenharmony_ci * @crossplatform 439761847f8eSopenharmony_ci * @atomicservice 439861847f8eSopenharmony_ci * @since 11 439961847f8eSopenharmony_ci */ 440061847f8eSopenharmony_ci getStringArrayValueSync(resource: Resource): Array<string>; 440161847f8eSopenharmony_ci 440261847f8eSopenharmony_ci /** 440361847f8eSopenharmony_ci * Obtains the singular-plural character string represented by the name string corresponding to 440461847f8eSopenharmony_ci * the specified number. 440561847f8eSopenharmony_ci * 440661847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 440761847f8eSopenharmony_ci * @param { number } num - Indicates the number. 440861847f8eSopenharmony_ci * @returns { string } The singular-plural character string represented by the name string 440961847f8eSopenharmony_ci * corresponding to the specified number. 441061847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 441161847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 441261847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 441361847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 441461847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 441561847f8eSopenharmony_ci * @since 10 441661847f8eSopenharmony_ci */ 441761847f8eSopenharmony_ci /** 441861847f8eSopenharmony_ci * Obtains the singular-plural character string represented by the name string corresponding to 441961847f8eSopenharmony_ci * the specified number. 442061847f8eSopenharmony_ci * 442161847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 442261847f8eSopenharmony_ci * @param { number } num - Indicates the number. 442361847f8eSopenharmony_ci * @returns { string } The singular-plural character string represented by the name string 442461847f8eSopenharmony_ci * corresponding to the specified number. 442561847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 442661847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 442761847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 442861847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 442961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 443061847f8eSopenharmony_ci * @crossplatform 443161847f8eSopenharmony_ci * @atomicservice 443261847f8eSopenharmony_ci * @since 11 443361847f8eSopenharmony_ci */ 443461847f8eSopenharmony_ci getPluralStringByNameSync(resName: string, num: number): string; 443561847f8eSopenharmony_ci 443661847f8eSopenharmony_ci /** 443761847f8eSopenharmony_ci * Obtains the content of the specified screen density media file corresponding to a specified resource name. 443861847f8eSopenharmony_ci * 443961847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 444061847f8eSopenharmony_ci * @param { number } [density] - The parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 444161847f8eSopenharmony_ci * to use the density of current system dpi. 444261847f8eSopenharmony_ci * @returns { Uint8Array } The obtained specified screen density media file content. 444361847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 444461847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 444561847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 444661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 444761847f8eSopenharmony_ci * @since 10 444861847f8eSopenharmony_ci */ 444961847f8eSopenharmony_ci /** 445061847f8eSopenharmony_ci * Obtains the content of the specified screen density media file corresponding to a specified resource name. 445161847f8eSopenharmony_ci * 445261847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 445361847f8eSopenharmony_ci * @param { number } [density] - The parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 445461847f8eSopenharmony_ci * to use the density of current system dpi. 445561847f8eSopenharmony_ci * @returns { Uint8Array } The obtained specified screen density media file content. 445661847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 445761847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 445861847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 445961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 446061847f8eSopenharmony_ci * @crossplatform 446161847f8eSopenharmony_ci * @atomicservice 446261847f8eSopenharmony_ci * @since 11 446361847f8eSopenharmony_ci */ 446461847f8eSopenharmony_ci getMediaByNameSync(resName: string, density?: number): Uint8Array; 446561847f8eSopenharmony_ci 446661847f8eSopenharmony_ci /** 446761847f8eSopenharmony_ci * Obtains the Base64 code of the specified screen density media file corresponding to the specified resource name. 446861847f8eSopenharmony_ci * 446961847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 447061847f8eSopenharmony_ci * @param { number } [density] - The parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 447161847f8eSopenharmony_ci * to use the density of current system dpi. 447261847f8eSopenharmony_ci * @returns { string } The obtained Base64 code of the specified screen density media file. 447361847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 447461847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 447561847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 447661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 447761847f8eSopenharmony_ci * @since 10 447861847f8eSopenharmony_ci */ 447961847f8eSopenharmony_ci /** 448061847f8eSopenharmony_ci * Obtains the Base64 code of the specified screen density media file corresponding to the specified resource name. 448161847f8eSopenharmony_ci * 448261847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 448361847f8eSopenharmony_ci * @param { number } [density] - The parameter ScreenDensity{@link ScreenDensity}, A value of 0 means 448461847f8eSopenharmony_ci * to use the density of current system dpi. 448561847f8eSopenharmony_ci * @returns { string } The obtained Base64 code of the specified screen density media file. 448661847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: 1.Incorrect parameter types; 2.Parameter verification failed. 448761847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 448861847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 448961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 449061847f8eSopenharmony_ci * @crossplatform 449161847f8eSopenharmony_ci * @atomicservice 449261847f8eSopenharmony_ci * @since 11 449361847f8eSopenharmony_ci */ 449461847f8eSopenharmony_ci getMediaBase64ByNameSync(resName: string, density?: number): string; 449561847f8eSopenharmony_ci 449661847f8eSopenharmony_ci /** 449761847f8eSopenharmony_ci * Obtains the array of character strings corresponding to a specified resource name. 449861847f8eSopenharmony_ci * 449961847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 450061847f8eSopenharmony_ci * @returns { Array<string> } the array of character strings corresponding to the specified resource name. 450161847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 450261847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 450361847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 450461847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 450561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 450661847f8eSopenharmony_ci * @since 10 450761847f8eSopenharmony_ci */ 450861847f8eSopenharmony_ci /** 450961847f8eSopenharmony_ci * Obtains the array of character strings corresponding to a specified resource name. 451061847f8eSopenharmony_ci * 451161847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 451261847f8eSopenharmony_ci * @returns { Array<string> } the array of character strings corresponding to the specified resource name. 451361847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 451461847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 451561847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 451661847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 451761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 451861847f8eSopenharmony_ci * @crossplatform 451961847f8eSopenharmony_ci * @atomicservice 452061847f8eSopenharmony_ci * @since 11 452161847f8eSopenharmony_ci */ 452261847f8eSopenharmony_ci getStringArrayByNameSync(resName: string): Array<string>; 452361847f8eSopenharmony_ci 452461847f8eSopenharmony_ci /** 452561847f8eSopenharmony_ci * Obtains the device configuration. 452661847f8eSopenharmony_ci * 452761847f8eSopenharmony_ci * @returns { Configuration } the device configuration. 452861847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 452961847f8eSopenharmony_ci * @since 10 453061847f8eSopenharmony_ci */ 453161847f8eSopenharmony_ci /** 453261847f8eSopenharmony_ci * Obtains the device configuration. 453361847f8eSopenharmony_ci * 453461847f8eSopenharmony_ci * @returns { Configuration } the device configuration. 453561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 453661847f8eSopenharmony_ci * @crossplatform 453761847f8eSopenharmony_ci * @atomicservice 453861847f8eSopenharmony_ci * @since 11 453961847f8eSopenharmony_ci */ 454061847f8eSopenharmony_ci getConfigurationSync(): Configuration; 454161847f8eSopenharmony_ci 454261847f8eSopenharmony_ci /** 454361847f8eSopenharmony_ci * Obtains the device capability. 454461847f8eSopenharmony_ci * 454561847f8eSopenharmony_ci * @returns { DeviceCapability } the device capability. 454661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 454761847f8eSopenharmony_ci * @since 10 454861847f8eSopenharmony_ci */ 454961847f8eSopenharmony_ci /** 455061847f8eSopenharmony_ci * Obtains the device capability. 455161847f8eSopenharmony_ci * 455261847f8eSopenharmony_ci * @returns { DeviceCapability } the device capability. 455361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 455461847f8eSopenharmony_ci * @crossplatform 455561847f8eSopenharmony_ci * @atomicservice 455661847f8eSopenharmony_ci * @since 11 455761847f8eSopenharmony_ci */ 455861847f8eSopenharmony_ci getDeviceCapabilitySync(): DeviceCapability; 455961847f8eSopenharmony_ci 456061847f8eSopenharmony_ci /** 456161847f8eSopenharmony_ci * Obtains locales list. 456261847f8eSopenharmony_ci * 456361847f8eSopenharmony_ci * @param { boolean } [includeSystem] - the parameter controls whether to include system resources, 456461847f8eSopenharmony_ci * the default value is false, it has no effect when only system resources query the locales list. 456561847f8eSopenharmony_ci * @returns { Array<string> } the list of strings for the locales. 456661847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 456761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 456861847f8eSopenharmony_ci * @crossplatform 456961847f8eSopenharmony_ci * @atomicservice 457061847f8eSopenharmony_ci * @since 11 457161847f8eSopenharmony_ci */ 457261847f8eSopenharmony_ci getLocales(includeSystem?: boolean): Array<string>; 457361847f8eSopenharmony_ci 457461847f8eSopenharmony_ci /** 457561847f8eSopenharmony_ci * Obtains the symbol resource corresponding to the specified resource ID. 457661847f8eSopenharmony_ci * 457761847f8eSopenharmony_ci * @param { number } resId - Indicates the resource ID. 457861847f8eSopenharmony_ci * @returns { number } Indicates the integer reference value representing the symbol data. 457961847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 458061847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 458161847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 458261847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 458361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 458461847f8eSopenharmony_ci * @crossplatform 458561847f8eSopenharmony_ci * @atomicservice 458661847f8eSopenharmony_ci * @since 11 458761847f8eSopenharmony_ci */ 458861847f8eSopenharmony_ci getSymbol(resId: number) : number; 458961847f8eSopenharmony_ci 459061847f8eSopenharmony_ci /** 459161847f8eSopenharmony_ci * Obtains the symbol resource corresponding to the specified resource object. 459261847f8eSopenharmony_ci * 459361847f8eSopenharmony_ci * @param { Resource } resource - Indicates the resource object. 459461847f8eSopenharmony_ci * @returns { number } Indicates the integer reference value representing the symbol data. 459561847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 459661847f8eSopenharmony_ci * @throws { BusinessError } 9001001 - Invalid resource ID. 459761847f8eSopenharmony_ci * @throws { BusinessError } 9001002 - No matching resource is found based on the resource ID. 459861847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 459961847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 460061847f8eSopenharmony_ci * @stagemodelonly 460161847f8eSopenharmony_ci * @crossplatform 460261847f8eSopenharmony_ci * @atomicservice 460361847f8eSopenharmony_ci * @since 11 460461847f8eSopenharmony_ci */ 460561847f8eSopenharmony_ci getSymbol(resource: Resource) : number; 460661847f8eSopenharmony_ci 460761847f8eSopenharmony_ci /** 460861847f8eSopenharmony_ci * Obtains the symbol resource corresponding to the specified resource name. 460961847f8eSopenharmony_ci * 461061847f8eSopenharmony_ci * @param { string } resName - Indicates the resource name. 461161847f8eSopenharmony_ci * @returns { number } Indicates the integer reference value representing the symbol data. 461261847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 461361847f8eSopenharmony_ci * @throws { BusinessError } 9001003 - Invalid resource name. 461461847f8eSopenharmony_ci * @throws { BusinessError } 9001004 - No matching resource is found based on the resource name. 461561847f8eSopenharmony_ci * @throws { BusinessError } 9001006 - The resource is referenced cyclically. 461661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 461761847f8eSopenharmony_ci * @crossplatform 461861847f8eSopenharmony_ci * @atomicservice 461961847f8eSopenharmony_ci * @since 11 462061847f8eSopenharmony_ci */ 462161847f8eSopenharmony_ci getSymbolByName(resName: string) : number; 462261847f8eSopenharmony_ci 462361847f8eSopenharmony_ci /** 462461847f8eSopenharmony_ci * Whether the rawfile resource is a directory or not. 462561847f8eSopenharmony_ci * 462661847f8eSopenharmony_ci * @param { string } path - Indicates the rawfile resource relative path. 462761847f8eSopenharmony_ci * @returns { boolean } True means the file path is directory, else false. 462861847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 462961847f8eSopenharmony_ci * @throws { BusinessError } 9001005 - Invalid relative path. 463061847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 463161847f8eSopenharmony_ci * @crossplatform 463261847f8eSopenharmony_ci * @atomicservice 463361847f8eSopenharmony_ci * @since 12 463461847f8eSopenharmony_ci */ 463561847f8eSopenharmony_ci isRawDir(path: string): boolean; 463661847f8eSopenharmony_ci 463761847f8eSopenharmony_ci /** 463861847f8eSopenharmony_ci * Get the override ResourceManager object related to the specified Configuration. 463961847f8eSopenharmony_ci * 464061847f8eSopenharmony_ci * @param { Configuration } [configuration] - Indicates the override Configuration{@link Configuration} 464161847f8eSopenharmony_ci * @returns { ResourceManager } The ResourceManager object is returned. 464261847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 464361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 464461847f8eSopenharmony_ci * @crossplatform 464561847f8eSopenharmony_ci * @atomicservice 464661847f8eSopenharmony_ci * @since 12 464761847f8eSopenharmony_ci */ 464861847f8eSopenharmony_ci getOverrideResourceManager(configuration?: Configuration): ResourceManager; 464961847f8eSopenharmony_ci 465061847f8eSopenharmony_ci /** 465161847f8eSopenharmony_ci * Get the current override Configuration related to the specified override ResourceManager. 465261847f8eSopenharmony_ci * 465361847f8eSopenharmony_ci * @returns { Configuration } The Configuration object is returned. 465461847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 465561847f8eSopenharmony_ci * @crossplatform 465661847f8eSopenharmony_ci * @atomicservice 465761847f8eSopenharmony_ci * @since 12 465861847f8eSopenharmony_ci */ 465961847f8eSopenharmony_ci getOverrideConfiguration(): Configuration; 466061847f8eSopenharmony_ci 466161847f8eSopenharmony_ci /** 466261847f8eSopenharmony_ci * Update the current override Configuration. 466361847f8eSopenharmony_ci * 466461847f8eSopenharmony_ci * @param { Configuration } configuration - Indicates the override Configuration{@link Configuration} 466561847f8eSopenharmony_ci * @throws { BusinessError } 401 - If the input parameter invalid. Possible causes: Incorrect parameter types. 466661847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 466761847f8eSopenharmony_ci * @crossplatform 466861847f8eSopenharmony_ci * @atomicservice 466961847f8eSopenharmony_ci * @since 12 467061847f8eSopenharmony_ci */ 467161847f8eSopenharmony_ci updateOverrideConfiguration(configuration: Configuration): void; 467261847f8eSopenharmony_ci } 467361847f8eSopenharmony_ci 467461847f8eSopenharmony_ci /** 467561847f8eSopenharmony_ci * Contains rawFile descriptor information. 467661847f8eSopenharmony_ci * 467761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 467861847f8eSopenharmony_ci * @since 9 467961847f8eSopenharmony_ci */ 468061847f8eSopenharmony_ci /** 468161847f8eSopenharmony_ci * Contains rawFile descriptor information. 468261847f8eSopenharmony_ci * 468361847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 468461847f8eSopenharmony_ci * @crossplatform 468561847f8eSopenharmony_ci * @since 10 468661847f8eSopenharmony_ci */ 468761847f8eSopenharmony_ci /** 468861847f8eSopenharmony_ci * Contains rawFile descriptor information. 468961847f8eSopenharmony_ci * 469061847f8eSopenharmony_ci * @typedef {_RawFileDescriptor} 469161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 469261847f8eSopenharmony_ci * @crossplatform 469361847f8eSopenharmony_ci * @atomicservice 469461847f8eSopenharmony_ci * @since 11 469561847f8eSopenharmony_ci */ 469661847f8eSopenharmony_ci export type RawFileDescriptor = _RawFileDescriptor; 469761847f8eSopenharmony_ci 469861847f8eSopenharmony_ci /** 469961847f8eSopenharmony_ci * Contains resource descriptor information. 470061847f8eSopenharmony_ci * 470161847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 470261847f8eSopenharmony_ci * @since 9 470361847f8eSopenharmony_ci */ 470461847f8eSopenharmony_ci /** 470561847f8eSopenharmony_ci * Contains resource descriptor information. 470661847f8eSopenharmony_ci * 470761847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 470861847f8eSopenharmony_ci * @crossplatform 470961847f8eSopenharmony_ci * @since 10 471061847f8eSopenharmony_ci */ 471161847f8eSopenharmony_ci /** 471261847f8eSopenharmony_ci * Contains resource descriptor information. 471361847f8eSopenharmony_ci * 471461847f8eSopenharmony_ci * @typedef {_Resource} 471561847f8eSopenharmony_ci * @syscap SystemCapability.Global.ResourceManager 471661847f8eSopenharmony_ci * @crossplatform 471761847f8eSopenharmony_ci * @atomicservice 471861847f8eSopenharmony_ci * @since 11 471961847f8eSopenharmony_ci */ 472061847f8eSopenharmony_ci export type Resource = _Resource; 472161847f8eSopenharmony_ci} 472261847f8eSopenharmony_ciexport default resourceManager;