69 lines
1.9 KiB
TypeScript
Raw Permalink Normal View History

2025-04-10 10:41:03 +08:00
/*
* Copyright (c) 2022-2023 Achermind 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.
*/
/**
* This module provides the capability to ID card reading.
*
* @since 7
* @syscap SystemCapability.Account.AppAccount
*/
declare namespace IDCardSDK {
/**
*
*/
export interface IDCardInfo {
2025-04-10 10:45:43 +08:00
status: number; // status = 1 为读到身份证信息; status = 0 为身份证离开读卡器
2025-04-10 10:41:03 +08:00
baseInfo: string; // 身份证数据信息字符串,不同的字段之间用"|"分隔
photo: ArrayBuffer // 身份证照片数据
}
/**
* StartReadCard()
*
* @param ret
*/
function OnReadCardCallback(ret: IDCardInfo): void;
/**
*
*
* @return 0
*/
function OpenDevice(): number;
/**
*
*
* @param callback
*/
function StartReadCard(callback: typeof OnReadCardCallback): void;
/**
*
*
*/
function StopReadCard(): void;
/**
*
*
* @return 0
*/
function CloseDevice(): number;
}
export default IDCardSDK;