1 Star 0 Fork 3.9K

Feng Lin/interface_sdk-js

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
@ohos.ability.screenLockFileManager.d.ts 6.29 KB
一键复制 编辑 原始数据 按行查看 历史
XKK 提交于 2024-06-18 11:33 +08:00 . Kits补充
/*
* Copyright (C) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file Provides the capability to access data under lock screen.
* @kit AbilityKit
*/
/**
* Provides the capability to access data under lock screen.
*
* @namespace screenLockFileManager
* @syscap SystemCapability.Security.ScreenLockFileManager
* @since 12
*/
declare namespace screenLockFileManager {
/**
* Enumerates the types of data under lock screen.
*
* @enum { number }
* @syscap SystemCapability.Security.ScreenLockFileManager
* @since 12
*/
export enum DataType {
/**
* Media photo and video data.
*
* @syscap SystemCapability.Security.ScreenLockFileManager
* @since 12
*/
MEDIA_DATA = 0x00000001,
/**
* All data type.
*
* @syscap SystemCapability.Security.ScreenLockFileManager
* @since 12
*/
ALL_DATA = 0xffffffff
}
/**
* AccessStatus.
*
* @enum { number }
* @syscap SystemCapability.Security.ScreenLockFileManager
* @since 12
*/
export enum AccessStatus {
/**
* Acquire the access of data failed.
*
* @syscap SystemCapability.Security.ScreenLockFileManager
* @since 12
*/
ACCESS_DENIED = -1,
/**
* Acquire the access of data success.
*
* @syscap SystemCapability.Security.ScreenLockFileManager
* @since 12
*/
ACCESS_GRANTED = 0
}
/**
* ReleaseStatus.
*
* @enum { number }
* @syscap SystemCapability.Security.ScreenLockFileManager
* @since 12
*/
export enum ReleaseStatus {
/**
* Release the access of data failed.
*
* @syscap SystemCapability.Security.ScreenLockFileManager
* @since 12
*/
RELEASE_DENIED = -1,
/**
* Release the access of data success.
*
* @syscap SystemCapability.Security.ScreenLockFileManager
* @since 12
*/
RELEASE_GRANTED = 0
}
/**
* Acquire the access of the caller data under the lock screen.
*
* @returns { AccessStatus } Returns acquire the access result.
* @throws { BusinessError } 801 - The specified SystemCapability name was not found.
* @throws { BusinessError } 29300002 - The system ability work abnormally.
* @throws { BusinessError } 29300003 - The application is not enabled the data protection under lock screen.
* @throws { BusinessError } 29300004 - File access is denied.
* @syscap SystemCapability.Security.ScreenLockFileManager
* @since 12
*/
function acquireAccess(): AccessStatus;
/**
* Acquire the access of the specified data under the lock screen.
*
* @permission ohos.permission.ACCESS_SCREEN_LOCK_MEDIA_DATA or ohos.permission.ACCESS_SCREEN_LOCK_ALL_DATA
* @param { DataType } dataType - Indicates the specified data to allow access under the lock screen.
* @returns { AccessStatus } Returns acquire the access result.
* @throws { BusinessError } 201 - Permission verification failed, usually returned by VerifyAccessToken.
* @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameter is left unspecified. 2. Incorrect parameter types.
* @throws { BusinessError } 801 - The specified SystemCapability name was not found.
* @throws { BusinessError } 29300001 - Invalid parameter.
* @throws { BusinessError } 29300002 - The system ability work abnormally.
* @throws { BusinessError } 29300003 - The application is not enabled the data protection under lock screen.
* @throws { BusinessError } 29300004 - File access is denied.
* @syscap SystemCapability.Security.ScreenLockFileManager
* @systemapi
* @since 12
*/
function acquireAccess(dataType: DataType): AccessStatus;
/**
* Release the access of the caller data and do not allow data access under the lock screen.
*
* @returns { ReleaseStatus } Returns release the access result.
* @throws { BusinessError } 801 - The specified SystemCapability name was not found.
* @throws { BusinessError } 29300002 - The system ability work abnormally.
* @throws { BusinessError } 29300003 - The application is not enabled the data protection under lock screen.
* @throws { BusinessError } 29300005 - File access was not acquired.
* @syscap SystemCapability.Security.ScreenLockFileManager
* @since 12
*/
function releaseAccess(): ReleaseStatus;
/**
* Release the access of the specified data type and do not allow data access under the lock screen.
*
* @permission ohos.permission.ACCESS_SCREEN_LOCK_MEDIA_DATA or ohos.permission.ACCESS_SCREEN_LOCK_ALL_DATA
* @param { DataType } dataType - Indicates the specified data type and do not allow data access under the lock screen.
* @returns { ReleaseStatus } Returns release the access result.
* @throws { BusinessError } 201 - Permission verification failed, usually returned by VerifyAccessToken.
* @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameter is left unspecified. 2. Incorrect parameter types.
* @throws { BusinessError } 801 - The specified SystemCapability name was not found.
* @throws { BusinessError } 29300001 - Invalid parameter.
* @throws { BusinessError } 29300002 - The system ability work abnormally.
* @throws { BusinessError } 29300003 - The application is not enabled the data protection under lock screen.
* @throws { BusinessError } 29300005 - File access was not acquired.
* @syscap SystemCapability.Security.ScreenLockFileManager
* @systemapi
* @since 12
*/
function releaseAccess(dataType: DataType): ReleaseStatus;
}
export default screenLockFileManager;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lffl8796/interface_sdk-js.git
git@gitee.com:lffl8796/interface_sdk-js.git
lffl8796
interface_sdk-js
interface_sdk-js
master

搜索帮助